fixed drag drop bug and skip steps with error message

Change-Id: Ibc053162311de8736259ec3056fd745333c7d658
This commit is contained in:
chi zhang 2015-06-10 17:25:30 -07:00
parent b40905200b
commit a602ce2251
1 changed files with 4 additions and 1 deletions

View File

@ -343,7 +343,7 @@ define(['./baseService'], ()->
$scope.realRole.push(role_key)
for key, value of $scope.servers
$scope.existingRoles.push($scope.realRole)
$scope.existingRoles.push(angular.copy($scope.realRole))
$scope.servers[key].dropChannel = $scope.existingRoles[key].toString()
for server_role_key, server_role of $scope.servers[key].roles
$scope.server_role = ""
@ -474,6 +474,9 @@ define(['./baseService'], ()->
else
@updateStepProgress($scope, $scope.pendingStep, $scope.currentStep, goToPreviousStep)
$scope.currentStep = $scope.pendingStep
else
@showErrorMessage(@$modal, "Error","Please complete previous steps first")
$scope.pendingStep = $scope.currentStep
updateStepProgress: ($scope, newStep, oldStep, goToPreviousStep) ->
$scope.steps[newStep - 1].state = "active"