Skip to content

Commit

Permalink
Fix deferred form destructor
Browse files Browse the repository at this point in the history
  • Loading branch information
guerler committed Jun 19, 2017
1 parent 2c4c714 commit 2131213
Show file tree
Hide file tree
Showing 11 changed files with 57,229 additions and 51 deletions.
11 changes: 5 additions & 6 deletions client/galaxy/scripts/mvc/tool/tool-form-base.js
Expand Up @@ -22,18 +22,17 @@ define( [ 'utils/utils', 'utils/deferred', 'mvc/ui/ui-misc', 'mvc/form/form-view
});
}
// destroy dom elements
this.$el.on( 'remove', function() { self.remove() } );
this.$el.on( 'remove', function() { self._destroy() } );
},

/** Wait for deferred build processes before removal */
remove: function() {
window.console.log( 'destroy' );
_destroy: function() {
var self = this;
this.$el.hide();
/*this.deferred.execute( function() {
this.$el.off().hide();
this.deferred.execute( function() {
FormBase.prototype.remove.call( self );
Galaxy.emit.debug( 'tool-form-base::remove()', 'Destroy view.' );
});*/
});
},

/** Build form */
Expand Down
2 changes: 1 addition & 1 deletion static/maps/mvc/tool/tool-form-base.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2131213

Please sign in to comment.