mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-04 16:31:13 +00:00
render repo table head when reset repo collection
This commit is contained in:
@@ -698,3 +698,22 @@
|
||||
<img src="{{MEDIA_URL}}img/rm.png" alt="" class="unstar op-icon vh" title="{% trans "Unstar" %}" />
|
||||
</td>
|
||||
</script>
|
||||
<script type="text/template" id="my-repo-thead-tmpl">
|
||||
<tr>
|
||||
<th width="4%"><!--icon--></th>
|
||||
<th width="46%">{% trans "Name" %} <span class="by-name icon-caret-up cspt"></span></th>
|
||||
<th width="10%"><!--op--></th>
|
||||
<th width="20%">{% trans "Size" %}</th>
|
||||
<th width="20%">{% trans "Last Update" %} <span class="by-time icon-caret-down cspt"></span></th>
|
||||
</tr>
|
||||
</script>
|
||||
<script type="text/template" id="shared-repo-thead-tmpl">
|
||||
<tr>
|
||||
<th width="4%"><!--icon--></th>
|
||||
<th width="40%">{% trans "Name" %} <span class="by-name icon-caret-up cspt"></span></th>
|
||||
<th width="8%"><!--op--></th>
|
||||
<th width="14%">{% trans "Size" %}</th>
|
||||
<th width="18%">{% trans "Last Update" %} <span class="by-time icon-caret-down cspt"></span></th>
|
||||
<th width="16%">{% trans "Shared By" %}</th>
|
||||
</tr>
|
||||
</script>
|
||||
|
@@ -65,15 +65,7 @@
|
||||
|
||||
<div id="my-own-repos">
|
||||
<table class="hide">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="4%"><!--icon--></th>
|
||||
<th width="46%">{% trans "Name" %} <span class="by-name icon-caret-up cspt"></span></th>
|
||||
<th width="10%"><!--op--></th>
|
||||
<th width="20%">{% trans "Size" %}</th>
|
||||
<th width="20%">{% trans "Last Update" %} <span class="by-time icon-caret-down cspt"></span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<thead></thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
<div class="empty-tips hide">
|
||||
@@ -103,16 +95,7 @@
|
||||
|
||||
<div id="repos-shared-to-me">
|
||||
<table class="hide">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="4%"><!--icon--></th>
|
||||
<th width="40%">{% trans "Name" %} <span class="by-name icon-caret-up cspt"></span></th>
|
||||
<th width="8%"><!--op--></th>
|
||||
<th width="14%">{% trans "Size" %}</th>
|
||||
<th width="18%">{% trans "Last Update" %} <span class="by-time icon-caret-down cspt"></span></th>
|
||||
<th width="16%">{% trans "Shared By" %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<thead></thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
<div class="empty-tips hide">
|
||||
@@ -182,16 +165,7 @@
|
||||
|
||||
<div id="grp-repos">
|
||||
<table style="display:none">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="4%"><!--icon--></th>
|
||||
<th width="38%">{% trans "Name" %} <span class="by-name icon-caret-up cspt"></span></th>
|
||||
<th width="10%"><!--op--></th>
|
||||
<th width="14%">{% trans "Size" %}</th>
|
||||
<th width="18%">{% trans "Last Update" %} <span class="by-time icon-caret-down cspt"></span></th>
|
||||
<th width="16%">{% trans "Shared By" %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<thead></thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
|
||||
@@ -212,18 +186,8 @@
|
||||
</div>
|
||||
|
||||
<table class="repo-list hide">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="4%"></th>
|
||||
<th width="38%">{% trans "Name"%} <span class="by-name icon-caret-up cspt"></span></th>
|
||||
<th width="10%"><!--op--></th>
|
||||
<th width="14%">{% trans "Size"%}</th>
|
||||
<th width="18%">{% trans "Last Update"%} <span class="by-time icon-caret-down cspt"></span></th>
|
||||
<th width="16%">{% trans "Shared By"%}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
<thead></thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
<img class="loading-tip" width="32" src="{{MEDIA_URL}}img/loading-new.gif" alt="{% trans 'Loading...' %}" />
|
||||
<div class="empty-tips hide">
|
||||
|
@@ -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();
|
||||
|
@@ -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) {
|
||||
|
@@ -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');
|
||||
|
@@ -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) {
|
||||
|
Reference in New Issue
Block a user