diff --git a/seahub/templates/libraries.html b/seahub/templates/libraries.html
index 8014ee0e73..0cfdb82b46 100644
--- a/seahub/templates/libraries.html
+++ b/seahub/templates/libraries.html
@@ -52,7 +52,7 @@
{% trans "Shared" %}
-
+
{% if sub_lib_enabled %}
{% endif %}
@@ -153,7 +153,7 @@
{% trans "Libraries" %}
{% if user.permissions.can_add_repo %}
-
+
{% endif %}
@@ -185,7 +185,7 @@
{% trans "Libraries" %}
-
+
diff --git a/static/scripts/app/views/group.js b/static/scripts/app/views/group.js
index 2bacda0170..da29de8772 100644
--- a/static/scripts/app/views/group.js
+++ b/static/scripts/app/views/group.js
@@ -15,7 +15,7 @@ define([
el: '#main',
events: {
- 'click #repo-create': 'createRepo',
+ 'click #group-repo-tabs .repo-create': 'createRepo',
'click #grp-repos .by-name': 'sortByName',
'click #grp-repos .by-time': 'sortByTime'
},
diff --git a/static/scripts/app/views/myhome-repos.js b/static/scripts/app/views/myhome-repos.js
index f412c02640..e9ec05cbdf 100644
--- a/static/scripts/app/views/myhome-repos.js
+++ b/static/scripts/app/views/myhome-repos.js
@@ -13,7 +13,7 @@ define([
el: $('#repo-tabs'),
events: {
- 'click #repo-create': 'createRepo',
+ 'click .repo-create': 'createRepo',
'click #my-own-repos .by-name': 'sortByName',
'click #my-own-repos .by-time': 'sortByTime'
},
@@ -25,6 +25,7 @@ define([
this.$tableBody = $('tbody', this.$table);
this.$loadingTip = $('.loading-tip', this.$tabs);
this.$emptyTip = $('#my-own-repos .empty-tips');
+ this.$repoCreateBtn = this.$('.repo-create');
this.repos = new RepoCollection();
this.listenTo(this.repos, 'add', this.addOne);
@@ -67,12 +68,12 @@ define([
},
show: function() {
- $('#repo-create').show();
+ this.$repoCreateBtn.show();
this.showMyRepos();
},
hide: function() {
- $('#repo-create').hide();
+ this.$repoCreateBtn.hide();
this.$el.hide();
this.$table.hide();
this.$emptyTip.hide();
diff --git a/static/scripts/app/views/organization.js b/static/scripts/app/views/organization.js
index 2ea20fcfc3..f29e0661df 100644
--- a/static/scripts/app/views/organization.js
+++ b/static/scripts/app/views/organization.js
@@ -30,7 +30,7 @@ define([
},
events: {
- 'click #repo-create': 'createRepo',
+ 'click #organization-repos .repo-create': 'createRepo',
'click #organization-repos .by-name': 'sortByName',
'click #organization-repos .by-time': 'sortByTime'
},