mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-23 22:25:14 -04:00
Fixed: Error messages not being shown in the UI or being shown in the wrong place
This commit is contained in:
@@ -22,13 +22,18 @@ define([
|
||||
'click .x-save-and-add': '_saveAndAdd',
|
||||
'click .x-delete' : '_delete',
|
||||
'click .x-back' : '_back',
|
||||
'click .x-test' : '_test'
|
||||
'click .x-close' : '_close',
|
||||
'click .x-test' : '_test'
|
||||
},
|
||||
|
||||
initialize: function (options) {
|
||||
this.targetCollection = options.targetCollection;
|
||||
},
|
||||
|
||||
onBeforeClose: function () {
|
||||
window.alert('closing down!');
|
||||
},
|
||||
|
||||
_save: function () {
|
||||
var self = this;
|
||||
var promise = this.model.save();
|
||||
@@ -67,6 +72,19 @@ define([
|
||||
require('Settings/Indexers/Add/IndexerSchemaModal').open(this.targetCollection);
|
||||
},
|
||||
|
||||
_close: function () {
|
||||
|
||||
if (this.model.isNew()) {
|
||||
this.model.destroy();
|
||||
}
|
||||
|
||||
else {
|
||||
this.model.fetch();
|
||||
}
|
||||
|
||||
vent.trigger(vent.Commands.CloseModalCommand);
|
||||
},
|
||||
|
||||
_test: function () {
|
||||
var testCommand = 'test{0}'.format(this.model.get('implementation'));
|
||||
var properties = {};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<button type="button" class="close x-close" aria-hidden="true">×</button>
|
||||
{{#if id}}
|
||||
<h3>Edit - {{implementation}}</h3>
|
||||
{{else}}
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
<!-- Testing is currently not yet supported for indexers, but leaving the infrastructure for later -->
|
||||
<!-- <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-close">cancel</button>
|
||||
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-primary x-save">save</button>
|
||||
|
||||
Reference in New Issue
Block a user