diff options
author | Bryce Johnson <bryce@gitlab.com> | 2017-01-13 16:54:16 -0500 |
---|---|---|
committer | Bryce Johnson <bryce@gitlab.com> | 2017-02-02 14:03:12 -0500 |
commit | fbd09871ca7003242053fbca10d9c0e96e7a799d (patch) | |
tree | 0703d65519dbc98fa57796ee08fd8086e9863c32 /app/assets/javascripts/filtered_search | |
parent | e3a5f1df29ca09797217d90af4ce0086a66fcd8d (diff) | |
download | gitlab-ce-fbd09871ca7003242053fbca10d9c0e96e7a799d.tar.gz |
Remove turbolinks.
Diffstat (limited to 'app/assets/javascripts/filtered_search')
-rw-r--r-- | app/assets/javascripts/filtered_search/filtered_search_dropdown_manager.js.es6 | 4 | ||||
-rw-r--r-- | app/assets/javascripts/filtered_search/filtered_search_manager.js.es6 | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/app/assets/javascripts/filtered_search/filtered_search_dropdown_manager.js.es6 b/app/assets/javascripts/filtered_search/filtered_search_dropdown_manager.js.es6 index 00e1c28692f..547989a6ff5 100644 --- a/app/assets/javascripts/filtered_search/filtered_search_dropdown_manager.js.es6 +++ b/app/assets/javascripts/filtered_search/filtered_search_dropdown_manager.js.es6 @@ -9,7 +9,7 @@ this.setupMapping(); this.cleanupWrapper = this.cleanup.bind(this); - document.addEventListener('page:fetch', this.cleanupWrapper); + document.addEventListener('beforeunload', this.cleanupWrapper); } cleanup() { @@ -20,7 +20,7 @@ this.setupMapping(); - document.removeEventListener('page:fetch', this.cleanupWrapper); + document.removeEventListener('beforeunload', this.cleanupWrapper); } setupMapping() { diff --git a/app/assets/javascripts/filtered_search/filtered_search_manager.js.es6 b/app/assets/javascripts/filtered_search/filtered_search_manager.js.es6 index 029564ffc61..4e02ab7c8c1 100644 --- a/app/assets/javascripts/filtered_search/filtered_search_manager.js.es6 +++ b/app/assets/javascripts/filtered_search/filtered_search_manager.js.es6 @@ -1,5 +1,3 @@ -/* global Turbolinks */ - (() => { class FilteredSearchManager { constructor() { @@ -15,13 +13,13 @@ this.dropdownManager.setDropdown(); this.cleanupWrapper = this.cleanup.bind(this); - document.addEventListener('page:fetch', this.cleanupWrapper); + document.addEventListener('beforeunload', this.cleanupWrapper); } } cleanup() { this.unbindEvents(); - document.removeEventListener('page:fetch', this.cleanupWrapper); + document.removeEventListener('beforeunload', this.cleanupWrapper); } bindEvents() { @@ -200,7 +198,9 @@ paths.push(`search=${sanitized}`); } - Turbolinks.visit(`?scope=all&utf8=✓&${paths.join('&')}`); + const parameterizedUrl = `?scope=all&utf8=✓&${paths.join('&')}`; + + gl.utils.visitUrl(parameterizedUrl); } getUsernameParams() { |