summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-02-13 12:53:55 +0000
committerPhil Hughes <me@iamphill.com>2017-02-13 12:53:55 +0000
commit3c4ff902ff4132875c4c27e47edf04f606fd6b65 (patch)
tree746027734998045f2124e7910c0cc367dad6ba60
parent6df65983393d33476a75595317487075a1fba414 (diff)
downloadgitlab-ce-3c4ff902ff4132875c4c27e47edf04f606fd6b65.tar.gz
Obly hides the help box if the close button is clicked or if issues are added
-rw-r--r--app/assets/javascripts/boards/boards_bundle.js.es62
-rw-r--r--app/assets/javascripts/boards/components/boards_backlog_help.js.es67
-rw-r--r--app/assets/javascripts/boards/components/modal/footer.js.es62
-rw-r--r--app/assets/javascripts/boards/components/modal/header.js.es62
-rw-r--r--app/assets/javascripts/boards/mixins/modal_mixins.js.es68
5 files changed, 13 insertions, 8 deletions
diff --git a/app/assets/javascripts/boards/boards_bundle.js.es6 b/app/assets/javascripts/boards/boards_bundle.js.es6
index 1fd5ed948aa..0df72023107 100644
--- a/app/assets/javascripts/boards/boards_bundle.js.es6
+++ b/app/assets/javascripts/boards/boards_bundle.js.es6
@@ -111,7 +111,7 @@ $(() => {
class="btn btn-create pull-right prepend-left-10 has-tooltip"
type="button"
:disabled="disabled"
- @click="toggleModal(true)">
+ @click="toggleModal(true, false)">
Add issues
</button>
`,
diff --git a/app/assets/javascripts/boards/components/boards_backlog_help.js.es6 b/app/assets/javascripts/boards/components/boards_backlog_help.js.es6
index d712c8a1501..832fb91a272 100644
--- a/app/assets/javascripts/boards/components/boards_backlog_help.js.es6
+++ b/app/assets/javascripts/boards/components/boards_backlog_help.js.es6
@@ -24,7 +24,10 @@ module.exports = Vue.extend({
class="close"
aria-label="Close backlog help"
@click="toggleModal(false)">
- <i class="fa fa-times"></i>
+ <i
+ class="fa fa-times"
+ aria-hidden="true">
+ </i>
</button>
</h4>
<div class="backlog-help-icon">${checkmarkIcon}</div>
@@ -39,7 +42,7 @@ module.exports = Vue.extend({
class="btn btn-success"
type="button"
:disabled="disabled"
- @click="toggleModal(true)">
+ @click="toggleModal(true, false)">
Add issues
</button>
</div>
diff --git a/app/assets/javascripts/boards/components/modal/footer.js.es6 b/app/assets/javascripts/boards/components/modal/footer.js.es6
index 1cbc422c961..5a2887552df 100644
--- a/app/assets/javascripts/boards/components/modal/footer.js.es6
+++ b/app/assets/javascripts/boards/components/modal/footer.js.es6
@@ -74,7 +74,7 @@ require('./lists_dropdown');
<button
class="btn btn-default pull-right"
type="button"
- @click="toggleModal(false)">
+ @click="toggleModal(false, false)">
Cancel
</button>
</footer>
diff --git a/app/assets/javascripts/boards/components/modal/header.js.es6 b/app/assets/javascripts/boards/components/modal/header.js.es6
index 70c088f9054..99f9da104fe 100644
--- a/app/assets/javascripts/boards/components/modal/header.js.es6
+++ b/app/assets/javascripts/boards/components/modal/header.js.es6
@@ -57,7 +57,7 @@ const modalFilters = require('./filters');
class="close"
data-dismiss="modal"
aria-label="Close"
- @click="toggleModal(false)">
+ @click="toggleModal(false, false)">
<span aria-hidden="true">×</span>
</button>
</h2>
diff --git a/app/assets/javascripts/boards/mixins/modal_mixins.js.es6 b/app/assets/javascripts/boards/mixins/modal_mixins.js.es6
index 6c41113eda9..abc1eb333fd 100644
--- a/app/assets/javascripts/boards/mixins/modal_mixins.js.es6
+++ b/app/assets/javascripts/boards/mixins/modal_mixins.js.es6
@@ -5,10 +5,12 @@
gl.issueBoards.ModalMixins = {
methods: {
- toggleModal(toggleModal) {
- Cookies.set('boards_backlog_help_hidden', true);
+ toggleModal(toggleModal, setCookie = true) {
+ if (setCookie) {
+ Cookies.set('boards_backlog_help_hidden', true);
+ Store.state.helpHidden = true;
+ }
- Store.state.helpHidden = true;
ModalStore.store.showAddIssuesModal = toggleModal;
},
changeTab(tab) {