|
|
@ -49,8 +49,8 @@ define([
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
_test: function () {
|
|
|
|
_test: function () {
|
|
|
|
var command = this.model.get('command');
|
|
|
|
var testCommand = this.model.get('testCommand');
|
|
|
|
if (command) {
|
|
|
|
if (testCommand) {
|
|
|
|
this.idle = false;
|
|
|
|
this.idle = false;
|
|
|
|
this.ui.testButton.addClass('disabled');
|
|
|
|
this.ui.testButton.addClass('disabled');
|
|
|
|
this.ui.testIcon.removeClass('icon-question');
|
|
|
|
this.ui.testIcon.removeClass('icon-question');
|
|
|
@ -58,12 +58,12 @@ define([
|
|
|
|
|
|
|
|
|
|
|
|
var properties = {};
|
|
|
|
var properties = {};
|
|
|
|
|
|
|
|
|
|
|
|
_.each(this.model.attributes.fields, function (field) {
|
|
|
|
_.each(this.model.get('fields'), function (field) {
|
|
|
|
properties[field.name] = field.value;
|
|
|
|
properties[field.name] = field.value;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
var self = this;
|
|
|
|
var self = this;
|
|
|
|
var commandPromise = NzbDrone.Commands.Execute(command, properties);
|
|
|
|
var commandPromise = NzbDrone.Commands.Execute(testCommand, properties);
|
|
|
|
commandPromise.done(function () {
|
|
|
|
commandPromise.done(function () {
|
|
|
|
NzbDrone.Shared.Messenger.show({
|
|
|
|
NzbDrone.Shared.Messenger.show({
|
|
|
|
message: 'Notification settings tested successfully'
|
|
|
|
message: 'Notification settings tested successfully'
|
|
|
|