Skip to content
Snippets Groups Projects
Commit 69a3aafb authored by Ron Lucke's avatar Ron Lucke Committed by David Siegfried
Browse files

biest-643

parent 1decbd1c
No related branches found
No related tags found
No related merge requests found
...@@ -1064,6 +1064,7 @@ export default { ...@@ -1064,6 +1064,7 @@ export default {
unlockObject: 'unlockObject', unlockObject: 'unlockObject',
addBookmark: 'addBookmark', addBookmark: 'addBookmark',
companionInfo: 'companionInfo', companionInfo: 'companionInfo',
companionError: 'companionError',
uploadImageForStructuralElement: 'uploadImageForStructuralElement', uploadImageForStructuralElement: 'uploadImageForStructuralElement',
deleteImageForStructuralElement: 'deleteImageForStructuralElement', deleteImageForStructuralElement: 'deleteImageForStructuralElement',
companionSuccess: 'companionSuccess', companionSuccess: 'companionSuccess',
...@@ -1247,15 +1248,22 @@ export default { ...@@ -1247,15 +1248,22 @@ export default {
await this.unlockObject({ id: this.currentId, type: 'courseware-structural-elements' }); await this.unlockObject({ id: this.currentId, type: 'courseware-structural-elements' });
this.showElementDeleteDialog(false); this.showElementDeleteDialog(false);
}, },
async deleteCurrentElement() { deleteCurrentElement() {
let parent_id = this.structuralElement.relationships.parent.data.id; let parent_id = this.structuralElement.relationships.parent.data.id;
this.showElementDeleteDialog(false); this.showElementDeleteDialog(false);
await this.deleteStructuralElement({ this.companionInfo({ info: this.$gettext('Lösche Seite und alle darunter liegenden Elemente.') });
this.deleteStructuralElement({
id: this.currentId, id: this.currentId,
parentId: this.structuralElement.relationships.parent.data.id, parentId: this.structuralElement.relationships.parent.data.id,
})
.then(response => {
this.$router.push(parent_id);
this.companionInfo({ info: this.$gettext('Die Seite wurde gelöscht.') });
})
.catch(error => {
this.companionError({ info: this.$gettext('Die Seite konnte nicht gelöscht werden.') });
console.debug(error);
}); });
this.$router.push(parent_id);
this.companionInfo({ info: this.$gettext('Die Seite wurde gelöscht.') });
}, },
async createElement() { async createElement() {
let title = this.newChapterName; // this is the title of the new element let title = this.newChapterName; // this is the title of the new element
......
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