1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-26 00:29:47 +02:00

Revamp document view using new layout

New master page system and UI framework implemented on document view.

Sidebar contains ToC and Attachments.
This commit is contained in:
Harvey Kandola 2018-12-18 19:03:34 +00:00
parent b4b3dbcb4c
commit 7cdf97aa86
27 changed files with 348 additions and 263 deletions

View file

@ -18,6 +18,7 @@ import Component from '@ember/component';
export default Component.extend(Modals, Notifier, {
documentService: service('document'),
browserSvc: service('browser'),
appMeta: service(),
hasAttachments: notEmpty('files'),
canEdit: computed('permissions.documentEdit', 'document.protection', function() {
@ -114,6 +115,15 @@ export default Component.extend(Modals, Notifier, {
});
return true;
},
onExport() {
this.get('documentSvc').export({}).then((htmlExport) => {
this.get('browserSvc').downloadFile(htmlExport, this.get('space.slug') + '.html');
this.notifySuccess('Exported');
});
this.modalClose("#space-export-modal");
}
}
});

View file

@ -16,6 +16,7 @@ import tocUtil from '../../utils/toc';
import Component from '@ember/component';
export default Component.extend({
classNames: ["section"],
documentService: service('document'),
emptyState: computed('pages', function () {
return this.get('pages.length') === 0;