mirror of
https://github.com/documize/community.git
synced 2025-08-04 21:15:24 +02:00
switch to doc content view when clicking on TOC entry
This commit is contained in:
parent
44970a7861
commit
8b05e7ab81
8 changed files with 16 additions and 8 deletions
|
@ -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()) {
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
{{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')}}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -26,8 +26,10 @@
|
|||
<ul class="tabnav-control">
|
||||
<li class="tab {{if (eq tab 'content') 'selected'}}" {{action 'onTabChange' 'content'}}>Content</li>
|
||||
<li class="tab {{if (eq tab 'attachment') 'selected'}}" {{action 'onTabChange' 'attachment'}}>Attachments</li>
|
||||
<li class="tab {{if (eq tab 'activity') 'selected'}}" {{action 'onTabChange' 'activity'}}>Activity</li>
|
||||
<li class="tab {{if (eq tab 'revision') 'selected'}}" {{action 'onTabChange' 'revision'}}>Revisions</li>
|
||||
{{#if session.authenticated}}
|
||||
<li class="tab {{if (eq tab 'activity') 'selected'}}" {{action 'onTabChange' 'activity'}}>Activity</li>
|
||||
<li class="tab {{if (eq tab 'revision') 'selected'}}" {{action 'onTabChange' 'revision'}}>Revisions</li>
|
||||
{{/if}}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -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';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue