1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-25 08:09:43 +02:00

switch to doc content view when clicking on TOC entry

This commit is contained in:
Harvey Kandola 2017-12-19 14:00:53 +00:00
parent 44970a7861
commit 8b05e7ab81
8 changed files with 16 additions and 8 deletions

View file

@ -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 });
}

View file

@ -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');

View file

@ -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();
},