mirror of
https://github.com/documize/community.git
synced 2025-07-22 06:39:43 +02:00
Move revisions to new ui framework
This commit is contained in:
parent
2042454e77
commit
3c81297fc6
19 changed files with 288 additions and 190 deletions
|
@ -21,7 +21,6 @@ export default Controller.extend(Notifier, {
|
|||
linkService: service('link'),
|
||||
router: service(),
|
||||
sidebarTab: 'toc',
|
||||
tab: 'content',
|
||||
queryParams: ['currentPageId', 'source'],
|
||||
|
||||
actions: {
|
||||
|
@ -29,15 +28,7 @@ export default Controller.extend(Notifier, {
|
|||
this.set('sidebarTab', tab);
|
||||
},
|
||||
|
||||
onTabChange(tab) {
|
||||
this.set('tab', tab);
|
||||
if (tab === 'content') {
|
||||
this.send('refresh');
|
||||
}
|
||||
},
|
||||
|
||||
onShowPage(pageId) {
|
||||
this.set('tab', 'content');
|
||||
this.get('browser').scrollTo(`#page-${pageId}`);
|
||||
},
|
||||
|
||||
|
@ -222,13 +213,6 @@ export default Controller.extend(Notifier, {
|
|||
});
|
||||
},
|
||||
|
||||
onRollback(pageId, revisionId) {
|
||||
this.get('documentService').rollbackPage(this.get('document.id'), pageId, revisionId).then(() => {
|
||||
this.set('tab', 'content');
|
||||
this.get('target._routerMicrolib').refresh();
|
||||
});
|
||||
},
|
||||
|
||||
onEditMeta() {
|
||||
if (!this.get('permissions.documentEdit')) return;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue