mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-25 06:33:48 +00:00
[ajax] fixup for error msg (#2183)
This commit is contained in:
@@ -72,13 +72,8 @@ define([
|
||||
});
|
||||
},
|
||||
error: function(xhr) {
|
||||
var err_msg;
|
||||
if (xhr.responseText) {
|
||||
err_msg = JSON.parse(xhr.responseText).error_msg;
|
||||
} else {
|
||||
err_msg = gettext("Failed. Please check the network.");
|
||||
}
|
||||
_this.$errorContainer.html(err_msg).show();
|
||||
var error_msg = Common.prepareAjaxErrorMsg(xhr);
|
||||
_this.$errorContainer.html(error_msg).show();
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -98,13 +93,8 @@ define([
|
||||
_this.remove();
|
||||
},
|
||||
error: function(xhr) {
|
||||
var err_msg;
|
||||
if (xhr.responseText) {
|
||||
err_msg = JSON.parse(xhr.responseText).error_msg;
|
||||
} else {
|
||||
err_msg = gettext("Failed. Please check the network.");
|
||||
}
|
||||
_this.$errorContainer.html(err_msg).show();
|
||||
var error_msg = Common.prepareAjaxErrorMsg(xhr);
|
||||
_this.$errorContainer.html(error_msg).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user