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

re #643

parent 21b7f6cf
No related branches found
No related tags found
No related merge requests found
......@@ -939,6 +939,7 @@ export default {
unlockObject: 'unlockObject',
addBookmark: 'addBookmark',
companionInfo: 'companionInfo',
companionError: 'companionError',
uploadImageForStructuralElement: 'uploadImageForStructuralElement',
deleteImageForStructuralElement: 'deleteImageForStructuralElement',
companionSuccess: 'companionSuccess',
......@@ -1080,14 +1081,22 @@ export default {
await this.unlockObject({ id: this.currentId, type: 'courseware-structural-elements' });
this.showElementDeleteDialog(false);
},
async deleteCurrentElement() {
deleteCurrentElement() {
let parent_id = this.structuralElement.relationships.parent.data.id;
this.showElementDeleteDialog(false);
await this.deleteStructuralElement({
this.companionInfo({ info: this.$gettext('Lösche Seite und alle darunter liegenden Elemente.') });
this.deleteStructuralElement({
id: this.currentId,
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);
});
},
async createElement() {
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.
Please register or to comment