Add edit-content buttons and states
This commit is contained in:
@@ -14,6 +14,11 @@ export default Controller.extend({
|
||||
|
||||
queryParams: ['path'],
|
||||
|
||||
documentIsEditable: computed.not('model.documentMetaData.isBinary'),
|
||||
|
||||
documentShowEditor: false,
|
||||
documentHideEditor: computed.not('documentShowEditor'),
|
||||
|
||||
documentIsJSON: computed('model.documentMetaData.type', function(){
|
||||
if (isEmpty(this.get('model.documentMetaData'))) { return false; }
|
||||
|
||||
@@ -46,6 +51,16 @@ export default Controller.extend({
|
||||
this.set('jsonView', 'source');
|
||||
},
|
||||
|
||||
showEditor () {
|
||||
this.set('documentShowEditor', true);
|
||||
// TODO init editing
|
||||
},
|
||||
|
||||
cancelEditor () {
|
||||
this.set('documentShowEditor', false);
|
||||
// TODO remove changes from tree/source
|
||||
},
|
||||
|
||||
toggleMetadata () {
|
||||
this.toggleProperty('metadataHidden');
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user