summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/issue_show/components/app.vue
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-05-22 09:13:49 +0100
committerPhil Hughes <me@iamphill.com>2017-05-22 09:13:49 +0100
commit16243985c2e2a44af91f6082c4d0f3b506d30cc5 (patch)
tree3006892f50a0b4879e8d70a1f725d94f3e898d7c /app/assets/javascripts/issue_show/components/app.vue
parent982ab8703e7f2979cb7ac01e08f31f429fe71f43 (diff)
parent3c3b17a5a4b4f85f3f81f918a7e0c3a57f469eb7 (diff)
downloadgitlab-ce-16243985c2e2a44af91f6082c4d0f3b506d30cc5.tar.gz
Merge branch 'issue-edit-inline' into issue-edit-inline-locked-warning
[ci skip]
Diffstat (limited to 'app/assets/javascripts/issue_show/components/app.vue')
-rw-r--r--app/assets/javascripts/issue_show/components/app.vue25
1 files changed, 19 insertions, 6 deletions
diff --git a/app/assets/javascripts/issue_show/components/app.vue b/app/assets/javascripts/issue_show/components/app.vue
index 3d5b0cb18f8..c08d3dee755 100644
--- a/app/assets/javascripts/issue_show/components/app.vue
+++ b/app/assets/javascripts/issue_show/components/app.vue
@@ -8,6 +8,7 @@ import Store from '../stores';
import titleComponent from './title.vue';
import descriptionComponent from './description.vue';
import formComponent from './form.vue';
+import '../../lib/utils/url_utility';
export default {
props: {
@@ -15,6 +16,10 @@ export default {
required: true,
type: String,
},
+ canMove: {
+ required: true,
+ type: Boolean,
+ },
canUpdate: {
required: true,
type: Boolean,
@@ -53,6 +58,10 @@ export default {
type: String,
required: true,
},
+ projectsAutocompleteUrl: {
+ type: String,
+ required: true,
+ },
},
data() {
const store = new Store({
@@ -85,6 +94,7 @@ export default {
title: this.state.titleText,
confidential: this.isConfidential,
description: this.state.descriptionText,
+ move_to_project_id: 0,
});
}
},
@@ -93,11 +103,12 @@ export default {
},
updateIssuable() {
this.service.updateIssuable(this.store.formState)
- .then((res) => {
- const data = res.json();
-
- if (data.confidential !== this.isConfidential) {
- location.reload();
+ .then(res => res.json())
+ .then((data) => {
+ if (location.pathname !== data.path) {
+ gl.utils.visitUrl(data.path);
+ } else if (data.confidential !== this.isConfidential) {
+ gl.utils.visitUrl(location.pathname);
}
eventHub.$emit('close.form');
@@ -173,9 +184,11 @@ export default {
<form-component
v-if="canUpdate && showForm"
:form-state="formState"
+ :can-move="canMove"
:can-destroy="canDestroy"
:markdown-docs="markdownDocs"
- :markdown-preview-url="markdownPreviewUrl" />
+ :markdown-preview-url="markdownPreviewUrl"
+ :projects-autocomplete-url="projectsAutocompleteUrl" />
<div v-else>
<title-component
:issuable-ref="issuableRef"