mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-02 23:48:47 +00:00
[ajax] fixup for error msg (#2183)
This commit is contained in:
@@ -122,19 +122,10 @@ define([
|
||||
success: function (collection, response, opts) {
|
||||
},
|
||||
error: function (collection, response, opts) {
|
||||
$loadingTip.hide();
|
||||
var $error = _this.$('.error');
|
||||
var err_msg;
|
||||
if (response.responseText) {
|
||||
if (response['status'] == 401 || response['status'] == 403) {
|
||||
err_msg = gettext("Permission error");
|
||||
} else {
|
||||
err_msg = gettext("Error");
|
||||
}
|
||||
} else {
|
||||
err_msg = gettext('Please check the network.');
|
||||
}
|
||||
var err_msg = Common.prepareCollectionFetchErrorMsg(collection, response, opts);
|
||||
$error.html(err_msg).show();
|
||||
$loadingTip.hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
Reference in New Issue
Block a user