Commit c7cecae6 authored by Phil Hughes's avatar Phil Hughes

added eventhub to emit update tokens event

parent 7eabb7a9
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
/* global BoardService */ /* global BoardService */
import FilteredSearchBoards from './filtered_search_boards'; import FilteredSearchBoards from './filtered_search_boards';
import eventHub from './eventhub';
window.Vue = require('vue'); window.Vue = require('vue');
window.Vue.use(require('vue-resource')); window.Vue.use(require('vue-resource'));
...@@ -65,10 +66,10 @@ $(() => { ...@@ -65,10 +66,10 @@ $(() => {
this.filterManager = new FilteredSearchBoards(Store.filter, true); this.filterManager = new FilteredSearchBoards(Store.filter, true);
// Listen for updateTokens event // Listen for updateTokens event
this.$on('updateTokens', this.updateTokens); eventHub.$on('updateTokens', this.updateTokens);
}, },
beforeDestroy() { beforeDestroy() {
this.$off('updateTokens', this.updateTokens); eventHub.$off('updateTokens', this.updateTokens);
}, },
mounted () { mounted () {
Store.disabled = this.disabled; Store.disabled = this.disabled;
......
/* global Vue */ /* global Vue */
import eventHub from '../eventhub';
(() => { (() => {
const Store = gl.issueBoards.BoardsStore; const Store = gl.issueBoards.BoardsStore;
...@@ -54,7 +56,7 @@ ...@@ -54,7 +56,7 @@
Store.updateFiltersUrl(); Store.updateFiltersUrl();
gl.IssueBoardsApp.$emit('updateTokens'); eventHub.$emit('updateTokens');
}, },
labelStyle(label) { labelStyle(label) {
return { return {
......
import Vue from 'vue';
export default new Vue();
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