mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 05:23:31 -07:00
Settings will load with zero notifications
This commit is contained in:
parent
07073be73c
commit
f25df49068
13 changed files with 69 additions and 83 deletions
|
@ -1,7 +0,0 @@
|
|||
<li>
|
||||
<div class="notification-item add-card x-add-card">
|
||||
<span class="center well">
|
||||
<i class="icon-plus" title="Add Notification"/>
|
||||
</span>
|
||||
</div>
|
||||
</li>
|
|
@ -1,5 +1,13 @@
|
|||
<div class="row">
|
||||
<div class="span12">
|
||||
<ul class="notifications"></ul>
|
||||
<ul class="notifications">
|
||||
<li>
|
||||
<div class="notification-item add-card x-add-card">
|
||||
<span class="center well">
|
||||
<i class="icon-plus" title="Add Notification"/>
|
||||
</span>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
|
@ -3,24 +3,24 @@ define([
|
|||
'app',
|
||||
'marionette',
|
||||
'Settings/Notifications/ItemView',
|
||||
'Settings/Notifications/SchemaModal'
|
||||
], function (App, Marionette, NotificationItemView, SchemaModal) {
|
||||
'Settings/Notifications/SchemaModal',
|
||||
'Settings/Notifications/AddCardView'
|
||||
], function (App, Marionette, NotificationItemView, SchemaModal, AddCardView) {
|
||||
return Marionette.CompositeView.extend({
|
||||
itemView : NotificationItemView,
|
||||
itemViewContainer: '.notifications',
|
||||
template : 'Settings/Notifications/CollectionTemplate',
|
||||
|
||||
ui: {
|
||||
'addCard': '.x-add-card'
|
||||
},
|
||||
|
||||
events: {
|
||||
'click .x-add-card': '_openSchemaModal'
|
||||
},
|
||||
|
||||
onRender: function () {
|
||||
this.listenTo(this.collection, 'add', this.render);
|
||||
|
||||
this.templateFunction = Marionette.TemplateCache.get('Settings/Notifications/AddCardTemplate');
|
||||
var html = this.templateFunction();
|
||||
|
||||
this.$itemViewContainer.append(html);
|
||||
appendHtml: function(collectionView, itemView, index){
|
||||
collectionView.ui.addCard.parent('li').before(itemView.el);
|
||||
},
|
||||
|
||||
_openSchemaModal: function () {
|
||||
|
|
|
@ -58,20 +58,8 @@
|
|||
}
|
||||
|
||||
&.add-card {
|
||||
.clickable;
|
||||
color: #adadad;
|
||||
font-size: 50px;
|
||||
text-align: center;
|
||||
|
||||
.center {
|
||||
display: inline-block;
|
||||
padding: 0px 20px;
|
||||
padding-top: 5px;
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
i {
|
||||
.clickable;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue