Merge pull request #1133 from coreos-inc/iconfix

Fix small UI issue with repo toggle
This commit is contained in:
josephschorr 2016-01-11 14:07:51 -05:00
commit b0d700decd
4 changed files with 10 additions and 5 deletions

View file

@ -1,7 +1,3 @@
.repo-list-table {
margin-top: 40px;
}
.repo-list-table .repo-name-icon .avatar { .repo-list-table .repo-name-icon .avatar {
margin-right: 10px; margin-right: 10px;
} }

View file

@ -2,3 +2,7 @@
float: right; float: right;
margin-bottom: 10px; margin-bottom: 10px;
} }
.repo-list-view-element {
min-height: 40px;
}

View file

@ -1,6 +1,6 @@
<div class="repo-list-view-element"> <div class="repo-list-view-element">
<!-- Toggle --> <!-- Toggle -->
<div class="repo-list-toggleb btn-group"> <div class="repo-list-toggleb btn-group" ng-show="!loading">
<i class="btn btn-default fa fa-th-large" ng-class="!showAsList ? 'active' : ''" <i class="btn btn-default fa fa-th-large" ng-class="!showAsList ? 'active' : ''"
ng-click="setShowAsList(false)" title="Grid View" data-container="body" bs-tooltip></i> ng-click="setShowAsList(false)" title="Grid View" data-container="body" bs-tooltip></i>
<i class="btn btn-default fa fa-th-list" ng-class="showAsList ? 'active' : ''" <i class="btn btn-default fa fa-th-list" ng-class="showAsList ? 'active' : ''"

View file

@ -15,15 +15,20 @@ angular.module('quay').directive('repoListView', function () {
}, },
controller: function($scope, $element, CookieService) { controller: function($scope, $element, CookieService) {
$scope.resources = []; $scope.resources = [];
$scope.loading = true;
$scope.showAsList = CookieService.get('quay.repoview') == 'list'; $scope.showAsList = CookieService.get('quay.repoview') == 'list';
$scope.$watch('namespaces', function(namespaces) { $scope.$watch('namespaces', function(namespaces) {
if (!namespaces) { return; } if (!namespaces) { return; }
$scope.loading = false;
$scope.resources = []; $scope.resources = [];
namespaces.forEach(function(namespace) { namespaces.forEach(function(namespace) {
if (namespace && namespace.repositories) { if (namespace && namespace.repositories) {
$scope.resources.push(namespace.repositories); $scope.resources.push(namespace.repositories);
if (namespace.repositories.loading) {
$scope.loading = true;
}
} }
}); });
}, true); }, true);