Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorRegis <boudinot.regis@yahoo.com>2017-05-05 20:07:19 +0300
committerRegis <boudinot.regis@yahoo.com>2017-05-05 20:07:19 +0300
commit541c8da0103d008471b8c6389451e6370a3992f3 (patch)
treefbe1757f4ca0be65ccb509c7eb5a5296336ce30a /app
parent62f7b206b936bbd58d3f18021df37920a5c34ddd (diff)
make toggle switch for flags
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/issue_show/issue_title_description.vue16
1 files changed, 8 insertions, 8 deletions
diff --git a/app/assets/javascripts/issue_show/issue_title_description.vue b/app/assets/javascripts/issue_show/issue_title_description.vue
index 9dc02bbee7f..dc3ba2550c5 100644
--- a/app/assets/javascripts/issue_show/issue_title_description.vue
+++ b/app/assets/javascripts/issue_show/issue_title_description.vue
@@ -51,6 +51,10 @@ export default {
};
},
methods: {
+ updateFlag(key, toggle) {
+ this[key].pre = toggle;
+ this[key].pulse = !toggle;
+ },
renderResponse(res) {
this.apiData = res.json();
this.triggerAnimation();
@@ -61,8 +65,7 @@ export default {
elementsToVisualize(noTitleChange, noDescriptionChange) {
if (!noTitleChange) {
this.titleText = this.apiData.title_text;
- this.titleFlag.pre = true;
- this.titleFlag.pulse = false;
+ this.updateFlag('titleFlag', true);
}
if (!noDescriptionChange) {
@@ -70,8 +73,7 @@ export default {
this.descriptionChange = true;
this.updateTaskHTML();
this.tasks = this.apiData.task_status;
- this.descriptionFlag.pre = true;
- this.descriptionFlag.pulse = false;
+ this.updateFlag('descriptionFlag', true);
}
},
setTabTitle() {
@@ -85,10 +87,8 @@ export default {
this.setTabTitle();
this.$nextTick(() => {
- this.titleFlag.pre = false;
- this.titleFlag.pulse = true;
- this.descriptionFlag.pre = false;
- this.descriptionFlag.pulse = true;
+ this.updateFlag('titleFlag', false);
+ this.updateFlag('descriptionFlag', false);
});
},
triggerAnimation() {