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
Léo-Paul Géneau
gitlab-ce
Commits
8446d3df
Commit
8446d3df
authored
Feb 21, 2018
by
Clement Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use dynamic imports in dispatcher
parent
ace12dd1
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
20 additions
and
80 deletions
+20
-80
app/assets/javascripts/dispatcher.js
app/assets/javascripts/dispatcher.js
+0
-59
app/assets/javascripts/pages/admin/groups/edit/index.js
app/assets/javascripts/pages/admin/groups/edit/index.js
+2
-2
app/assets/javascripts/pages/admin/groups/new/index.js
app/assets/javascripts/pages/admin/groups/new/index.js
+2
-2
app/assets/javascripts/pages/groups/activity/index.js
app/assets/javascripts/pages/groups/activity/index.js
+1
-1
app/assets/javascripts/pages/groups/edit/index.js
app/assets/javascripts/pages/groups/edit/index.js
+2
-2
app/assets/javascripts/pages/groups/group_members/index/index.js
...ets/javascripts/pages/groups/group_members/index/index.js
+2
-2
app/assets/javascripts/pages/groups/new/index.js
app/assets/javascripts/pages/groups/new/index.js
+2
-2
app/assets/javascripts/pages/projects/blame/show/index.js
app/assets/javascripts/pages/projects/blame/show/index.js
+1
-1
app/assets/javascripts/pages/projects/blob/show/index.js
app/assets/javascripts/pages/projects/blob/show/index.js
+2
-2
app/assets/javascripts/pages/projects/find_file/show/index.js
...assets/javascripts/pages/projects/find_file/show/index.js
+2
-2
app/assets/javascripts/pages/projects/project_members/index.js
...ssets/javascripts/pages/projects/project_members/index.js
+2
-2
app/assets/javascripts/pages/projects/tree/show/index.js
app/assets/javascripts/pages/projects/tree/show/index.js
+2
-3
No files found.
app/assets/javascripts/dispatcher.js
View file @
8446d3df
...
@@ -56,70 +56,11 @@ var Dispatcher;
...
@@ -56,70 +56,11 @@ var Dispatcher;
case
'
projects:activity
'
:
case
'
projects:activity
'
:
case
'
projects:commits:show
'
:
case
'
projects:commits:show
'
:
case
'
projects:show
'
:
case
'
projects:show
'
:
shortcut_handler
=
true
;
break
;
case
'
groups:activity
'
:
import
(
'
./pages/groups/activity
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'
groups:show
'
:
case
'
groups:show
'
:
shortcut_handler
=
true
;
break
;
case
'
groups:group_members:index
'
:
import
(
'
./pages/groups/group_members/index
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'
projects:project_members:index
'
:
import
(
'
./pages/projects/project_members
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'
groups:create
'
:
case
'
groups:new
'
:
import
(
'
./pages/groups/new
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'
groups:edit
'
:
import
(
'
./pages/groups/edit
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'
admin:groups:create
'
:
case
'
admin:groups:new
'
:
import
(
'
./pages/admin/groups/new
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'
admin:groups:edit
'
:
import
(
'
./pages/admin/groups/edit
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'
projects:tree:show
'
:
case
'
projects:tree:show
'
:
import
(
'
./pages/projects/tree/show
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
shortcut_handler
=
true
;
break
;
case
'
projects:find_file:show
'
:
case
'
projects:find_file:show
'
:
import
(
'
./pages/projects/find_file/show
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
shortcut_handler
=
true
;
break
;
case
'
projects:blob:show
'
:
case
'
projects:blob:show
'
:
import
(
'
./pages/projects/blob/show
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
shortcut_handler
=
true
;
break
;
case
'
projects:blame:show
'
:
case
'
projects:blame:show
'
:
import
(
'
./pages/projects/blame/show
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
shortcut_handler
=
true
;
shortcut_handler
=
true
;
break
;
break
;
case
'
groups:labels:new
'
:
case
'
groups:labels:new
'
:
...
...
app/assets/javascripts/pages/admin/groups/edit/index.js
View file @
8446d3df
import
groupAvatar
from
'
../../../..
/group_avatar
'
;
import
groupAvatar
from
'
~
/group_avatar
'
;
export
default
()
=>
groupAvatar
(
);
document
.
addEventListener
(
'
DOMContentLoaded
'
,
groupAvatar
);
app/assets/javascripts/pages/admin/groups/new/index.js
View file @
8446d3df
...
@@ -2,8 +2,8 @@ import BindInOut from '../../../../behaviors/bind_in_out';
...
@@ -2,8 +2,8 @@ import BindInOut from '../../../../behaviors/bind_in_out';
import
Group
from
'
../../../../group
'
;
import
Group
from
'
../../../../group
'
;
import
groupAvatar
from
'
../../../../group_avatar
'
;
import
groupAvatar
from
'
../../../../group_avatar
'
;
export
default
()
=>
{
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
BindInOut
.
initAll
();
BindInOut
.
initAll
();
new
Group
();
// eslint-disable-line no-new
new
Group
();
// eslint-disable-line no-new
groupAvatar
();
groupAvatar
();
};
}
)
;
app/assets/javascripts/pages/groups/activity/index.js
View file @
8446d3df
import
Activities
from
'
~/activities
'
;
import
Activities
from
'
~/activities
'
;
export
default
()
=>
new
Activities
(
);
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
new
Activities
()
);
app/assets/javascripts/pages/groups/edit/index.js
View file @
8446d3df
import
groupAvatar
from
'
~/group_avatar
'
;
import
groupAvatar
from
'
~/group_avatar
'
;
import
TransferDropdown
from
'
~/groups/transfer_dropdown
'
;
import
TransferDropdown
from
'
~/groups/transfer_dropdown
'
;
export
default
()
=>
{
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
groupAvatar
();
groupAvatar
();
new
TransferDropdown
();
// eslint-disable-line no-new
new
TransferDropdown
();
// eslint-disable-line no-new
};
}
)
;
app/assets/javascripts/pages/groups/group_members/index/index.js
View file @
8446d3df
...
@@ -4,8 +4,8 @@ import memberExpirationDate from '~/member_expiration_date';
...
@@ -4,8 +4,8 @@ import memberExpirationDate from '~/member_expiration_date';
import
Members
from
'
~/members
'
;
import
Members
from
'
~/members
'
;
import
UsersSelect
from
'
~/users_select
'
;
import
UsersSelect
from
'
~/users_select
'
;
export
default
()
=>
{
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
memberExpirationDate
();
memberExpirationDate
();
new
Members
();
new
Members
();
new
UsersSelect
();
new
UsersSelect
();
};
}
)
;
app/assets/javascripts/pages/groups/new/index.js
View file @
8446d3df
...
@@ -2,8 +2,8 @@ import BindInOut from '~/behaviors/bind_in_out';
...
@@ -2,8 +2,8 @@ import BindInOut from '~/behaviors/bind_in_out';
import
Group
from
'
~/group
'
;
import
Group
from
'
~/group
'
;
import
groupAvatar
from
'
~/group_avatar
'
;
import
groupAvatar
from
'
~/group_avatar
'
;
export
default
()
=>
{
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
BindInOut
.
initAll
();
BindInOut
.
initAll
();
new
Group
();
// eslint-disable-line no-new
new
Group
();
// eslint-disable-line no-new
groupAvatar
();
groupAvatar
();
};
}
)
;
app/assets/javascripts/pages/projects/blame/show/index.js
View file @
8446d3df
import
initBlob
from
'
~/pages/projects/init_blob
'
;
import
initBlob
from
'
~/pages/projects/init_blob
'
;
export
default
initBlob
;
document
.
addEventListener
(
'
DOMContentLoaded
'
,
initBlob
)
;
app/assets/javascripts/pages/projects/blob/show/index.js
View file @
8446d3df
import
BlobViewer
from
'
~/blob/viewer/index
'
;
import
BlobViewer
from
'
~/blob/viewer/index
'
;
import
initBlob
from
'
~/pages/projects/init_blob
'
;
import
initBlob
from
'
~/pages/projects/init_blob
'
;
export
default
()
=>
{
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
new
BlobViewer
();
// eslint-disable-line no-new
new
BlobViewer
();
// eslint-disable-line no-new
initBlob
();
initBlob
();
};
}
)
;
app/assets/javascripts/pages/projects/find_file/show/index.js
View file @
8446d3df
import
ProjectFindFile
from
'
~/project_find_file
'
;
import
ProjectFindFile
from
'
~/project_find_file
'
;
import
ShortcutsFindFile
from
'
~/shortcuts_find_file
'
;
import
ShortcutsFindFile
from
'
~/shortcuts_find_file
'
;
export
default
()
=>
{
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
const
findElement
=
document
.
querySelector
(
'
.js-file-finder
'
);
const
findElement
=
document
.
querySelector
(
'
.js-file-finder
'
);
const
projectFindFile
=
new
ProjectFindFile
(
$
(
'
.file-finder-holder
'
),
{
const
projectFindFile
=
new
ProjectFindFile
(
$
(
'
.file-finder-holder
'
),
{
url
:
findElement
.
dataset
.
fileFindUrl
,
url
:
findElement
.
dataset
.
fileFindUrl
,
...
@@ -9,4 +9,4 @@ export default () => {
...
@@ -9,4 +9,4 @@ export default () => {
blobUrlTemplate
:
findElement
.
dataset
.
blobUrlTemplate
,
blobUrlTemplate
:
findElement
.
dataset
.
blobUrlTemplate
,
});
});
new
ShortcutsFindFile
(
projectFindFile
);
// eslint-disable-line no-new
new
ShortcutsFindFile
(
projectFindFile
);
// eslint-disable-line no-new
};
}
)
;
app/assets/javascripts/pages/projects/project_members/index.js
View file @
8446d3df
...
@@ -3,10 +3,10 @@ import UsersSelect from '../../../users_select';
...
@@ -3,10 +3,10 @@ import UsersSelect from '../../../users_select';
import
groupsSelect
from
'
../../../groups_select
'
;
import
groupsSelect
from
'
../../../groups_select
'
;
import
Members
from
'
../../../members
'
;
import
Members
from
'
../../../members
'
;
export
default
()
=>
{
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
memberExpirationDate
(
'
.js-access-expiration-date-groups
'
);
memberExpirationDate
(
'
.js-access-expiration-date-groups
'
);
groupsSelect
();
groupsSelect
();
memberExpirationDate
();
memberExpirationDate
();
new
Members
();
// eslint-disable-line no-new
new
Members
();
// eslint-disable-line no-new
new
UsersSelect
();
// eslint-disable-line no-new
new
UsersSelect
();
// eslint-disable-line no-new
};
}
)
;
app/assets/javascripts/pages/projects/tree/show/index.js
View file @
8446d3df
...
@@ -6,7 +6,7 @@ import BlobViewer from '../../../../blob/viewer';
...
@@ -6,7 +6,7 @@ import BlobViewer from '../../../../blob/viewer';
import
NewCommitForm
from
'
../../../../new_commit_form
'
;
import
NewCommitForm
from
'
../../../../new_commit_form
'
;
import
{
ajaxGet
}
from
'
../../../../lib/utils/common_utils
'
;
import
{
ajaxGet
}
from
'
../../../../lib/utils/common_utils
'
;
export
default
()
=>
{
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
new
ShortcutsNavigation
();
// eslint-disable-line no-new
new
ShortcutsNavigation
();
// eslint-disable-line no-new
new
TreeView
();
// eslint-disable-line no-new
new
TreeView
();
// eslint-disable-line no-new
new
BlobViewer
();
// eslint-disable-line no-new
new
BlobViewer
();
// eslint-disable-line no-new
...
@@ -33,5 +33,4 @@ export default () => {
...
@@ -33,5 +33,4 @@ export default () => {
},
},
});
});
}
}
};
});
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