mirror of
https://github.com/documize/community.git
synced 2025-07-20 05:39:42 +02:00
parent
99a5418dba
commit
8baad7e2f0
22 changed files with 229 additions and 102 deletions
|
@ -18,17 +18,23 @@ export default Component.extend({
|
|||
editMode: false,
|
||||
editPage: null,
|
||||
editMeta: null,
|
||||
expanded: true,
|
||||
|
||||
didReceiveAttrs() {
|
||||
this._super(...arguments);
|
||||
|
||||
if (this.get('isDestroyed') || this.get('isDestroying')) return;
|
||||
|
||||
let pageId = this.get('page.id');
|
||||
|
||||
if (this.get('session.authenticated')) {
|
||||
this.workflow();
|
||||
}
|
||||
|
||||
if (this.get('toEdit') === this.get('page.id') && this.get('permissions.documentEdit')) this.send('onEdit');
|
||||
if (this.get('toEdit') === pageId && this.get('permissions.documentEdit')) this.send('onEdit');
|
||||
|
||||
// Work out if this section is expanded by default (state stored in browser local storage).
|
||||
this.set('expanded', !_.includes(this.get('expandState'), pageId));
|
||||
},
|
||||
|
||||
workflow() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue