Commit 5297397f authored by Lucas Détré's avatar Lucas Détré

Merge branch '7-actualiser-modification' into 'vue-editor'

Resolve "Actualiser la page de la règle quand une modification est soumise"

See merge request !31
parents 5d07fb68 72956fbf
Pipeline #2397 passed with stage
in 1 minute and 29 seconds
......@@ -37,7 +37,10 @@
</div>
</div>
<div v-else class="text-center loading-gif">
<img src="./../assets/images/loading.gif" alt="loading...">
<div v-if="modificationInProgress" class="mt-5">
<h2>Modification en cours...</h2>
</div>
<img src="./../assets/images/loading.gif" alt="loading...">
</div>
</div>
</div>
......@@ -61,6 +64,7 @@
rerenderKey: 0,
collapsed: false,
currentRuleName: decodeURI(window.location.hash).split('#').pop() == "modified" ? decodeURI(window.location.hash).split('#')[1]:decodeURI(window.location.hash).split('#').pop(),
inProgressModification : false,
}
},
computed: {
......
......@@ -230,6 +230,8 @@
};
},
save: function() {
this.$parent.isLoading = true;
this.$parent.modificationInProgress = true;
this.ruleData = this.content
if (this.comment == '') {
this.error_flags.noResume = true;
......@@ -280,6 +282,10 @@
this.error_flags.notModified = false;
}
return false;
}).then(()=> {
this.$parent.isLoading = false;
this.$parent.modificationInProgress = false;
location.reload();
});
},
toTree: function (lines) { // eslint-disable-line no-unused-vars
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment