diff --git a/seahub/templates/js/templates.html b/seahub/templates/js/templates.html index 0b07cb383c..f32cb7aa00 100644 --- a/seahub/templates/js/templates.html +++ b/seahub/templates/js/templates.html @@ -698,3 +698,22 @@ + + diff --git a/seahub/templates/libraries.html b/seahub/templates/libraries.html index eac8e8c5fd..dad76ed46e 100644 --- a/seahub/templates/libraries.html +++ b/seahub/templates/libraries.html @@ -65,15 +65,7 @@
- - - - - - - - - +
{% trans "Name" %} {% trans "Size" %}{% trans "Last Update" %}
@@ -103,16 +95,7 @@
- - - - - - - - - - +
{% trans "Name" %} {% trans "Size" %}{% trans "Last Update" %} {% trans "Shared By" %}
@@ -182,16 +165,7 @@
- - - - - - - - - - +
{% trans "Name" %} {% trans "Size" %}{% trans "Last Update" %} {% trans "Shared By" %}
@@ -212,18 +186,8 @@
- - - - - - - - - - - - + +
{% trans "Name"%} {% trans "Size"%}{% trans "Last Update"%} {% trans "Shared By"%}
{% trans 'Loading...' %}
diff --git a/static/scripts/app/views/group.js b/static/scripts/app/views/group.js index 75095b1f45..bd3c7f7056 100644 --- a/static/scripts/app/views/group.js +++ b/static/scripts/app/views/group.js @@ -51,6 +51,7 @@ define([ }, reset: function() { + this.$tableHead.html(_.template($('#shared-repo-thead-tmpl').html())) this.$tableBody.empty(); this.repos.each(this.addOne, this); this.$loadingTip.hide(); diff --git a/static/scripts/app/views/myhome-repos.js b/static/scripts/app/views/myhome-repos.js index 87090f8e08..af56d3379a 100644 --- a/static/scripts/app/views/myhome-repos.js +++ b/static/scripts/app/views/myhome-repos.js @@ -42,6 +42,7 @@ define([ }, reset: function() { + this.$tableHead.html(_.template($('#my-repo-thead-tmpl').html())) this.$tableBody.empty(); this.repos.each(this.addOne, this); if (this.repos.length) { diff --git a/static/scripts/app/views/myhome-shared-repos.js b/static/scripts/app/views/myhome-shared-repos.js index 3c3dc59e4f..42187cd3ca 100644 --- a/static/scripts/app/views/myhome-shared-repos.js +++ b/static/scripts/app/views/myhome-shared-repos.js @@ -34,6 +34,7 @@ define([ }, reset: function() { + this.$tableHead.html(_.template($('#shared-repo-thead-tmpl').html())) this.$tableBody.empty(); this.repos.each(this.addOne, this); if (this.repos.length) { @@ -46,14 +47,9 @@ define([ this.$loadingTip.hide(); }, - renderPath: function() { - // - }, - showSharedRepos: function() { this.repos.fetch({reset: true}); this.$tabs.show(); - //this.$table.parent().show(); this.$table.hide(); this.$loadingTip.show(); $('#shared-lib-tab', this.$tabs).parent().addClass('ui-state-active'); diff --git a/static/scripts/app/views/organization.js b/static/scripts/app/views/organization.js index be04303107..942d0a14a2 100644 --- a/static/scripts/app/views/organization.js +++ b/static/scripts/app/views/organization.js @@ -18,6 +18,7 @@ define([ this.$sideNav = $('#org-side-nav'); this.$reposDiv = $('#organization-repos'); this.$table = $('#organization-repos table'); + this.$tableHead = $('thead', this.$table); this.$tableBody = $('tbody', this.$table); this.$loadingTip = $('#organization-repos .loading-tip'); this.$emptyTip = $('#organization-repos .empty-tips'); @@ -49,6 +50,7 @@ define([ }, reset: function() { + this.$tableHead.html(_.template($('#shared-repo-thead-tmpl').html())) this.$tableBody.empty(); this.repos.each(this.addOne, this); if (this.repos.length) {