mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
refactor modal to bind closing event at different time
this allows chaining modals after each other with closing events working
This commit is contained in:
@@ -40,17 +40,16 @@ export var View = Backbone.View.extend({
|
||||
this.visible = true;
|
||||
this.$el.fadeIn("fast");
|
||||
if (this.options.closing_events) {
|
||||
var self = this;
|
||||
$(document).on("keyup.ui-modal", e => {
|
||||
if (e.keyCode == 27) {
|
||||
self.hide(true);
|
||||
this.hide(true);
|
||||
}
|
||||
});
|
||||
this.$backdrop.on("click", () => {
|
||||
self.hide(true);
|
||||
});
|
||||
}
|
||||
}
|
||||
this.$backdrop.on("click", () => {
|
||||
this.hide(true);
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user