diff --git a/src/UI/Settings/Notifications/NotificationEditView.js b/src/UI/Settings/Notifications/NotificationEditView.js
index 161ebde96..f36caa448 100644
--- a/src/UI/Settings/Notifications/NotificationEditView.js
+++ b/src/UI/Settings/Notifications/NotificationEditView.js
@@ -27,6 +27,7 @@ define(
'click .x-delete' : '_deleteNotification',
'click .x-back' : '_back',
'click .x-test' : '_test',
+ 'click .x-cancel' : '_cancel',
'change .x-on-download': '_onDownloadChanged'
},
@@ -63,12 +64,23 @@ define(
}
},
+ _cancel: function () {
+ if (this.model.isNew()) {
+ this.model.destroy();
+ vent.trigger(vent.Commands.CloseModalCommand);
+ }
+ },
+
_deleteNotification: function () {
var view = new DeleteView({ model: this.model });
AppLayout.modalRegion.show(view);
},
_back: function () {
+ if (this.model.isNew()) {
+ this.model.destroy();
+ }
+
require('Settings/Notifications/SchemaModal').open(this.notificationCollection);
},
diff --git a/src/UI/Settings/Notifications/NotificationEditViewTemplate.html b/src/UI/Settings/Notifications/NotificationEditViewTemplate.html
index e6abfa829..1676b8755 100644
--- a/src/UI/Settings/Notifications/NotificationEditViewTemplate.html
+++ b/src/UI/Settings/Notifications/NotificationEditViewTemplate.html
@@ -87,7 +87,7 @@
{{/if}}
-
+
diff --git a/src/UI/Settings/SettingsLayoutTemplate.html b/src/UI/Settings/SettingsLayoutTemplate.html
index 62ee238fb..f5717ede2 100644
--- a/src/UI/Settings/SettingsLayoutTemplate.html
+++ b/src/UI/Settings/SettingsLayoutTemplate.html
@@ -11,8 +11,8 @@
diff --git a/src/UI/vent.js b/src/UI/vent.js
index 121edb83f..c50fc358d 100644
--- a/src/UI/vent.js
+++ b/src/UI/vent.js
@@ -8,11 +8,11 @@ define(
var vent = new Backbone.Wreqr.EventAggregator();
vent.Events = {
- SeriesAdded : 'series:added',
- SeriesDeleted : 'series:deleted',
- CommandComplete : 'command:complete',
- ServerUpdated : 'server:updated',
- EpisodeFileDeleted: 'episodefile:deleted'
+ SeriesAdded : 'series:added',
+ SeriesDeleted : 'series:deleted',
+ CommandComplete : 'command:complete',
+ ServerUpdated : 'server:updated',
+ EpisodeFileDeleted : 'episodefile:deleted'
};
vent.Commands = {