app/assets/javascripts/pageflow/editor/views/file_item_view.js in pageflow-0.2.1 vs app/assets/javascripts/pageflow/editor/views/file_item_view.js in pageflow-0.3.0
- old
+ new
@@ -21,11 +21,12 @@
downloadLink: 'a.original'
},
events: {
'click .select': function() {
- this.$el.trigger('file-selected', this.model);
+ this.options.selectionHandler.call(this.model);
+ pageflow.editor.navigate(this.options.selectionHandler.getReferer(), {trigger: true});
return false;
},
'click .cancel': 'cancel',
@@ -69,10 +70,10 @@
this.ui.rights.attr('placeholder', pageflow.entry.get('default_file_rights'));
this.ui.downloadLink.attr('href', this.model.get('url'));
this.ui.downloads.toggle(this.model.isUploaded());
- this.ui.selectButton.toggle(this.options.selectable);
+ this.ui.selectButton.toggle(!!this.options.selectionHandler);
this.ui.cancelButton.toggle(this.model.isUploading());
this.ui.removeButton.toggle(!this.model.isUploading());
this.ui.retryButton.toggle(this.model.isRetryable());