diff --git a/gui/app/components/document/document-toc.js b/gui/app/components/document/document-toc.js index ad7b9425..89d2f56a 100644 --- a/gui/app/components/document/document-toc.js +++ b/gui/app/components/document/document-toc.js @@ -250,7 +250,8 @@ export default Component.extend({ onEntryClick(id) { if (id !== '') { let jumpTo = "#page-" + id; - + this.set('tab', 'content'); + if (!$(jumpTo).inView()) { $(jumpTo).velocity("scroll", { duration: 250, offset: -100 }); } diff --git a/gui/app/components/document/page-heading.js b/gui/app/components/document/page-heading.js index 22dbea43..78cc49d4 100644 --- a/gui/app/components/document/page-heading.js +++ b/gui/app/components/document/page-heading.js @@ -102,7 +102,6 @@ export default Component.extend(ModalMixin, { this.attrs.onSavePageAsBlock(block); - this.set('menuOpen', false); this.set('blockTitle', ''); this.set('blockExcerpt', ''); $(titleElem).removeClass('is-invalid'); diff --git a/gui/app/components/document/view-content.js b/gui/app/components/document/view-content.js index d2650de7..269af626 100644 --- a/gui/app/components/document/view-content.js +++ b/gui/app/components/document/view-content.js @@ -43,7 +43,9 @@ export default Component.extend(TooltipMixin, { this._super(...arguments); this.setupAddWizard(); - this.attrs.onGotoPage(this.get('pageId')); + if (this.attrs.onGotoPage !== null) { + this.attrs.onGotoPage(this.get('pageId')); + } this.renderTooltips(); }, diff --git a/gui/app/pods/document/index/controller.js b/gui/app/pods/document/index/controller.js index 9d507467..eea3a626 100644 --- a/gui/app/pods/document/index/controller.js +++ b/gui/app/pods/document/index/controller.js @@ -204,6 +204,7 @@ export default Controller.extend(TooltipMixin, { onGotoPage(id) { if (id !== '') { this.set('pageId', id); + this.set('tab', 'content'); let jumpTo = "#page-" + id; if (!$(jumpTo).inView()) { diff --git a/gui/app/pods/document/index/template.hbs b/gui/app/pods/document/index/template.hbs index d4b4f1eb..72d4893e 100644 --- a/gui/app/pods/document/index/template.hbs +++ b/gui/app/pods/document/index/template.hbs @@ -15,7 +15,7 @@
- {{document/document-toc document=document folder=folder pages=pages page=page permissions=permissions currentPageId=pageId + {{document/document-toc document=document folder=folder pages=pages page=page permissions=permissions currentPageId=pageId tab=tab onPageSequenceChange=(action 'onPageSequenceChange') onPageLevelChange=(action 'onPageLevelChange') onGotoPage=(action 'onGotoPage')}}
@@ -26,8 +26,10 @@ diff --git a/gui/app/pods/document/route.js b/gui/app/pods/document/route.js index b69b0d76..7508ebf8 100644 --- a/gui/app/pods/document/route.js +++ b/gui/app/pods/document/route.js @@ -10,7 +10,6 @@ // https://documize.com import { Promise as EmberPromise, hash } from 'rsvp'; - import { inject as service } from '@ember/service'; import Route from '@ember/routing/route'; import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin'; diff --git a/gui/app/styles/view/document/doc-structure.scss b/gui/app/styles/view/document/doc-structure.scss index 82f3426a..44bc59a0 100644 --- a/gui/app/styles/view/document/doc-structure.scss +++ b/gui/app/styles/view/document/doc-structure.scss @@ -24,3 +24,7 @@ } } } + +.section-divider { + margin-top: 70px; +} \ No newline at end of file diff --git a/gui/app/styles/widget/widget-tabnav.scss b/gui/app/styles/widget/widget-tabnav.scss index fe1bffd5..519afd05 100644 --- a/gui/app/styles/widget/widget-tabnav.scss +++ b/gui/app/styles/widget/widget-tabnav.scss @@ -17,8 +17,8 @@ cursor: pointer; line-height: 26px; list-style-type: none; - // margin: -1px 0 0 -5px; // handles border overlap when tabs wrap onto 2nd line margin-left: -4px; // remove whitespace inline block + margin-top: -1px; // ensure no double-border when tabs are stacked vertically on mobile device &:first-of-type { @include border-radius-left(3px);