Really sort robots by name. Also sort teams by name and fix team create.

This commit is contained in:
Joseph Schorr 2015-04-23 13:20:03 -04:00
parent 67c70860c5
commit 518419097f
3 changed files with 4 additions and 4 deletions

View file

@ -52,7 +52,7 @@
<li role="presentation" class="dropdown-header" ng-show="!lazyLoading && teams">Teams</li> <li role="presentation" class="dropdown-header" ng-show="!lazyLoading && teams">Teams</li>
<li class="menuitem" role="presentation" ng-repeat="team in teams" ng-show="!lazyLoading" <li class="menuitem" role="presentation" ng-repeat="team in teams | orderBy: 'name'" ng-show="!lazyLoading"
ng-click="setEntity(team.name, 'team', false, team.avatar)"> ng-click="setEntity(team.name, 'team', false, team.avatar)">
<a role="menuitem" tabindex="-1" href="javascript:void(0)"> <a role="menuitem" tabindex="-1" href="javascript:void(0)">
<span ng-if="!Config.isNewLayout()"> <span ng-if="!Config.isNewLayout()">
@ -68,7 +68,7 @@
<li role="presentation" class="dropdown-header" ng-show="!lazyLoading && robots">Robot Accounts</li> <li role="presentation" class="dropdown-header" ng-show="!lazyLoading && robots">Robot Accounts</li>
<li class="menuitem" role="presentation" ng-repeat="robot in robots | orderBy:name" ng-show="!lazyLoading"> <li class="menuitem" role="presentation" ng-repeat="robot in robots | orderBy:'name'" ng-show="!lazyLoading">
<a role="menuitem" tabindex="-1" href="javascript:void(0)" ng-click="setEntity(robot.name, 'user', true)"> <a role="menuitem" tabindex="-1" href="javascript:void(0)" ng-click="setEntity(robot.name, 'user', true)">
<i class="fa fa-wrench"></i> <span>{{ robot.name }}</span> <i class="fa fa-wrench"></i> <span>{{ robot.name }}</span>
</a> </a>

View file

@ -94,7 +94,7 @@ angular.module('quay').directive('entitySearch', function () {
$scope.createTeam = function() { $scope.createTeam = function() {
CreateService.askCreateTeam($scope.namespace, function(created) { CreateService.askCreateTeam($scope.namespace, function(created) {
$scope.setEntity(created.name, 'team', false, created.avatar); $scope.setEntity(created.name, 'team', false, created.avatar);
$scope.teams[teamname] = created; $scope.teams[created.name] = created;
}); });
}; };

View file

@ -53,7 +53,7 @@ angular.module('quay').factory('CreateService', ['ApiService', 'UserService', fu
return; return;
} }
CreateService.createOrganizationTeam(ApiService, namespace, teamname, callback); createService.createOrganizationTeam(ApiService, namespace, teamname, callback);
}); });
}; };