summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/boards/components/modal
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-01-31 14:35:53 +0000
committerFatih Acet <acetfatih@gmail.com>2017-02-03 17:02:44 +0300
commit103c78f18c0642c36a6093508707b82eb8d1dd77 (patch)
treea4be3ccb885e5e615c88777364d1412ca004427b /app/assets/javascripts/boards/components/modal
parent32a97ef19c9adf30bd67bb310551dff883231dbc (diff)
downloadgitlab-ce-103c78f18c0642c36a6093508707b82eb8d1dd77.tar.gz
Removes labels instead of closing issue when clicking remove button
Diffstat (limited to 'app/assets/javascripts/boards/components/modal')
-rw-r--r--app/assets/javascripts/boards/components/modal/empty_state.js.es62
-rw-r--r--app/assets/javascripts/boards/components/modal/footer.js.es610
-rw-r--r--app/assets/javascripts/boards/components/modal/header.js.es62
-rw-r--r--app/assets/javascripts/boards/components/modal/index.js.es65
4 files changed, 7 insertions, 12 deletions
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 c5137d966e2..93d250e07f5 100644
--- a/app/assets/javascripts/boards/components/modal/empty_state.js.es6
+++ b/app/assets/javascripts/boards/components/modal/empty_state.js.es6
@@ -44,7 +44,7 @@
:href="newIssuePath"
class="btn btn-success btn-inverted"
v-if="activeTab === 'all'">
- Create issue
+ New issue
</a>
<button
type="button"
diff --git a/app/assets/javascripts/boards/components/modal/footer.js.es6 b/app/assets/javascripts/boards/components/modal/footer.js.es6
index 2ed81abe625..4c0f21fa1d6 100644
--- a/app/assets/javascripts/boards/components/modal/footer.js.es6
+++ b/app/assets/javascripts/boards/components/modal/footer.js.es6
@@ -4,9 +4,6 @@
const ModalStore = gl.issueBoards.ModalStore;
gl.issueBoards.ModalFooter = Vue.extend({
- props: [
- 'bulkUpdatePath',
- ],
data() {
return ModalStore.store;
},
@@ -30,11 +27,8 @@
const issueIds = selectedIssues.map(issue => issue.globalId);
// Post the data to the backend
- this.$http.post(this.bulkUpdatePath, {
- update: {
- issuable_ids: issueIds.join(','),
- add_label_ids: [list.label.id],
- },
+ gl.boardService.bulkUpdate(issueIds, {
+ add_label_ids: [list.label.id],
});
// Add the issues on the frontend
diff --git a/app/assets/javascripts/boards/components/modal/header.js.es6 b/app/assets/javascripts/boards/components/modal/header.js.es6
index 8024e89a29b..4a1845e4580 100644
--- a/app/assets/javascripts/boards/components/modal/header.js.es6
+++ b/app/assets/javascripts/boards/components/modal/header.js.es6
@@ -13,7 +13,7 @@
return 'Select all';
}
- return 'Un-select all';
+ return 'Deselect all';
},
},
methods: {
diff --git a/app/assets/javascripts/boards/components/modal/index.js.es6 b/app/assets/javascripts/boards/components/modal/index.js.es6
index 4536f5cfe6f..612657753d5 100644
--- a/app/assets/javascripts/boards/components/modal/index.js.es6
+++ b/app/assets/javascripts/boards/components/modal/index.js.es6
@@ -9,7 +9,7 @@
gl.issueBoards.IssuesModal = Vue.extend({
props: [
- 'blankStateImage', 'newIssuePath', 'bulkUpdatePath', 'issueLinkBase',
+ 'blankStateImage', 'newIssuePath', 'issueLinkBase',
'rootPath',
],
data() {
@@ -33,6 +33,7 @@
} else if (!this.showAddIssuesModal) {
this.issues = [];
this.selectedIssues = [];
+ this.issuesCount = false;
}
},
},
@@ -101,7 +102,7 @@
<i class="fa fa-spinner fa-spin"></i>
</div>
</section>
- <modal-footer :bulk-update-path="bulkUpdatePath"></modal-footer>
+ <modal-footer></modal-footer>
</div>
</div>
`,