Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/header_search/index.js')
-rw-r--r--app/assets/javascripts/header_search/index.js47
1 files changed, 0 insertions, 47 deletions
diff --git a/app/assets/javascripts/header_search/index.js b/app/assets/javascripts/header_search/index.js
deleted file mode 100644
index 7b26dd183ad..00000000000
--- a/app/assets/javascripts/header_search/index.js
+++ /dev/null
@@ -1,47 +0,0 @@
-import Vue from 'vue';
-import * as Sentry from '~/sentry/sentry_browser_wrapper';
-import Translate from '~/vue_shared/translate';
-import HeaderSearchApp from './components/app.vue';
-import createStore from './store';
-import { SEARCH_INPUT_FIELD_MAX_WIDTH } from './constants';
-
-Vue.use(Translate);
-
-export const initHeaderSearchApp = (search = '') => {
- const el = document.getElementById('js-header-search');
- const headerEl = document.querySelector('.header-content');
-
- if (!el || !headerEl) {
- return false;
- }
-
- const searchContainer = headerEl.querySelector('.global-search-container');
- const newHeader = headerEl.querySelector('.header-search');
-
- const { searchPath, issuesPath, mrPath, autocompletePath } = el.dataset;
- let { searchContext } = el.dataset;
-
- try {
- searchContext = JSON.parse(searchContext);
- newHeader.style.maxWidth = SEARCH_INPUT_FIELD_MAX_WIDTH;
- } catch (error) {
- Sentry.captureException(error);
- }
-
- return new Vue({
- el,
- store: createStore({ searchPath, issuesPath, mrPath, autocompletePath, searchContext, search }),
- render(createElement) {
- return createElement(HeaderSearchApp, {
- on: {
- expandSearchBar: () => {
- searchContainer.style.flexGrow = '1';
- },
- collapseSearchBar: () => {
- searchContainer.style.flexGrow = '0';
- },
- },
- });
- },
- });
-};