mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-12 04:10:47 +00:00
[misc] fixup
This commit is contained in:
@@ -55,8 +55,8 @@ define([
|
||||
Common.closeModal();
|
||||
},
|
||||
error: function(collection, response, options) {
|
||||
var err_msg = Common.prepareCollectionFetchErrorMsg(collection, response, opts);
|
||||
$error.html(err_msg).show();
|
||||
var error_msg = Common.prepareAjaxErrorMsg(response);
|
||||
$error.html(error_msg).show();
|
||||
Common.enableButton($submitBtn);
|
||||
}
|
||||
});
|
||||
|
@@ -93,8 +93,8 @@ define([
|
||||
Common.closeModal();
|
||||
},
|
||||
error: function(collection, response, options) {
|
||||
var err_msg = Common.prepareCollectionFetchErrorMsg(collection, response, opts);
|
||||
$error.html(err_msg).show();
|
||||
var error_msg = Common.prepareAjaxErrorMsg(response);
|
||||
$error.html(error_msg).show();
|
||||
Common.enableButton($submitBtn);
|
||||
}
|
||||
});
|
||||
|
@@ -28,11 +28,13 @@ define([
|
||||
this.$table = this.$('table');
|
||||
this.$tableBody = $('tbody', this.$table);
|
||||
this.$loadingTip = this.$('.loading-tip');
|
||||
this.$error = this.$('.error');
|
||||
},
|
||||
|
||||
initPage: function() {
|
||||
this.$table.hide();
|
||||
this.$tableBody.empty();
|
||||
this.$error.hide();
|
||||
this.$loadingTip.show();
|
||||
},
|
||||
|
||||
@@ -42,14 +44,12 @@ define([
|
||||
|
||||
this.systemRepo.fetch({
|
||||
url: Common.getUrl({name: 'admin-system-library'}),
|
||||
cache: false, // for IE
|
||||
reset: true,
|
||||
cache: false,
|
||||
success: function(model, response, options) {
|
||||
_this.reset();
|
||||
},
|
||||
error: function(model, response, options) {
|
||||
var err_msg = Common.prepareCollectionFetchErrorMsg(collection, response, opts);
|
||||
Common.feedback(err_msg, 'error');
|
||||
_this.$error.html(gettext("Error")).show();
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -65,6 +65,7 @@ define([
|
||||
|
||||
reset: function() {
|
||||
this.$loadingTip.hide();
|
||||
this.$error.hide();
|
||||
this.$tableBody.html(this.itemTemplate(this.systemRepo.toJSON()));
|
||||
this.$table.show();
|
||||
}
|
||||
|
Reference in New Issue
Block a user