Commit 034932ef authored by Phil Hughes's avatar Phil Hughes

Moved issue board components from being global

parent 808dc2f2
......@@ -5,7 +5,8 @@
//= require_tree ./stores
//= require_tree ./services
//= require_tree ./mixins
//= require_tree ./components
//= require ./components/board
//= require ./components/new_list_dropdown
$(() => {
const $boardApp = $('#board-app');
......@@ -18,6 +19,9 @@ $(() => {
gl.IssueBoardsApp = new Vue({
el: $boardApp.get(0),
components: {
'board': gl.issueBoards.Board
},
data: {
state: gl.issueBoards.BoardsStore.state,
loading: true,
......
//= require ./board_blank_state
//= require ./board_delete
//= require ./board_list
(() => {
const Board = Vue.extend({
window.gl = window.gl || {};
window.gl.issueBoards = window.gl.issueBoards || {};
gl.issueBoards.Board = Vue.extend({
components: {
'board-list': gl.issueBoards.BoardList,
'board-delete': gl.issueBoards.BoardDelete,
'board-blank-state': gl.issueBoards.BoardBlankState
},
props: {
list: Object,
disabled: Boolean,
......@@ -67,6 +79,4 @@
this.sortable.destroy();
}
});
Vue.component('board', Board)
})();
(() => {
const BoardBlankState = Vue.extend({
window.gl = window.gl || {};
window.gl.issueBoards = window.gl.issueBoards || {};
gl.issueBoards.BoardBlankState = Vue.extend({
data () {
return {
predefinedLabels: [
......@@ -49,6 +52,4 @@
}
}
});
Vue.component('board-blank-state', BoardBlankState);
})();
(() => {
const BoardCard = Vue.extend({
window.gl = window.gl || {};
window.gl.issueBoards = window.gl.issueBoards || {};
gl.issueBoards.BoardCard = Vue.extend({
props: {
list: Object,
issue: Object,
......@@ -34,6 +37,4 @@
}
}
});
Vue.component('board-card', BoardCard);
})();
(() => {
const BoardDelete = Vue.extend({
window.gl = window.gl || {};
window.gl.issueBoards = window.gl.issueBoards || {};
gl.issueBoards.BoardDelete = Vue.extend({
props: {
list: Object
},
......@@ -14,6 +17,4 @@
}
}
});
Vue.component('board-delete', BoardDelete);
})();
//= require ./board_card
(() => {
const BoardList = Vue.extend({
window.gl = window.gl || {};
window.gl.issueBoards = window.gl.issueBoards || {};
gl.issueBoards.BoardList = Vue.extend({
components: {
'board-card': gl.issueBoards.BoardCard
},
props: {
disabled: Boolean,
list: Object,
......@@ -78,6 +86,4 @@
this.sortable.destroy();
}
});
Vue.component('board-list', BoardList);
})();
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