Make github trigger setup a bit nicer when there are a lot of repos

This commit is contained in:
Joseph Schorr 2014-10-27 17:05:16 -04:00
parent 6e25eaaa99
commit 793b6f543c
3 changed files with 18 additions and 12 deletions

View file

@ -5263,6 +5263,7 @@ quayApp.directive('triggerSetupGithub', function () {
$scope.tagNames = null;
$scope.state = {
'currentRepo': null,
'branchTagFilter': '',
'hasBranchTagFilter': false,
'isInvalidLocation': true,
@ -5384,7 +5385,7 @@ quayApp.directive('triggerSetupGithub', function () {
};
$scope.selectRepo = function(repo, org) {
$scope.currentRepo = {
$scope.state.currentRepo = {
'repo': repo,
'avatar_url': org['info']['avatar_url'],
'toString': function() {
@ -5435,8 +5436,8 @@ quayApp.directive('triggerSetupGithub', function () {
$scope.repoLookahead = repos;
};
$scope.$watch('currentRepo', function(repo) {
if (repo) {
$scope.$watch('state.currentRepo', function(repo) {
if (repo) {
$scope.selectRepoInternal(repo);
}
});