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
2aa29872
Commit
2aa29872
authored
Sep 13, 2018
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move performance_bar setup to dispatcher to main.js
parent
05f403cf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
8 deletions
+2
-8
app/assets/javascripts/dispatcher.js
app/assets/javascripts/dispatcher.js
+0
-8
app/assets/javascripts/main.js
app/assets/javascripts/main.js
+2
-0
No files found.
app/assets/javascripts/dispatcher.js
View file @
2aa29872
...
...
@@ -4,7 +4,6 @@ import $ from 'jquery';
import
GfmAutoComplete
from
'
./gfm_auto_complete
'
;
import
{
convertPermissionToBoolean
}
from
'
./lib/utils/common_utils
'
;
import
Shortcuts
from
'
./shortcuts
'
;
import
performanceBar
from
'
./performance_bar
'
;
function
initPageShortcuts
(
page
)
{
const
pagesWithCustomShortcuts
=
[
...
...
@@ -55,17 +54,10 @@ function initGFMInput() {
});
}
function
initPerformanceBar
()
{
if
(
document
.
querySelector
(
'
#js-peek
'
))
{
performanceBar
({
container
:
'
#js-peek
'
});
}
}
export
default
()
=>
{
const
page
=
$
(
'
body
'
).
attr
(
'
data-page
'
);
if
(
page
)
{
initPageShortcuts
(
page
);
initGFMInput
();
initPerformanceBar
();
}
};
app/assets/javascripts/main.js
View file @
2aa29872
...
...
@@ -28,6 +28,7 @@ import './frequent_items';
import
initBreadcrumbs
from
'
./breadcrumb
'
;
import
initDispatcher
from
'
./dispatcher
'
;
import
initUsagePingConsent
from
'
./usage_ping_consent
'
;
import
initPerformanceBar
from
'
./performance_bar
'
;
import
initSearchAutocomplete
from
'
./search_autocomplete
'
;
import
GlFieldErrors
from
'
./gl_field_errors
'
;
...
...
@@ -80,6 +81,7 @@ document.addEventListener('DOMContentLoaded', () => {
initUsagePingConsent
();
if
(
document
.
querySelector
(
'
.search
'
))
initSearchAutocomplete
();
if
(
document
.
querySelector
(
'
#js-peek
'
))
initPerformanceBar
({
container
:
'
#js-peek
'
});
// Set the default path for all cookies to GitLab's root directory
Cookies
.
defaults
.
path
=
gon
.
relative_url_root
||
'
/
'
;
...
...
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