1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-22 06:39:43 +02:00

Provide each doc section with TOC controls

Put up/down/indent/outdent options on the section menu dropdown for easier TOC manipulation.
This commit is contained in:
Harvey Kandola 2018-06-01 11:49:09 +01:00
parent d5157615e0
commit 716bd062d7
9 changed files with 333 additions and 138 deletions

View file

@ -198,19 +198,25 @@ export default Controller.extend(Tooltips, Notifier, {
},
onPageSequenceChange(currentPageId, changes) {
this.showWait();
this.set('currentPageId', currentPageId);
this.get('documentService').changePageSequence(this.get('document.id'), changes).then(() => {
this.get('documentService').fetchPages(this.get('document.id'), this.get('session.user.id')).then( (pages) => {
this.set('pages', pages);
this.showDone();
});
});
},
onPageLevelChange(currentPageId, changes) {
this.showWait();
this.set('currentPageId', currentPageId);
this.get('documentService').changePageLevel(this.get('document.id'), changes).then(() => {
this.get('documentService').fetchPages(this.get('document.id'), this.get('session.user.id')).then( (pages) => {
this.set('pages', pages);
this.showDone();
});
});
},