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"});
|
||||
},
|
||||
error: function(jqXHR, textStatus, errorThrown) {
|
||||
var error = "<p>" + _.sprintf(gettext("The command \"%(command)s\" could not be executed."), {command: action.name}) + "</p>";
|
||||
error += pnotifyAdditionalInfo("<pre>" + jqXHR.responseText + "</pre>");
|
||||
new PNotify({title: gettext("Error"), text: error, type: "error", hide: false});
|
||||
if (!action.hasOwnProperty("ignore") || !action.ignore) {
|
||||
var error = "<p>" + _.sprintf(gettext("The command \"%(command)s\" could not be executed."), {command: action.name}) + "</p>";
|
||||
error += pnotifyAdditionalInfo("<pre>" + jqXHR.responseText + "</pre>");
|
||||
new PNotify({title: gettext("Error"), text: error, type: "error", hide: false});
|
||||
}
|
||||
}
|
||||
})
|
||||
};
|
||||
if (action.confirm) {
|
||||
showConfirmationDialog(action.confirm, function (e) {
|
||||
callback();
|
||||
callback();
|
||||
});
|
||||
} else {
|
||||
callback();
|
||||
|
|
@ -49,4 +51,4 @@ $(function() {
|
|||
["loginStateViewModel", "appearanceViewModel", "settingsViewModel", "userSettingsViewModel"],
|
||||
"#navbar"
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue