Skip to content
Snippets Groups Projects
Commit 7db0ed60 authored by Ron Lucke's avatar Ron Lucke Committed by Jan-Hendrik Willms
Browse files

fix #960

Closes #960

Merge request studip/studip!555
parent a9c387a3
No related branches found
No related tags found
No related merge requests found
...@@ -381,7 +381,7 @@ ...@@ -381,7 +381,7 @@
@confirm="publishCurrentElement" @confirm="publishCurrentElement"
> >
<template v-slot:dialogContent> <template v-slot:dialogContent>
<form class="default" @submit.prevent=""> <form v-show="!oerExportRunning" class="default" @submit.prevent="">
<fieldset> <fieldset>
<legend><translate>Grunddaten</translate></legend> <legend><translate>Grunddaten</translate></legend>
<label> <label>
...@@ -419,6 +419,11 @@ ...@@ -419,6 +419,11 @@
</label> </label>
</fieldset> </fieldset>
</form> </form>
<courseware-companion-box
v-show="oerExportRunning"
:msgCompanion="$gettext('Export läuft, bitte haben sie einen Moment Geduld...')"
mood="pointing"
/>
</template> </template>
</studip-dialog> </studip-dialog>
<studip-dialog <studip-dialog
...@@ -520,6 +525,7 @@ export default { ...@@ -520,6 +525,7 @@ export default {
}, },
exportRunning: false, exportRunning: false,
exportChildren: false, exportChildren: false,
oerExportRunning: false,
oerChildren: true, oerChildren: true,
containerList: [], containerList: [],
consumModeTrap: false, consumModeTrap: false,
...@@ -1062,7 +1068,13 @@ export default { ...@@ -1062,7 +1068,13 @@ export default {
}, },
async publishCurrentElement() { async publishCurrentElement() {
this.exportToOER(this.currentElement, { withChildren: this.oerChildren }); if (this.oerExportRunning) {
return;
}
this.oerExportRunning = true;
await this.exportToOER(this.currentElement, { withChildren: this.oerChildren });
this.oerExportRunning = false;
this.showElementOerDialog(false);
}, },
async closeDeleteDialog() { async closeDeleteDialog() {
......
...@@ -187,6 +187,9 @@ export default { ...@@ -187,6 +187,9 @@ export default {
headers: { "Content-Type": "multipart/form-data"} headers: { "Content-Type": "multipart/form-data"}
}).then( () => { }).then( () => {
this.companionInfo({ info: this.$gettextInterpolate('Die Seite wurde an %{ oerTitle } gesendet.', {oerTitle: this.oerTitle}) }); this.companionInfo({ info: this.$gettextInterpolate('Die Seite wurde an %{ oerTitle } gesendet.', {oerTitle: this.oerTitle}) });
}).catch(error => {
this.companionError({ info: this.$gettext('Beim Veröffentlichen der Seite ist ein Fehler aufgetreten.') });
console.debug(error);
}); });
}, },
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment