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

Allow inline doc title/desc editing

This commit is contained in:
sauls8t 2018-10-23 13:47:00 +01:00
parent f950075593
commit 313ed7f90a
2 changed files with 9 additions and 2 deletions

View file

@ -21,8 +21,9 @@ export default Controller.extend(Tooltips, Notifier, {
templateService: service('template'),
sectionService: service('section'),
linkService: service('link'),
router: service(),
tab: 'content',
queryParams: ['currentPageId'],
queryParams: ['currentPageId', 'source'],
showRevisions: computed('permissions', 'document.protection', function() {
if (!this.get('session.viewUsers')) return false;
if (this.get('document.protection') === this.get('constants').ProtectionType.None) return true;
@ -237,6 +238,12 @@ export default Controller.extend(Tooltips, Notifier, {
});
},
onEditMeta() {
if (!this.get('permissions.documentEdit')) return;
this.get('router').transitionTo('document.settings', {queryParams: {tab: 'general'}});
},
refresh(reloadPage) {
return new EmberPromise((resolve) => {
this.get('documentService').fetchDocumentData(this.get('document.id')).then((data) => {