Skip to content

Commit

Permalink
Fix for Cancel Upload in the production main form.
Browse files Browse the repository at this point in the history
  • Loading branch information
cpojer committed Nov 14, 2012
1 parent 9578f1b commit 8bfc13f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion JavaScript/App/MainForm.js
Expand Up @@ -179,7 +179,9 @@ module.exports = new Class({
var cancelUpload = this.bound('cancelUpload');
object.addEvent('show:once', function() {
if (hasUpload) {
var cancelButton = object.toElement().getElement('.cancelUpload');
var label = object.toElement().getElement('.input_file_label');
var popover = label ? label.getInstanceOf(Popover) : null;
var cancelButton = popover ? popover.getPopover().getElement('.cancelUpload') : null;
if (cancelButton) cancelButton.addEvent('click', cancelUpload);
}
});
Expand Down

0 comments on commit 8bfc13f

Please sign in to comment.