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

upate render repo table thead

This commit is contained in:
lian
2015-05-11 18:39:21 +08:00
parent 97bbf0156d
commit f725506262
5 changed files with 30 additions and 6 deletions

View File

@@ -14,6 +14,8 @@ define([
var GroupView = Backbone.View.extend({
el: '#main',
reposHdTemplate: _.template($('#shared-repos-hd-tmpl').html()),
events: {
'click #group-repo-tabs .repo-create': 'createRepo',
'click #grp-repos .by-name': 'sortByName',
@@ -50,8 +52,12 @@ define([
}
},
renderReposHd: function() {
this.$tableHead.html(this.reposHdTemplate());
},
reset: function() {
this.$tableHead.html(_.template($('#shared-repo-thead-tmpl').html()))
this.renderReposHd();
this.$tableBody.empty();
this.repos.each(this.addOne, this);
this.$loadingTip.hide();

View File

@@ -12,6 +12,8 @@ define([
var ReposView = Backbone.View.extend({
el: $('#repo-tabs'),
reposHdTemplate: _.template($('#my-repos-hd-tmpl').html()),
events: {
'click .repo-create': 'createRepo',
'click #my-own-repos .by-name': 'sortByName',
@@ -41,8 +43,12 @@ define([
}
},
renderReposHd: function() {
this.$tableHead.html(this.reposHdTemplate());
},
reset: function() {
this.$tableHead.html(_.template($('#my-repo-thead-tmpl').html()))
this.renderReposHd();
this.$tableBody.empty();
this.repos.each(this.addOne, this);
if (this.repos.length) {

View File

@@ -11,6 +11,8 @@ define([
var SharedReposView = Backbone.View.extend({
el: $('#repo-tabs'),
reposHdTemplate: _.template($('#shared-repos-hd-tmpl').html()),
initialize: function(options) {
this.$tabs = $('#repo-tabs');
this.$table = $('#repos-shared-to-me table');
@@ -33,8 +35,12 @@ define([
}
},
renderReposHd: function() {
this.$tableHead.html(this.reposHdTemplate());
},
reset: function() {
this.$tableHead.html(_.template($('#shared-repo-thead-tmpl').html()))
this.renderReposHd();
this.$tableBody.empty();
this.repos.each(this.addOne, this);
if (this.repos.length) {

View File

@@ -13,6 +13,8 @@ define([
var OrganizationView = Backbone.View.extend({
el: '#main',
reposHdTemplate: _.template($('#shared-repos-hd-tmpl').html()),
initialize: function(options) {
this.$sideNav = $('#org-side-nav');
@@ -49,8 +51,12 @@ define([
}
},
renderReposHd: function() {
this.$tableHead.html(this.reposHdTemplate());
},
reset: function() {
this.$tableHead.html(_.template($('#shared-repo-thead-tmpl').html()))
this.renderReposHd();
this.$tableBody.empty();
this.repos.each(this.addOne, this);
if (this.repos.length) {