$("#modalDialog").modal("hide");
}
function save_map_error(rspamd, serv, jqXHR, textStatus, errorThrown) {
+ var serv_name = (typeof serv === "string") ? serv : serv.name;
rspamd.alertMessage("alert-modal alert-error", "Save map error on " +
- serv.name + ": " + errorThrown);
+ serv_name + ": " + errorThrown);
}
// @upload map from modal
function saveMap(rspamd, action, id) {
var id = $(form).attr("id");
var data = $("#" + id).find("textarea").val();
rspamd.query(action, {
- success: save_map_success,
- error: save_map_error,
+ success: function () {
+ save_map_success(rspamd);
+ },
+ error: function (serv, jqXHR, textStatus, errorThrown) {
+ save_map_error(rspamd, serv, jqXHR, textStatus, errorThrown);
+ },
method: "POST",
headers: {
Map: id,