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
fdaec9b7
Commit
fdaec9b7
authored
Sep 09, 2020
by
Tim Zallmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bundle Splitting for global search
parent
a873622c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
app/assets/javascripts/main.js
app/assets/javascripts/main.js
+12
-2
No files found.
app/assets/javascripts/main.js
View file @
fdaec9b7
...
@@ -31,7 +31,6 @@ import initLogoAnimation from './logo';
...
@@ -31,7 +31,6 @@ import initLogoAnimation from './logo';
import
initFrequentItemDropdowns
from
'
./frequent_items
'
;
import
initFrequentItemDropdowns
from
'
./frequent_items
'
;
import
initBreadcrumbs
from
'
./breadcrumb
'
;
import
initBreadcrumbs
from
'
./breadcrumb
'
;
import
initUsagePingConsent
from
'
./usage_ping_consent
'
;
import
initUsagePingConsent
from
'
./usage_ping_consent
'
;
import
initSearchAutocomplete
from
'
./search_autocomplete
'
;
import
GlFieldErrors
from
'
./gl_field_errors
'
;
import
GlFieldErrors
from
'
./gl_field_errors
'
;
import
initUserPopovers
from
'
./user_popovers
'
;
import
initUserPopovers
from
'
./user_popovers
'
;
import
initBroadcastNotifications
from
'
./broadcast_notification
'
;
import
initBroadcastNotifications
from
'
./broadcast_notification
'
;
...
@@ -112,7 +111,18 @@ function deferredInitialisation() {
...
@@ -112,7 +111,18 @@ function deferredInitialisation() {
initPersistentUserCallouts
();
initPersistentUserCallouts
();
initDefaultTrackers
();
initDefaultTrackers
();
if
(
document
.
querySelector
(
'
.search
'
))
initSearchAutocomplete
();
document
.
querySelector
(
'
#search
'
).
addEventListener
(
'
focus
'
,
()
=>
{
import
(
/* webpackChunkName: 'globalSearch' */
'
./search_autocomplete
'
)
.
then
(({
default
:
initSearchAutocomplete
})
=>
{
const
searchDropdown
=
initSearchAutocomplete
();
searchDropdown
.
onSearchInputFocus
();
})
.
catch
(()
=>
{});
},
{
once
:
true
},
);
addSelectOnFocusBehaviour
(
'
.js-select-on-focus
'
);
addSelectOnFocusBehaviour
(
'
.js-select-on-focus
'
);
...
...
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