System commands with ignore set to true also ignore http errors
This commit is contained in:
parent
a580482c29
commit
1a7193e113
1 changed files with 7 additions and 5 deletions
|
|
@ -28,15 +28,17 @@ $(function() {
|
||||||
new PNotify({title: "Success", text: _.sprintf(gettext("The command \"%(command)s\" executed successfully"), {command: action.name}), type: "success"});
|
new PNotify({title: "Success", text: _.sprintf(gettext("The command \"%(command)s\" executed successfully"), {command: action.name}), type: "success"});
|
||||||
},
|
},
|
||||||
error: function(jqXHR, textStatus, errorThrown) {
|
error: function(jqXHR, textStatus, errorThrown) {
|
||||||
var error = "<p>" + _.sprintf(gettext("The command \"%(command)s\" could not be executed."), {command: action.name}) + "</p>";
|
if (!action.hasOwnProperty("ignore") || !action.ignore) {
|
||||||
error += pnotifyAdditionalInfo("<pre>" + jqXHR.responseText + "</pre>");
|
var error = "<p>" + _.sprintf(gettext("The command \"%(command)s\" could not be executed."), {command: action.name}) + "</p>";
|
||||||
new PNotify({title: gettext("Error"), text: error, type: "error", hide: false});
|
error += pnotifyAdditionalInfo("<pre>" + jqXHR.responseText + "</pre>");
|
||||||
|
new PNotify({title: gettext("Error"), text: error, type: "error", hide: false});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
if (action.confirm) {
|
if (action.confirm) {
|
||||||
showConfirmationDialog(action.confirm, function (e) {
|
showConfirmationDialog(action.confirm, function (e) {
|
||||||
callback();
|
callback();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
callback();
|
callback();
|
||||||
|
|
@ -49,4 +51,4 @@ $(function() {
|
||||||
["loginStateViewModel", "appearanceViewModel", "settingsViewModel", "userSettingsViewModel"],
|
["loginStateViewModel", "appearanceViewModel", "settingsViewModel", "userSettingsViewModel"],
|
||||||
"#navbar"
|
"#navbar"
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue