summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-01-26 11:41:43 +0000
committerFatih Acet <acetfatih@gmail.com>2017-02-03 17:02:43 +0300
commit76264cc01c112590454a19690bd5abb1ed4db7dc (patch)
treed91a5148ca97486561cdd7528ecb3e58f6b7695c /app
parentff98a7434ffe848738228cd51d9deee3b8373d91 (diff)
downloadgitlab-ce-76264cc01c112590454a19690bd5abb1ed4db7dc.tar.gz
Reloads issues when re-opening modal
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/boards/components/issue_card_inner.js.es63
-rw-r--r--app/assets/javascripts/boards/components/modal/empty_state.js.es63
-rw-r--r--app/assets/javascripts/boards/components/modal/footer.js.es63
-rw-r--r--app/assets/javascripts/boards/components/modal/header.js.es63
-rw-r--r--app/assets/javascripts/boards/components/modal/index.js.es66
-rw-r--r--app/assets/javascripts/boards/components/modal/list.js.es63
-rw-r--r--app/assets/javascripts/boards/components/modal/lists_dropdown.js.es613
-rw-r--r--app/assets/javascripts/boards/components/modal/tabs.js.es63
-rw-r--r--app/assets/javascripts/boards/stores/modal_store.js.es63
9 files changed, 5 insertions, 35 deletions
diff --git a/app/assets/javascripts/boards/components/issue_card_inner.js.es6 b/app/assets/javascripts/boards/components/issue_card_inner.js.es6
index 6a7e9419503..b7eeb5e04c9 100644
--- a/app/assets/javascripts/boards/components/issue_card_inner.js.es6
+++ b/app/assets/javascripts/boards/components/issue_card_inner.js.es6
@@ -2,9 +2,6 @@
(() => {
const Store = gl.issueBoards.BoardsStore;
- window.gl = window.gl || {};
- window.gl.issueBoards = window.gl.issueBoards || {};
-
gl.issueBoards.IssueCardInner = Vue.extend({
props: [
'issue', 'issueLinkBase', 'list',
diff --git a/app/assets/javascripts/boards/components/modal/empty_state.js.es6 b/app/assets/javascripts/boards/components/modal/empty_state.js.es6
index efea12ef7d8..689504f397c 100644
--- a/app/assets/javascripts/boards/components/modal/empty_state.js.es6
+++ b/app/assets/javascripts/boards/components/modal/empty_state.js.es6
@@ -2,9 +2,6 @@
(() => {
const ModalStore = gl.issueBoards.ModalStore;
- window.gl = window.gl || {};
- window.gl.issueBoards = window.gl.issueBoards || {};
-
gl.issueBoards.ModalEmptyState = Vue.extend({
data() {
return ModalStore.store;
diff --git a/app/assets/javascripts/boards/components/modal/footer.js.es6 b/app/assets/javascripts/boards/components/modal/footer.js.es6
index 9d60d59bcb1..51a9444ee61 100644
--- a/app/assets/javascripts/boards/components/modal/footer.js.es6
+++ b/app/assets/javascripts/boards/components/modal/footer.js.es6
@@ -3,9 +3,6 @@
(() => {
const ModalStore = gl.issueBoards.ModalStore;
- window.gl = window.gl || {};
- window.gl.issueBoards = window.gl.issueBoards || {};
-
gl.issueBoards.ModalFooter = Vue.extend({
data() {
return ModalStore.store;
diff --git a/app/assets/javascripts/boards/components/modal/header.js.es6 b/app/assets/javascripts/boards/components/modal/header.js.es6
index f6acfed9270..d7d896e3be1 100644
--- a/app/assets/javascripts/boards/components/modal/header.js.es6
+++ b/app/assets/javascripts/boards/components/modal/header.js.es6
@@ -3,9 +3,6 @@
(() => {
const ModalStore = gl.issueBoards.ModalStore;
- window.gl = window.gl || {};
- window.gl.issueBoards = window.gl.issueBoards || {};
-
gl.issueBoards.IssuesModalHeader = Vue.extend({
data() {
return ModalStore.store;
diff --git a/app/assets/javascripts/boards/components/modal/index.js.es6 b/app/assets/javascripts/boards/components/modal/index.js.es6
index 30fe66703b7..a6718e899f7 100644
--- a/app/assets/javascripts/boards/components/modal/index.js.es6
+++ b/app/assets/javascripts/boards/components/modal/index.js.es6
@@ -6,9 +6,6 @@
(() => {
const ModalStore = gl.issueBoards.ModalStore;
- window.gl = window.gl || {};
- window.gl.issueBoards = window.gl.issueBoards || {};
-
gl.issueBoards.IssuesModal = Vue.extend({
props: [
'blankStateImage', 'newIssuePath',
@@ -28,6 +25,9 @@
.then(() => {
this.loading = false;
});
+ } else if (!this.showAddIssuesModal) {
+ this.issues = [];
+ this.selectedIssues = [];
}
},
},
diff --git a/app/assets/javascripts/boards/components/modal/list.js.es6 b/app/assets/javascripts/boards/components/modal/list.js.es6
index 8180f200649..6a681d9278f 100644
--- a/app/assets/javascripts/boards/components/modal/list.js.es6
+++ b/app/assets/javascripts/boards/components/modal/list.js.es6
@@ -5,9 +5,6 @@
let listMasonry;
const ModalStore = gl.issueBoards.ModalStore;
- window.gl = window.gl || {};
- window.gl.issueBoards = window.gl.issueBoards || {};
-
gl.issueBoards.ModalList = Vue.extend({
data() {
return ModalStore.store;
diff --git a/app/assets/javascripts/boards/components/modal/lists_dropdown.js.es6 b/app/assets/javascripts/boards/components/modal/lists_dropdown.js.es6
index e68ad30500c..b205c019a31 100644
--- a/app/assets/javascripts/boards/components/modal/lists_dropdown.js.es6
+++ b/app/assets/javascripts/boards/components/modal/lists_dropdown.js.es6
@@ -1,16 +1,12 @@
/* global Vue */
(() => {
const ModalStore = gl.issueBoards.ModalStore;
- const Store = gl.issueBoards.BoardsStore;
-
- window.gl = window.gl || {};
- window.gl.issueBoards = window.gl.issueBoards || {};
gl.issueBoards.ModalFooterListsDropdown = Vue.extend({
data() {
return {
modal: ModalStore.store,
- state: Store.state,
+ state: gl.issueBoards.BoardsStore.state,
};
},
computed: {
@@ -18,11 +14,6 @@
return this.modal.selectedList;
},
},
- methods: {
- selectList(list) {
- this.modal.selectedList = list;
- },
- },
template: `
<div class="dropdown inline">
<button
@@ -46,7 +37,7 @@
href="#"
role="button"
:class="{ 'is-active': list.id == selected.id }"
- @click="selectList(list)">
+ @click="modal.selectedList = list">
<span
class="dropdown-label-box"
:style="{ backgroundColor: list.label.color }">
diff --git a/app/assets/javascripts/boards/components/modal/tabs.js.es6 b/app/assets/javascripts/boards/components/modal/tabs.js.es6
index fecd92f70ba..94ff8ec999a 100644
--- a/app/assets/javascripts/boards/components/modal/tabs.js.es6
+++ b/app/assets/javascripts/boards/components/modal/tabs.js.es6
@@ -2,9 +2,6 @@
(() => {
const ModalStore = gl.issueBoards.ModalStore;
- window.gl = window.gl || {};
- window.gl.issueBoards = window.gl.issueBoards || {};
-
gl.issueBoards.ModalTabs = Vue.extend({
data() {
return ModalStore.store;
diff --git a/app/assets/javascripts/boards/stores/modal_store.js.es6 b/app/assets/javascripts/boards/stores/modal_store.js.es6
index 54419751433..b5d183b1bf4 100644
--- a/app/assets/javascripts/boards/stores/modal_store.js.es6
+++ b/app/assets/javascripts/boards/stores/modal_store.js.es6
@@ -1,7 +1,4 @@
(() => {
- window.gl = window.gl || {};
- window.gl.issueBoards = window.gl.issueBoards || {};
-
class ModalStore {
constructor() {
this.store = {