1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-09-19 16:01:46 +02:00
Radarr/UI/Shared/ModalRegion.js
kay.one 663160c06a removed backbone from VS solution,
renamed NzbDrone.Backbone to UI
2013-03-29 12:18:44 -07:00

29 lines
702 B
JavaScript

define(['app'], function () {
return Backbone.Marionette.Region.extend({
el: "#modal-region",
constructor: function () {
_.bindAll(this);
Backbone.Marionette.Region.prototype.constructor.apply(this, arguments);
this.on("show", this.showModal, this);
},
getEl: function (selector) {
var $el = $(selector);
$el.on("hidden", this.close);
return $el;
},
showModal: function (view) {
view.on("close", this.hideModal, this);
this.$el.modal('show');
},
hideModal: function () {
this.$el.modal('hide');
}
});
});