removed backbone from VS solution,

renamed NzbDrone.Backbone to UI
This commit is contained in:
kay.one 2013-03-29 12:18:44 -07:00
commit 663160c06a
230 changed files with 57 additions and 386 deletions

28
UI/Shared/ModalRegion.js Normal file
View 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');
}
});
});