mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-09 04:22:30 +01:00
Fixed: Back/Cancel on add notification won't break saving settings
This commit is contained in:
parent
ebe42357c8
commit
6c5a5340b8
@ -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);
|
||||
},
|
||||
|
||||
|
@ -87,7 +87,7 @@
|
||||
{{/if}}
|
||||
|
||||
<button class="btn x-test">test <i class="x-test-icon icon-nd-test"/></button>
|
||||
<button class="btn" data-dismiss="modal">cancel</button>
|
||||
<button class="btn x-cancel">cancel</button>
|
||||
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-primary x-save">save</button>
|
||||
|
Loading…
Reference in New Issue
Block a user