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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
24fa3461
Commit
24fa3461
authored
Jan 15, 2018
by
Constance Okoghenun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactored import of projects:tags:* and projects:tree:* of dispatcher.js
parent
74f2f9b3
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
12 deletions
+33
-12
app/assets/javascripts/dispatcher.js
app/assets/javascripts/dispatcher.js
+8
-12
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
+16
-0
No files found.
app/assets/javascripts/dispatcher.js
View file @
24fa3461
...
@@ -12,7 +12,6 @@ import notificationsDropdown from './notifications_dropdown';
...
@@ -12,7 +12,6 @@ import notificationsDropdown from './notifications_dropdown';
import
groupAvatar
from
'
./group_avatar
'
;
import
groupAvatar
from
'
./group_avatar
'
;
import
GroupLabelSubscription
from
'
./group_label_subscription
'
;
import
GroupLabelSubscription
from
'
./group_label_subscription
'
;
import
LineHighlighter
from
'
./line_highlighter
'
;
import
LineHighlighter
from
'
./line_highlighter
'
;
import
NewCommitForm
from
'
./new_commit_form
'
;
import
Project
from
'
./project
'
;
import
Project
from
'
./project
'
;
import
projectAvatar
from
'
./project_avatar
'
;
import
projectAvatar
from
'
./project_avatar
'
;
import
MergeRequest
from
'
./merge_request
'
;
import
MergeRequest
from
'
./merge_request
'
;
...
@@ -39,7 +38,6 @@ import ShortcutsWiki from './shortcuts_wiki';
...
@@ -39,7 +38,6 @@ import ShortcutsWiki from './shortcuts_wiki';
import
BlobViewer
from
'
./blob/viewer/index
'
;
import
BlobViewer
from
'
./blob/viewer/index
'
;
import
AutoWidthDropdownSelect
from
'
./issuable/auto_width_dropdown_select
'
;
import
AutoWidthDropdownSelect
from
'
./issuable/auto_width_dropdown_select
'
;
import
UsersSelect
from
'
./users_select
'
;
import
UsersSelect
from
'
./users_select
'
;
import
RefSelectDropdown
from
'
./ref_select_dropdown
'
;
import
GfmAutoComplete
from
'
./gfm_auto_complete
'
;
import
GfmAutoComplete
from
'
./gfm_auto_complete
'
;
import
Star
from
'
./star
'
;
import
Star
from
'
./star
'
;
import
TreeView
from
'
./tree
'
;
import
TreeView
from
'
./tree
'
;
...
@@ -256,9 +254,9 @@ import { fetchCommitMergeRequests } from './commit_merge_requests';
...
@@ -256,9 +254,9 @@ import { fetchCommitMergeRequests } from './commit_merge_requests';
new
AutoWidthDropdownSelect
(
$
(
'
.js-target-branch-select
'
)).
init
();
new
AutoWidthDropdownSelect
(
$
(
'
.js-target-branch-select
'
)).
init
();
break
;
break
;
case
'
projects:tags:new
'
:
case
'
projects:tags:new
'
:
new
ZenMode
();
import
(
'
./pages/projects/tags/new
'
)
new
GLForm
(
$
(
'
.tag-form
'
),
true
);
.
then
(
callDefault
)
new
RefSelectDropdown
(
$
(
'
.js-branch-select
'
)
);
.
catch
(
fail
);
break
;
break
;
case
'
projects:snippets:show
'
:
case
'
projects:snippets:show
'
:
initNotes
();
initNotes
();
...
@@ -412,13 +410,11 @@ import { fetchCommitMergeRequests } from './commit_merge_requests';
...
@@ -412,13 +410,11 @@ import { fetchCommitMergeRequests } from './commit_merge_requests';
groupAvatar
();
groupAvatar
();
break
;
break
;
case
'
projects:tree:show
'
:
case
'
projects:tree:show
'
:
shortcut_handler
=
new
ShortcutsNavigation
();
import
(
'
./pages/projects/tree/show
'
)
new
TreeView
();
.
then
((
module
)
=>
{
new
BlobViewer
();
shortcut_handler
=
module
.
default
();
new
NewCommitForm
(
$
(
'
.js-create-dir-form
'
));
})
$
(
'
#tree-slider
'
).
waitForImages
(
function
()
{
.
catch
(
fail
);
ajaxGet
(
document
.
querySelector
(
'
.js-tree-content
'
).
dataset
.
logsPath
);
});
break
;
break
;
case
'
projects:find_file:show
'
:
case
'
projects:find_file:show
'
:
const
findElement
=
document
.
querySelector
(
'
.js-file-finder
'
);
const
findElement
=
document
.
querySelector
(
'
.js-file-finder
'
);
...
...
app/assets/javascripts/pages/projects/tags/new/index.js
0 → 100644
View file @
24fa3461
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 @
24fa3461
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
};
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