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

Moved issue board components from being global

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