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
c7afb8f8
Commit
c7afb8f8
authored
Sep 13, 2018
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move initFieldErrors from dispatcher to main.js
parent
105ab36b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
8 deletions
+4
-8
app/assets/javascripts/dispatcher.js
app/assets/javascripts/dispatcher.js
+0
-8
app/assets/javascripts/main.js
app/assets/javascripts/main.js
+4
-0
No files found.
app/assets/javascripts/dispatcher.js
View file @
c7afb8f8
...
...
@@ -3,7 +3,6 @@
import
$
from
'
jquery
'
;
import
GfmAutoComplete
from
'
./gfm_auto_complete
'
;
import
{
convertPermissionToBoolean
}
from
'
./lib/utils/common_utils
'
;
import
GlFieldErrors
from
'
./gl_field_errors
'
;
import
Shortcuts
from
'
./shortcuts
'
;
import
SearchAutocomplete
from
'
./search_autocomplete
'
;
import
performanceBar
from
'
./performance_bar
'
;
...
...
@@ -15,12 +14,6 @@ function initSearch() {
}
}
function
initFieldErrors
()
{
$
(
'
.gl-show-field-errors
'
).
each
((
i
,
form
)
=>
{
new
GlFieldErrors
(
form
);
});
}
function
initPageShortcuts
(
page
)
{
const
pagesWithCustomShortcuts
=
[
'
projects:activity
'
,
...
...
@@ -78,7 +71,6 @@ function initPerformanceBar() {
export
default
()
=>
{
initSearch
();
initFieldErrors
();
const
page
=
$
(
'
body
'
).
attr
(
'
data-page
'
);
if
(
page
)
{
...
...
app/assets/javascripts/main.js
View file @
c7afb8f8
...
...
@@ -28,6 +28,7 @@ import './frequent_items';
import
initBreadcrumbs
from
'
./breadcrumb
'
;
import
initDispatcher
from
'
./dispatcher
'
;
import
initUsagePingConsent
from
'
./usage_ping_consent
'
;
import
GlFieldErrors
from
'
./gl_field_errors
'
;
// expose jQuery as global (TODO: remove these)
window
.
jQuery
=
jQuery
;
...
...
@@ -266,5 +267,8 @@ document.addEventListener('DOMContentLoaded', () => {
});
}
// initialize field errors
$
(
'
.gl-show-field-errors
'
).
each
((
i
,
form
)
=>
new
GlFieldErrors
(
form
));
initDispatcher
();
});
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