1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-07 18:03:48 +00:00

[misc] fixup

This commit is contained in:
llj
2018-08-18 11:05:08 +08:00
parent 0105e8e8ef
commit 5b8dc61e6f
7 changed files with 19 additions and 15 deletions

View File

@@ -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();
}