1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-22 22:15:17 -04:00

Cancelling adding an indexer will stop listening to save event

Fixed: Cancelling adding indexer will not break saving
This commit is contained in:
Mark McDowall
2014-01-29 21:52:50 -08:00
parent 1cae7293e7
commit cc66077943
3 changed files with 16 additions and 4 deletions
+9 -1
View File
@@ -18,7 +18,8 @@ define(
events: {
'click .x-save' : '_save',
'click .x-save-and-add': '_saveAndAdd'
'click .x-save-and-add': '_saveAndAdd',
'click .x-cancel' : '_cancel'
},
initialize: function (options) {
@@ -68,6 +69,13 @@ define(
self.ui.activity.empty();
});
}
},
_cancel: function () {
if (this.model.isNew()) {
this.model.destroy();
vent.trigger(vent.Commands.CloseModalCommand);
}
}
});