Merge pull request #1562 from coreos-inc/toggle-repos
Add entity creation toggle and fix regexs
This commit is contained in:
commit
119cc917fb
5 changed files with 45 additions and 4 deletions
|
@ -1107,6 +1107,19 @@ a:focus {
|
|||
text-align: center;
|
||||
}
|
||||
|
||||
.co-table .checkbox-col .co-checkable-menu a {
|
||||
color: black;
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
.co-table thead td.checkbox-menu-col:after {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.co-table .offset-check-col {
|
||||
padding-left: 22px;
|
||||
}
|
||||
|
||||
.co-table td.options-col {
|
||||
width: 36px;
|
||||
text-align: center;
|
||||
|
|
|
@ -31,7 +31,19 @@
|
|||
|
||||
<table class="co-table" style="margin-bottom: 210px;">
|
||||
<thead>
|
||||
<td class="checkbox-col"></td>
|
||||
<td class="checkbox-col checkbox-menu-col">
|
||||
<span class="cor-checkable-menu" controller="checkedRepos">
|
||||
<div class="cor-checkable-menu-item" item-filter="allRepositoriesFilter(item)">
|
||||
<i class="fa fa-check-square-o"></i>All Repositories
|
||||
</div>
|
||||
<div class="cor-checkable-menu-item" item-filter="noRepositoriesFilter(item)">
|
||||
<i class="fa fa-square-o"></i>No Repositories
|
||||
</div>
|
||||
<div class="cor-checkable-menu-item" item-filter="missingPermsRepositoriesFilter(item)">
|
||||
<i class="fa fa-circle-o"></i>Missing Permissions
|
||||
</div>
|
||||
</span>
|
||||
</td>
|
||||
<td ng-class="TableService.tablePredicateClass('name', options.predicate, options.reverse)">
|
||||
<a ng-click="TableService.orderBy('name', options)">Repository Name</a>
|
||||
</td>
|
||||
|
@ -45,7 +57,7 @@
|
|||
ng-repeat="repo in orderedRepositories.visibleEntries"
|
||||
ng-class="checkedRepos.isChecked(repo, checkedRepos.checked) ? 'checked' : ''"
|
||||
bindonce>
|
||||
<td>
|
||||
<td class="offset-check-col">
|
||||
<span class="cor-checkable-item" controller="checkedRepos" item="repo"></span>
|
||||
</td>
|
||||
<td>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
var TEAM_PATTERN = '^[a-zA-Z][a-zA-Z0-9]+$';
|
||||
var ROBOT_PATTERN = '^[a-zA-Z][a-zA-Z0-9_]{3,29}$';
|
||||
var TEAM_PATTERN = '^[a-z][a-z0-9]+$';
|
||||
var ROBOT_PATTERN = '^[a-z][a-z0-9_]{3,29}$';
|
||||
var USER_PATTERN = '^[a-z0-9_]{4,30}$';
|
||||
|
||||
// Define the pages module.
|
||||
|
|
|
@ -659,6 +659,10 @@ angular.module("core-ui", [])
|
|||
},
|
||||
controller: function($rootScope, $scope, $element) {
|
||||
$scope.getClass = function(items, checked) {
|
||||
if (!checked) {
|
||||
return 'none';
|
||||
}
|
||||
|
||||
if (checked.length == 0) {
|
||||
return 'none';
|
||||
}
|
||||
|
|
|
@ -175,6 +175,18 @@ angular.module('quay').directive('createEntityDialog', function () {
|
|||
});
|
||||
};
|
||||
|
||||
$scope.allRepositoriesFilter = function(item) {
|
||||
return true;
|
||||
};
|
||||
|
||||
$scope.noRepositoriesFilter = function(item) {
|
||||
return false;
|
||||
};
|
||||
|
||||
$scope.missingPermsRepositoriesFilter = function(item) {
|
||||
return !item.perm;
|
||||
};
|
||||
|
||||
$scope.$watch('options.predicate', setRepoState);
|
||||
$scope.$watch('options.reverse', setRepoState);
|
||||
$scope.$watch('options.filter', setRepoState);
|
||||
|
|
Reference in a new issue