1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-07 10:03:54 +00:00

[repo create] bugfix

This commit is contained in:
llj 2015-04-20 16:38:59 +08:00 committed by Daniel Pan
parent 55a87b55c5
commit e808ce2bc8
4 changed files with 9 additions and 8 deletions

View File

@ -52,7 +52,7 @@
<li class="tab"><a href="#shared-libs/" class="a" id="shared-lib-tab">{% trans "Shared" %}</a></li> <li class="tab"><a href="#shared-libs/" class="a" id="shared-lib-tab">{% trans "Shared" %}</a></li>
</ul> </ul>
<div class="fright"> <div class="fright">
<button id="repo-create" class=""><img src="{{ MEDIA_URL }}img/add.png" alt="" class="add vam" /><span class="vam">{% trans "New Library" %}</span></button> <button class="repo-create"><img src="{{ MEDIA_URL }}img/add.png" alt="" class="add vam" /><span class="vam">{% trans "New Library" %}</span></button>
{% if sub_lib_enabled %} {% if sub_lib_enabled %}
<button id="sub-lib-create" class="hide" title="{% trans "New Sub-library" %}"><img src="{{ MEDIA_URL }}img/add.png" alt="" class="add vam" /><span class="vam">{% trans "New Sub-library" %}</span></button> <button id="sub-lib-create" class="hide" title="{% trans "New Sub-library" %}"><img src="{{ MEDIA_URL }}img/add.png" alt="" class="add vam" /><span class="vam">{% trans "New Sub-library" %}</span></button>
{% endif %} {% endif %}
@ -153,7 +153,7 @@
<li class="tab"><a href="#" class="a">{% trans "Libraries" %}</a></li> <li class="tab"><a href="#" class="a">{% trans "Libraries" %}</a></li>
</ul> </ul>
{% if user.permissions.can_add_repo %} {% if user.permissions.can_add_repo %}
<button id="repo-create" class="fright"><img src="{{ MEDIA_URL }}img/add.png" alt="" class="add vam" /><span class="vam">{% trans "New Library" %}</span></button> <button class="repo-create fright"><img src="{{ MEDIA_URL }}img/add.png" alt="" class="add vam" /><span class="vam">{% trans "New Library" %}</span></button>
{% endif %} {% endif %}
</div> </div>
@ -185,7 +185,7 @@
<div id="organization-repos" class="tab-tabs hide"> <div id="organization-repos" class="tab-tabs hide">
<div class="hd ovhd"> <div class="hd ovhd">
<h3 class="fleft">{% trans "Libraries" %}</h3> <h3 class="fleft">{% trans "Libraries" %}</h3>
<button id="repo-create" class="fright"><img src="{{ MEDIA_URL }}img/add.png" alt="" class="add vam" /><span class="vam">{% trans "New Library"%}</span></button> <button class="repo-create fright"><img src="{{ MEDIA_URL }}img/add.png" alt="" class="add vam" /><span class="vam">{% trans "New Library"%}</span></button>
</div> </div>
<table class="repo-list hide"> <table class="repo-list hide">

View File

@ -15,7 +15,7 @@ define([
el: '#main', el: '#main',
events: { events: {
'click #repo-create': 'createRepo', 'click #group-repo-tabs .repo-create': 'createRepo',
'click #grp-repos .by-name': 'sortByName', 'click #grp-repos .by-name': 'sortByName',
'click #grp-repos .by-time': 'sortByTime' 'click #grp-repos .by-time': 'sortByTime'
}, },

View File

@ -13,7 +13,7 @@ define([
el: $('#repo-tabs'), el: $('#repo-tabs'),
events: { events: {
'click #repo-create': 'createRepo', 'click .repo-create': 'createRepo',
'click #my-own-repos .by-name': 'sortByName', 'click #my-own-repos .by-name': 'sortByName',
'click #my-own-repos .by-time': 'sortByTime' 'click #my-own-repos .by-time': 'sortByTime'
}, },
@ -25,6 +25,7 @@ define([
this.$tableBody = $('tbody', this.$table); this.$tableBody = $('tbody', this.$table);
this.$loadingTip = $('.loading-tip', this.$tabs); this.$loadingTip = $('.loading-tip', this.$tabs);
this.$emptyTip = $('#my-own-repos .empty-tips'); this.$emptyTip = $('#my-own-repos .empty-tips');
this.$repoCreateBtn = this.$('.repo-create');
this.repos = new RepoCollection(); this.repos = new RepoCollection();
this.listenTo(this.repos, 'add', this.addOne); this.listenTo(this.repos, 'add', this.addOne);
@ -67,12 +68,12 @@ define([
}, },
show: function() { show: function() {
$('#repo-create').show(); this.$repoCreateBtn.show();
this.showMyRepos(); this.showMyRepos();
}, },
hide: function() { hide: function() {
$('#repo-create').hide(); this.$repoCreateBtn.hide();
this.$el.hide(); this.$el.hide();
this.$table.hide(); this.$table.hide();
this.$emptyTip.hide(); this.$emptyTip.hide();

View File

@ -30,7 +30,7 @@ define([
}, },
events: { events: {
'click #repo-create': 'createRepo', 'click #organization-repos .repo-create': 'createRepo',
'click #organization-repos .by-name': 'sortByName', 'click #organization-repos .by-name': 'sortByName',
'click #organization-repos .by-time': 'sortByTime' 'click #organization-repos .by-time': 'sortByTime'
}, },