1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-09 10:50:24 +00:00

[mobile] favourites: redesigned it.

This commit is contained in:
llj
2016-12-15 16:54:51 +08:00
parent f4eacae253
commit cffc0743d2
4 changed files with 43 additions and 11 deletions

View File

@@ -14,6 +14,7 @@ define([
id: 'starred-file',
template: _.template($('#starred-file-tmpl').html()),
theadTemplate: _.template($('#starred-file-thead-tmpl').html()),
initialize: function() {
this.starredFiles = new StarredFilesCollection();
@@ -29,9 +30,10 @@ define([
reset: function() {
this.$tableBody.empty();
this.$loadingTip.hide();
this.starredFiles.each(this.addOne, this);
if (this.starredFiles.length) {
this.$emptyTip.hide();
this.renderThead();
this.starredFiles.each(this.addOne, this);
this.$table.show();
} else {
this.$emptyTip.show();
@@ -77,6 +79,10 @@ define([
});
},
renderThead: function() {
this.$('thead').html(this.theadTemplate());
},
show: function() {
$("#right-panel").html(this.$el);
this.showStarredFiles();