mirror of
https://github.com/documize/community.git
synced 2025-07-24 15:49:44 +02:00
WIP section editors UX
This commit is contained in:
parent
35947ffbfc
commit
57b3801f87
21 changed files with 210 additions and 308 deletions
|
@ -10,11 +10,9 @@
|
|||
// https://documize.com
|
||||
|
||||
import { inject as service } from '@ember/service';
|
||||
|
||||
import Controller from '@ember/controller';
|
||||
import NotifierMixin from '../../../mixins/notifier';
|
||||
|
||||
export default Controller.extend(NotifierMixin, {
|
||||
export default Controller.extend({
|
||||
documentService: service('document'),
|
||||
|
||||
actions: {
|
||||
|
@ -28,8 +26,6 @@ export default Controller.extend(NotifierMixin, {
|
|||
},
|
||||
|
||||
onAction(page, meta) {
|
||||
this.showNotification("Saved");
|
||||
|
||||
let model = {
|
||||
page: page.toJSON({ includeId: true }),
|
||||
meta: meta.toJSON({ includeId: true })
|
||||
|
@ -43,7 +39,7 @@ export default Controller.extend(NotifierMixin, {
|
|||
this.get('model.folder.id'),
|
||||
this.get('model.folder.slug'),
|
||||
this.get('model.document.id'),
|
||||
this.get('model.document.slug'),
|
||||
this.get('model.document.slug'),
|
||||
{ queryParams: { pageId: page.get('id')}});
|
||||
});
|
||||
},
|
||||
|
|
|
@ -31,13 +31,5 @@ export default Route.extend(AuthenticatedRouteMixin, {
|
|||
page: this.get('documentService').getPage(this.modelFor('document').document.get('id'), params.page_id),
|
||||
meta: this.get('documentService').getPageMeta(this.modelFor('document').document.get('id'), params.page_id)
|
||||
});
|
||||
},
|
||||
|
||||
activate() {
|
||||
$('body').addClass('background-color-off-white');
|
||||
},
|
||||
|
||||
deactivate() {
|
||||
$('body').removeClass('background-color-off-white');
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1,15 +1,9 @@
|
|||
<div class="zone-section-editor">
|
||||
<div class="page-container">
|
||||
<div id="page-content-wrapper">
|
||||
<div id="zone-document-content" class="zone-document-content">
|
||||
<div class="back-to-space">
|
||||
{{#link-to 'document.index' model.folder.id model.folder.slug model.document.id model.document.slug}}
|
||||
<i class="material-icons">arrow_back</i> {{model.document.name}}
|
||||
{{/link-to}}
|
||||
</div>
|
||||
{{document/document-heading document=model.document permissions=model.permissions}}
|
||||
{{document/document-editor document=model.document folder=model.folder page=model.page meta=model.meta onCancel=(action 'onCancel') onAction=(action 'onAction')}}
|
||||
</div>
|
||||
</div>
|
||||
{{layout/nav-bar}}
|
||||
|
||||
<div class="container">
|
||||
{{toolbar/for-document document=model.document spaces=model.folders space=model.folder permissions=model.permissions showTools=false showDocumentLink=true}}
|
||||
|
||||
<div class="mt-5">
|
||||
{{document/document-editor document=model.document folder=model.folder page=model.page meta=model.meta onCancel=(action 'onCancel') onAction=(action 'onAction')}}
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue