splited MVC and nancy application

backbone app is now fully served from nancy including css,js,html
This commit is contained in:
kay.one 2013-02-17 18:10:21 -08:00
parent fd4ffa0fa2
commit 7093f352fe
184 changed files with 497 additions and 1959 deletions

View file

@ -1,40 +0,0 @@
define(['app', 'Shared/NotificationCollection'], function (app, notificationCollection) {
var notificationItemView = Backbone.Marionette.ItemView.extend({
template: 'Shared/NotificationTemplate',
events: {
'click .x-close': 'kill'
},
kill: function () {
var self = this;
$.Deferred(function () {
self.$el.slideUp('slow');
}).done(function () {
self.model.destroy();
});
}
});
var collectionView = Backbone.Marionette.CollectionView.extend({
itemView: notificationItemView,
initialize: function () {
this.collection = notificationCollection;
}
});
NzbDrone.addInitializer(function () {
console.log('initializing notification view');
NzbDrone.notificationRegion.show(new collectionView());
});
});