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:
@@ -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();
|
||||
|
Reference in New Issue
Block a user