Commit 0af391d2 authored by Constance Okoghenun's avatar Constance Okoghenun

Refactored use of boards/boards_bundle.js, created a dipatcher import

parent 02d9f54f
...@@ -24,7 +24,7 @@ import './components/new_list_dropdown'; ...@@ -24,7 +24,7 @@ import './components/new_list_dropdown';
import './components/modal/index'; import './components/modal/index';
import '../vue_shared/vue_resource_interceptor'; import '../vue_shared/vue_resource_interceptor';
$(() => { export default function initBoards() {
const $boardApp = document.getElementById('board-app'); const $boardApp = document.getElementById('board-app');
const Store = gl.issueBoards.BoardsStore; const Store = gl.issueBoards.BoardsStore;
const ModalStore = gl.issueBoards.ModalStore; const ModalStore = gl.issueBoards.ModalStore;
...@@ -236,4 +236,4 @@ $(() => { ...@@ -236,4 +236,4 @@ $(() => {
</div> </div>
`, `,
}); });
}); }
...@@ -180,6 +180,11 @@ var Dispatcher; ...@@ -180,6 +180,11 @@ var Dispatcher;
.then(callDefault) .then(callDefault)
.catch(fail); .catch(fail);
break; break;
case 'projects:boards:index':
import('./pages/projects/boards')
.then(callDefault)
.catch(fail);
break;
case 'projects:issues:new': case 'projects:issues:new':
import('./pages/projects/issues/new') import('./pages/projects/issues/new')
.then(callDefault) .then(callDefault)
......
import UsersSelect from '~/users_select'; import UsersSelect from '~/users_select';
import ShortcutsNavigation from '~/shortcuts_navigation'; import ShortcutsNavigation from '~/shortcuts_navigation';
import initBoards from '~/boards';
document.addEventListener('DOMContentLoaded', () => { export default () => {
new UsersSelect(); // eslint-disable-line no-new new UsersSelect(); // eslint-disable-line no-new
new ShortcutsNavigation(); // eslint-disable-line no-new new ShortcutsNavigation(); // eslint-disable-line no-new
}); initBoards();
};
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
- content_for :page_specific_javascripts do - content_for :page_specific_javascripts do
= webpack_bundle_tag 'common_vue' = webpack_bundle_tag 'common_vue'
= webpack_bundle_tag 'filtered_search' = webpack_bundle_tag 'filtered_search'
= webpack_bundle_tag 'boards'
%script#js-board-template{ type: "text/x-template" }= render "shared/boards/components/board" %script#js-board-template{ type: "text/x-template" }= render "shared/boards/components/board"
%script#js-board-modal-filter{ type: "text/x-template" }= render "shared/issuable/search_bar", type: :boards_modal %script#js-board-modal-filter{ type: "text/x-template" }= render "shared/issuable/search_bar", type: :boards_modal
......
...@@ -51,7 +51,6 @@ var config = { ...@@ -51,7 +51,6 @@ var config = {
account: './profile/account/index.js', account: './profile/account/index.js',
balsamiq_viewer: './blob/balsamiq_viewer.js', balsamiq_viewer: './blob/balsamiq_viewer.js',
blob: './blob_edit/blob_bundle.js', blob: './blob_edit/blob_bundle.js',
boards: './boards/boards_bundle.js',
common: './commons/index.js', common: './commons/index.js',
common_vue: './vue_shared/vue_resource_interceptor.js', common_vue: './vue_shared/vue_resource_interceptor.js',
cycle_analytics: './cycle_analytics/cycle_analytics_bundle.js', cycle_analytics: './cycle_analytics/cycle_analytics_bundle.js',
......
...@@ -113,7 +113,7 @@ if (process.env.BABEL_ENV === 'coverage') { ...@@ -113,7 +113,7 @@ if (process.env.BABEL_ENV === 'coverage') {
// exempt these files from the coverage report // exempt these files from the coverage report
const troubleMakers = [ const troubleMakers = [
'./blob_edit/blob_bundle.js', './blob_edit/blob_bundle.js',
'./boards/boards_bundle.js', './boards/index.js',
'./cycle_analytics/cycle_analytics_bundle.js', './cycle_analytics/cycle_analytics_bundle.js',
'./cycle_analytics/components/stage_plan_component.js', './cycle_analytics/components/stage_plan_component.js',
'./cycle_analytics/components/stage_staging_component.js', './cycle_analytics/components/stage_staging_component.js',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment