moved naming patterns to seperate module and Angular constant
This commit is contained in:
parent
c55e9f2d12
commit
8a9a2972ec
9 changed files with 262 additions and 256 deletions
|
@ -12,8 +12,8 @@ angular.module('quay').directive('createRobotDialog', function () {
|
|||
'info': '=info',
|
||||
'robotCreated': '&robotCreated'
|
||||
},
|
||||
controller: function($scope, $element, ApiService, UserService) {
|
||||
$scope.ROBOT_PATTERN = ROBOT_PATTERN;
|
||||
controller: function($scope, $element, ApiService, UserService, namePatterns) {
|
||||
$scope.ROBOT_PATTERN = namePatterns.ROBOT_PATTERN;
|
||||
|
||||
$scope.robotFinished = function(robot) {
|
||||
$scope.robotCreated({'robot': robot});
|
||||
|
|
|
@ -12,8 +12,8 @@ angular.module('quay').directive('createTeamDialog', function () {
|
|||
'info': '=info',
|
||||
'teamCreated': '&teamCreated'
|
||||
},
|
||||
controller: function($scope, $element, ApiService, UserService) {
|
||||
$scope.TEAM_PATTERN = TEAM_PATTERN;
|
||||
controller: function($scope, $element, ApiService, UserService, namePatterns) {
|
||||
$scope.TEAM_PATTERN = namePatterns.TEAM_PATTERN;
|
||||
|
||||
$scope.teamFinished = function(team) {
|
||||
$scope.teamCreated({'team': team});
|
||||
|
|
|
@ -15,8 +15,8 @@ angular.module('quay').directive('namespaceInput', function () {
|
|||
|
||||
'namespaceTitle': '@namespaceTitle',
|
||||
},
|
||||
controller: function($scope, $element) {
|
||||
$scope.USERNAME_PATTERN = USERNAME_PATTERN;
|
||||
controller: function($scope, $element, namePatterns) {
|
||||
$scope.USERNAME_PATTERN = namePatterns.USERNAME_PATTERN;
|
||||
$scope.usernamePattern = new RegExp(USERNAME_PATTERN);
|
||||
|
||||
$scope.$watch('binding', function(binding) {
|
||||
|
|
Reference in a new issue