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
c8d1618a
Commit
c8d1618a
authored
Oct 19, 2020
by
Denys Mishunov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Unwrapped modules from DOMContentLoaded handler
parent
fa79e06f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
17 deletions
+9
-17
app/assets/javascripts/snippet/snippet_show.js
app/assets/javascripts/snippet/snippet_show.js
+8
-8
app/assets/javascripts/snippets/index.js
app/assets/javascripts/snippets/index.js
+1
-9
No files found.
app/assets/javascripts/snippet/snippet_show.js
View file @
c8d1618a
import
initNotes
from
'
~/init_notes
'
;
import
loadAwardsHandler
from
'
~/awards_handler
'
;
import
{
SnippetShowInit
}
from
'
~/snippets
'
;
import
SnippetsShow
from
'
~/snippets/components/show.vue
'
;
import
SnippetsAppFactory
from
'
~/snippets
'
;
import
ZenMode
from
'
~/zen_mode
'
;
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
SnippetShowInit
();
initNotes
();
loadAwardsHandler
();
SnippetsAppFactory
(
document
.
getElementById
(
'
js-snippet-view
'
),
SnippetsShow
);
// eslint-disable-next-line no-new
new
ZenMode
();
});
initNotes
();
loadAwardsHandler
();
// eslint-disable-next-line no-new
new
ZenMode
();
app/assets/javascripts/snippets/index.js
View file @
c8d1618a
...
...
@@ -8,7 +8,7 @@ import { SNIPPET_LEVELS_MAP, SNIPPET_VISIBILITY_PRIVATE } from '~/snippets/const
Vue
.
use
(
VueApollo
);
Vue
.
use
(
Translate
);
function
appFactory
(
el
,
Component
)
{
export
default
function
appFactory
(
el
,
Component
)
{
if
(
!
el
)
{
return
false
;
}
...
...
@@ -45,14 +45,6 @@ function appFactory(el, Component) {
});
}
export
const
SnippetShowInit
=
()
=>
{
import
(
'
./components/show.vue
'
)
.
then
(({
default
:
SnippetsShow
})
=>
{
appFactory
(
document
.
getElementById
(
'
js-snippet-view
'
),
SnippetsShow
);
})
.
catch
(()
=>
{});
};
export
const
SnippetEditInit
=
()
=>
{
import
(
'
./components/edit.vue
'
)
.
then
(({
default
:
SnippetsEdit
})
=>
{
...
...
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