diff --git a/app/app/components/document/sidebar-zone.js b/app/app/components/document/sidebar-zone.js index 02b8b7f9..b8eaf8d3 100644 --- a/app/app/components/document/sidebar-zone.js +++ b/app/app/components/document/sidebar-zone.js @@ -16,6 +16,7 @@ import NotifierMixin from '../../mixins/notifier'; export default Ember.Component.extend(TooltipMixin, NotifierMixin, { documentService: Ember.inject.service('document'), sectionService: Ember.inject.service('section'), + sessionService: Ember.inject.service('session'), appMeta: Ember.inject.service(), userService: Ember.inject.service('user'), localStorage: Ember.inject.service(), @@ -138,6 +139,14 @@ export default Ember.Component.extend(TooltipMixin, NotifierMixin, { this.showNotification('Template saved'); this.attrs.onSaveTemplate(name, excerpt); + return true; + }, + + onLayoutChange(layout) { + let doc = this.get('document'); + doc.set('layout', layout); + this.get('documentService').save(doc); + return true; } } diff --git a/app/app/models/document.js b/app/app/models/document.js index b32b2545..91a6335d 100644 --- a/app/app/models/document.js +++ b/app/app/models/document.js @@ -25,6 +25,7 @@ export default Model.extend({ userId: attr('string'), tags: attr('string'), template: attr('boolean'), + layout: attr('string'), // client-side property selected: attr('boolean', { defaultValue: false }), diff --git a/app/app/styles/view/document/view.scss b/app/app/styles/view/document/view.scss index f8e18d4a..06f5dc03 100644 --- a/app/app/styles/view/document/view.scss +++ b/app/app/styles/view/document/view.scss @@ -51,7 +51,7 @@ @include content-container(); @include ease-in(); @extend .transition-all; - overflow-x: scroll; + overflow-x: auto; &:hover { .page-title { @@ -329,6 +329,28 @@ } } +.document-view-unified { + margin: 0 0 50px 0; + @include content-container(); + @include ease-in(); + @extend .transition-all; + + .is-a-page, .is-a-tab { + padding: 0 !important; + box-shadow: none !important; + background-color: transparent !important; + @include border-radius(0px); + } + + .tab-min, .tab-max { + padding: 0 !important; + } + + .start-section { + height: 50px !important; + } +} + .dropdown-page-toolbar { width: 300px; } diff --git a/app/app/templates/components/document/document-view.hbs b/app/app/templates/components/document/document-view.hbs index 6ac64126..fea2ca70 100644 --- a/app/app/templates/components/document/document-view.hbs +++ b/app/app/templates/components/document/document-view.hbs @@ -1,4 +1,4 @@ -
+
{{#if hasPages}} {{#each pages key="id" as |page index|}} diff --git a/app/app/templates/components/document/sidebar-zone.hbs b/app/app/templates/components/document/sidebar-zone.hbs index 825efb15..316c1a79 100644 --- a/app/app/templates/components/document/sidebar-zone.hbs +++ b/app/app/templates/components/document/sidebar-zone.hbs @@ -43,6 +43,13 @@ {{#dropdown-menu target="sidebar-zone-more-button" position="bottom left" open="click" onOpenCallback=(action 'onMenuOpen') onCloseCallback=(action 'onMenuOpen')}}