mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
removed backbone from VS solution,
renamed NzbDrone.Backbone to UI
This commit is contained in:
parent
c7776f74e1
commit
663160c06a
230 changed files with 57 additions and 386 deletions
28
UI/Shared/ModalRegion.js
Normal file
28
UI/Shared/ModalRegion.js
Normal file
|
@ -0,0 +1,28 @@
|
|||
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');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue