diff options
Diffstat (limited to 'testapi/opnfv_testapi/ui/components/scenarios/scenario/scenarioController.js')
-rw-r--r-- | testapi/opnfv_testapi/ui/components/scenarios/scenario/scenarioController.js | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/testapi/opnfv_testapi/ui/components/scenarios/scenario/scenarioController.js b/testapi/opnfv_testapi/ui/components/scenarios/scenario/scenarioController.js index 36e54f5..51f4242 100644 --- a/testapi/opnfv_testapi/ui/components/scenarios/scenario/scenarioController.js +++ b/testapi/opnfv_testapi/ui/components/scenarios/scenario/scenarioController.js @@ -434,35 +434,15 @@ ctrl.confirm = confirm; ctrl.cancel = cancel; ctrl.data = angular.copy(data); - ctrl.open = open; - ctrl.add = add; - ctrl.remove = remove; ctrl.customs = []; - function add() { - var custom = ctrl.custom; - if(custom!="" && custom!=undefined ){ - ctrl.customs.push(custom); - ctrl.custom = ""; - } - }; - - function remove(index) { - // var name = ctrl.customs[index].Name; - ctrl.customs.splice(index, 1); - - } - - /** - * Initiate confirmation and call the success handler with the - * inputs. - */ function confirm() { var custom = ctrl.custom; if(custom!="" && custom!=undefined ){ - ctrl.customs.push(custom); + ctrl.customs = custom.split(/[ ,]+/).filter(Boolean); } + console.log(ctrl.customs) ctrl.data.successHandler(ctrl.customs,ctrl.data.project,ctrl.data.version,ctrl.data.installer); $uibModalInstance.dismiss('cancel'); |