Purdy Add Notifications

This commit is contained in:
Mark McDowall 2013-05-26 22:27:33 -07:00
parent 8dee1e00e5
commit ff29ab9150
6 changed files with 38 additions and 7 deletions

View File

@ -16,7 +16,7 @@ namespace NzbDrone.Core.Notifications.Smtp
public override string Name
{
get { return "SMTP"; }
get { return "Email"; }
}
public override void OnGrab(string message)

View File

@ -19,6 +19,7 @@
<link href="/series/series.css" rel='stylesheet' type='text/css'/>
<link href="/series/details.css" rel='stylesheet' type='text/css'/>
<link href="/content/base.css" rel='stylesheet' type='text/css'/>
<link href="/settings/notifications/notifications.css" rel='stylesheet' type='text/css'/>
</head>
<body>
<div id="in-sub-nav">

View File

@ -1 +1,7 @@
{{name}}
<div class="add-notification-item span3">
<div class="row">
<div class="span3">
{{name}}
</div>
</div>
</div>

View File

@ -3,8 +3,8 @@
<h3>Add Notification</h3>
</div>
<div class="modal-body">
<div class="form-horizontal">
<div id="notifications-to-add" class="btn-group"></div>
<div class="notifications">
<ul class="items"></ul>
</div>
</div>
<div class="modal-footer">

View File

@ -8,8 +8,7 @@ define([
NzbDrone.Settings.Notifications.AddItemView = Backbone.Marionette.ItemView.extend({
template : 'Settings/Notifications/AddItemTemplate',
tagName : 'button',
className: 'btn',
tagName : 'li',
events: {
'click': 'addNotification'
@ -17,6 +16,7 @@ define([
addNotification: function () {
this.model.set('id', undefined);
this.model.set('name', '');
var view = new NzbDrone.Settings.Notifications.EditView({ model: this.model});
NzbDrone.modalRegion.show(view);
}
@ -24,7 +24,7 @@ define([
NzbDrone.Settings.Notifications.AddView = Backbone.Marionette.CompositeView.extend({
itemView : NzbDrone.Settings.Notifications.AddItemView,
itemViewContainer : '#notifications-to-add',
itemViewContainer : '.notifications .items',
template : 'Settings/Notifications/AddTemplate'
});
});

View File

@ -0,0 +1,24 @@
@import "../../shared/Styles/card.less";
.add-notification-item {
.card;
cursor: pointer;
font-size: 24px;
font-weight: lighter;
text-align: center;
}
.notifications {
text-align: center;
.items {
list-style-type: none;
margin: 0px;
li {
display: inline-block;
vertical-align: top;
}
}
}