mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-16 10:03:51 -07:00
splited MVC and nancy application
backbone app is now fully served from nancy including css,js,html
This commit is contained in:
parent
fd4ffa0fa2
commit
7093f352fe
184 changed files with 497 additions and 1959 deletions
|
@ -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());
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue