Skip to content

Commit

Permalink
Merge pull request #857 from aviav/switch-off-edit-links-while-uploading
Browse files Browse the repository at this point in the history
Switch off file meta data edit links when uploading
  • Loading branch information
tf authored Sep 6, 2017
2 parents 948dc17 + ffdf0eb commit b3d492b
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,13 @@ pageflow.FileMetaDataItemValueView = Backbone.Marionette.ItemView.extend({
}
},

modelEvents: {
'change': 'toggleEditLink'
},

onRender: function() {
this.listenTo(this.model, 'change:' + this.options.name, this.update);
this.ui.editLink.toggle(!!this.options.settingsDialogTabLink);
this.toggleEditLink();

this.update();
},
Expand All @@ -45,5 +49,10 @@ pageflow.FileMetaDataItemValueView = Backbone.Marionette.ItemView.extend({

getText: function() {
throw new Error('Not implemented');
},

toggleEditLink: function() {
this.ui.editLink.toggle(!!this.options.settingsDialogTabLink &&
!this.model.isNew());
}
});

0 comments on commit b3d492b

Please sign in to comment.