Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
417410ca
Commit
417410ca
authored
Jan 15, 2018
by
Constance Okoghenun
Committed by
Constance Okoghenun
Jan 15, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
EE Port of projects-tree-tags-dispatcher-refacto
parent
c8bd4405
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
21 deletions
+40
-21
app/assets/javascripts/dispatcher.js
app/assets/javascripts/dispatcher.js
+7
-21
app/assets/javascripts/pages/projects/tags/new/index.js
app/assets/javascripts/pages/projects/tags/new/index.js
+9
-0
app/assets/javascripts/pages/projects/tree/show/index.js
app/assets/javascripts/pages/projects/tree/show/index.js
+24
-0
No files found.
app/assets/javascripts/dispatcher.js
View file @
417410ca
...
...
@@ -12,7 +12,6 @@ import groupAvatar from './group_avatar';
import
GroupLabelSubscription
from
'
./group_label_subscription
'
;
import
LineHighlighter
from
'
./line_highlighter
'
;
import
groupsSelect
from
'
./groups_select
'
;
import
NewCommitForm
from
'
./new_commit_form
'
;
import
Project
from
'
./project
'
;
import
projectAvatar
from
'
./project_avatar
'
;
import
MergeRequest
from
'
./merge_request
'
;
...
...
@@ -40,7 +39,6 @@ import ShortcutsWiki from './shortcuts_wiki';
import
BlobViewer
from
'
./blob/viewer/index
'
;
import
AutoWidthDropdownSelect
from
'
./issuable/auto_width_dropdown_select
'
;
import
UsersSelect
from
'
./users_select
'
;
import
RefSelectDropdown
from
'
./ref_select_dropdown
'
;
import
GfmAutoComplete
from
'
./gfm_auto_complete
'
;
import
Star
from
'
./star
'
;
import
TreeView
from
'
./tree
'
;
...
...
@@ -298,9 +296,9 @@ import initLDAPGroupsSelect from 'ee/ldap_groups_select'; // eslint-disable-line
initApprovals
();
break
;
case
'
projects:tags:new
'
:
new
ZenMode
();
new
GLForm
(
$
(
'
.tag-form
'
),
true
);
new
RefSelectDropdown
(
$
(
'
.js-branch-select
'
)
);
import
(
'
./pages/projects/tags/new
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'
projects:snippets:show
'
:
initNotes
();
...
...
@@ -476,22 +474,10 @@ import initLDAPGroupsSelect from 'ee/ldap_groups_select'; // eslint-disable-line
groupAvatar
();
break
;
case
'
projects:tree:show
'
:
shortcut_handler
=
new
ShortcutsNavigation
();
new
TreeView
();
new
BlobViewer
();
new
NewCommitForm
(
$
(
'
.js-create-dir-form
'
));
if
(
document
.
querySelector
(
'
.js-tree-content
'
).
dataset
.
pathLocksAvailable
===
'
true
'
)
{
initPathLocks
(
document
.
querySelector
(
'
.js-tree-content
'
).
dataset
.
pathLocksToggle
,
document
.
querySelector
(
'
.js-tree-content
'
).
dataset
.
pathLocksPath
,
);
}
$
(
'
#tree-slider
'
).
waitForImages
(
function
()
{
ajaxGet
(
document
.
querySelector
(
'
.js-tree-content
'
).
dataset
.
logsPath
);
});
break
;
import
(
'
./pages/projects/tree/show
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
shortcut_handler
=
true
;
case
'
projects:find_file:show
'
:
const
findElement
=
document
.
querySelector
(
'
.js-file-finder
'
);
const
projectFindFile
=
new
ProjectFindFile
(
$
(
"
.file-finder-holder
"
),
{
...
...
app/assets/javascripts/pages/projects/tags/new/index.js
0 → 100644
View file @
417410ca
import
RefSelectDropdown
from
'
../../../../ref_select_dropdown
'
;
import
ZenMode
from
'
../../../../zen_mode
'
;
import
GLForm
from
'
../../../../gl_form
'
;
export
default
()
=>
{
new
ZenMode
();
// eslint-disable-line no-new
new
GLForm
(
$
(
'
.tag-form
'
),
true
);
// eslint-disable-line no-new
new
RefSelectDropdown
(
$
(
'
.js-branch-select
'
));
// eslint-disable-line no-new
};
app/assets/javascripts/pages/projects/tree/show/index.js
0 → 100644
View file @
417410ca
import
initPathLocks
from
'
ee/path_locks
'
;
import
TreeView
from
'
../../../../tree
'
;
import
ShortcutsNavigation
from
'
../../../../shortcuts_navigation
'
;
import
BlobViewer
from
'
../../../../blob/viewer
'
;
import
NewCommitForm
from
'
../../../../new_commit_form
'
;
import
{
ajaxGet
}
from
'
../../../../lib/utils/common_utils
'
;
export
default
()
=>
{
new
TreeView
();
// eslint-disable-line no-new
new
BlobViewer
();
// eslint-disable-line no-new
new
NewCommitForm
(
$
(
'
.js-create-dir-form
'
));
// eslint-disable-line no-new
$
(
'
#tree-slider
'
).
waitForImages
(()
=>
ajaxGet
(
document
.
querySelector
(
'
.js-tree-content
'
).
dataset
.
logsPath
));
return
new
ShortcutsNavigation
();
// eslint-disable-line no-new
if
(
document
.
querySelector
(
'
.js-tree-content
'
).
dataset
.
pathLocksAvailable
===
'
true
'
)
{
initPathLocks
(
document
.
querySelector
(
'
.js-tree-content
'
).
dataset
.
pathLocksToggle
,
document
.
querySelector
(
'
.js-tree-content
'
).
dataset
.
pathLocksPath
,
);
}
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment