Radarr/src/UI/Settings/Notifications/CollectionView.js
Mark McDowall 99f2b07a11 Bootstrap 3
New: Updated UI
New: Mobile browser support
Fixed: /favicon.ico will return the favicon now
2014-05-11 15:57:33 -07:00

28 lines
810 B
JavaScript

'use strict';
define([
'marionette',
'Settings/Notifications/NotificationsItemView',
'Settings/Notifications/SchemaModal'
], function (Marionette, NotificationItemView, SchemaModal) {
return Marionette.CompositeView.extend({
itemView : NotificationItemView,
itemViewContainer: '.notifications',
template : 'Settings/Notifications/CollectionTemplate',
ui: {
'addCard': '.x-add-card'
},
events: {
'click .x-add-card': '_openSchemaModal'
},
appendHtml: function(collectionView, itemView, index){
collectionView.ui.addCard.parent('li').before(itemView.el);
},
_openSchemaModal: function () {
SchemaModal.open(this.collection);
}
});
});