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
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-05-18 19:37:37 +0300
committerPhil Hughes <me@iamphill.com>2017-05-18 19:37:37 +0300
commit982ab8703e7f2979cb7ac01e08f31f429fe71f43 (patch)
tree953e60bf4106723d8e8cf14d6c6b205ea3c46d93 /app/assets/javascripts/issue_show
parent6a14a51525beddcdaac99f5350964df80ae868a6 (diff)
Added specs for testing when warning is visible
[ci skip]
Diffstat (limited to 'app/assets/javascripts/issue_show')
-rw-r--r--app/assets/javascripts/issue_show/components/form.vue11
-rw-r--r--app/assets/javascripts/issue_show/components/locked_warning.vue14
2 files changed, 8 insertions, 17 deletions
diff --git a/app/assets/javascripts/issue_show/components/form.vue b/app/assets/javascripts/issue_show/components/form.vue
index e53860a77af..db80bc09be0 100644
--- a/app/assets/javascripts/issue_show/components/form.vue
+++ b/app/assets/javascripts/issue_show/components/form.vue
@@ -1,5 +1,4 @@
<script>
- import eventHub from '../event_hub';
import lockedWarning from './locked_warning.vue';
import titleField from './fields/title.vue';
import descriptionField from './fields/description.vue';
@@ -32,20 +31,12 @@
editActions,
confidentialCheckbox,
},
- methods: {
- closeForm() {
- eventHub.$emit('close.form');
- this.formState.lockedWarningVisible = false;
- },
- },
};
</script>
<template>
<form>
- <locked-warning
- v-if="formState.lockedWarningVisible"
- @closeForm="closeForm" />
+ <locked-warning v-if="formState.lockedWarningVisible" />
<title-field
:form-state="formState" />
<confidential-checkbox
diff --git a/app/assets/javascripts/issue_show/components/locked_warning.vue b/app/assets/javascripts/issue_show/components/locked_warning.vue
index b9960b4e5f2..c31bb80d782 100644
--- a/app/assets/javascripts/issue_show/components/locked_warning.vue
+++ b/app/assets/javascripts/issue_show/components/locked_warning.vue
@@ -1,8 +1,8 @@
<script>
export default {
- methods: {
- closeForm() {
- this.$emit('closeForm');
+ computed: {
+ currentPath() {
+ return location.pathname;
},
},
};
@@ -10,11 +10,11 @@
<template>
<div class="alert alert-danger">
- Someone edited the issue the same time you did. Please check out
+ Someone edited the issue at the same time you did. Please check out
<a
- href="#"
- role="button"
- @click.prevent="closeForm">the issue</a>
+ :href="currentPath"
+ target="_blank"
+ role="button">the issue</a>
and make sure your changes will not unintentionally remove theirs.
</div>
</template>