diff --git a/static/js/app.js b/static/js/app.js
index bc721d769..63e4ab5c3 100644
--- a/static/js/app.js
+++ b/static/js/app.js
@@ -333,11 +333,14 @@ quayApp.run(['$location', '$rootScope', 'Restangular', 'UserService', 'PlanServi
});
var activeTab = $location.search()['tab'];
+ var checkTabs = function() {
+ var tabs = $('a[data-toggle="tab"]');
+ if (tabs.length == 0) {
+ $timeout(checkTabs, 50);
+ return;
+ }
- // Setup deep linking of tabs. This will change the search field of the URL whenever a tab
- // is changed in the UI.
- $timeout(function() {
- $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
+ tabs.on('shown.bs.tab', function (e) {
var tabName = e.target.getAttribute('data-target').substr(1);
$rootScope.$apply(function() {
var isDefaultTab = $('a[data-toggle="tab"]')[0] == e.target;
@@ -357,7 +360,11 @@ quayApp.run(['$location', '$rootScope', 'Restangular', 'UserService', 'PlanServi
if (activeTab) {
changeTab(activeTab);
}
- }, 400); // 400ms to make sure angular has rendered.
+ };
+
+ // Setup deep linking of tabs. This will change the search field of the URL whenever a tab
+ // is changed in the UI.
+ $timeout(checkTabs, 50);
});
var initallyChecked = false;
diff --git a/static/partials/repo-view.html b/static/partials/repo-view.html
index 4a9967697..b51016bc5 100644
--- a/static/partials/repo-view.html
+++ b/static/partials/repo-view.html
@@ -37,12 +37,12 @@
+ ng-show="viewScope.repository.can_admin">
+ ng-show="viewScope.repository.can_admin">