Commit ab7bfff0 authored by Phil Hughes's avatar Phil Hughes

Make changing the URL optional - future proof ourselves for the modal window

parent 107c39a6
/* eslint-disable one-var, quote-props, comma-dangle, space-before-function-paren */ /* eslint-disable one-var, quote-props, comma-dangle, space-before-function-paren, no-new */
/* global Vue */ /* global Vue */
/* global BoardService */ /* global BoardService */
import FilteredSearchBoards from './filtered_search_boards';
window.Vue = require('vue'); window.Vue = require('vue');
window.Vue.use(require('vue-resource')); window.Vue.use(require('vue-resource'));
import FilteredSearchBoards from './filtered_search_boards';
require('./models/issue'); require('./models/issue');
require('./models/label'); require('./models/label');
require('./models/list'); require('./models/list');
...@@ -61,7 +62,7 @@ $(() => { ...@@ -61,7 +62,7 @@ $(() => {
created () { created () {
gl.boardService = new BoardService(this.endpoint, this.bulkUpdatePath, this.boardId); gl.boardService = new BoardService(this.endpoint, this.bulkUpdatePath, this.boardId);
new FilteredSearchBoards(Store.filter); new FilteredSearchBoards(Store.filter, true);
}, },
mounted () { mounted () {
Store.disabled = this.disabled; Store.disabled = this.disabled;
......
export default class FilteredSearchBoards extends gl.FilteredSearchManager { export default class FilteredSearchBoards extends gl.FilteredSearchManager {
constructor(store) { constructor(store, updateUrl = false) {
super('boards'); super('boards');
this.store = store; this.store = store;
this.updateUrl = updateUrl;
this.isHandledAsync = true; this.isHandledAsync = true;
} }
updateObject(path) { updateObject(path) {
this.store.path = path.substr(1); this.store.path = path.substr(1);
if (this.updateUrl) {
gl.issueBoards.BoardsStore.updateFiltersUrl(); gl.issueBoards.BoardsStore.updateFiltersUrl();
} }
}
} }
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