X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ecomp-portal-FE-common%2Fclient%2Fapp%2Fviews%2Frole%2FrolepopupmodelController.js;h=67bf3b2ea8cff30b5461ba667c02c72b9116bdab;hb=978dbcf0a196acbafad72fe1e2478ec0e384f02f;hp=1176e50adcea506fa8cb9ff9e52680a268bd0a65;hpb=bc7350dce5b7b1dcd1c472a3922b42c4ea99809d;p=portal.git diff --git a/ecomp-portal-FE-common/client/app/views/role/rolepopupmodelController.js b/ecomp-portal-FE-common/client/app/views/role/rolepopupmodelController.js index 1176e50a..67bf3b2e 100644 --- a/ecomp-portal-FE-common/client/app/views/role/rolepopupmodelController.js +++ b/ecomp-portal-FE-common/client/app/views/role/rolepopupmodelController.js @@ -88,9 +88,6 @@ app.controller('rolepopupController', function ($scope, role, roleId, confirmBo } - else { - availableRoleFunction.selected=!availableRoleFunction.selected; - } /* $.ajax({ type : 'POST', @@ -106,7 +103,11 @@ app.controller('rolepopupController', function ($scope, role, roleId, confirmBo } }); */ - }); + }).catch(function(err) { + availableRoleFunction.selected=!availableRoleFunction.selected; + $log.error('roleListController::confirmBoxService.confirm error:', err); + + }); } else { //add role function @@ -127,10 +128,7 @@ app.controller('rolepopupController', function ($scope, role, roleId, confirmBo function(data) { confirmBoxService.showInformation("Error while saving."); }); - } else { - availableRoleFunction.selected=!availableRoleFunction.selected; - } - /* + } /* $.ajax({ type : 'POST', url : uuu, @@ -150,7 +148,10 @@ app.controller('rolepopupController', function ($scope, role, roleId, confirmBo function(){ availableRoleFunction.selected=!availableRoleFunction.selected; })*/ - }); + }).catch(function(err) { + availableRoleFunction.selected=!availableRoleFunction.selected; + $log.error('roleListController::confirmBoxService.confirm error:', err); + }); } @@ -180,10 +181,11 @@ app.controller('rolepopupController', function ($scope, role, roleId, confirmBo function(data) { confirmBoxService.showInformation("Error while saving."); }); - } else { - availableRole.selected=false; } - }); + }).catch(function(err) { + availableRole.selected=!availableRole.selected; + $log.error('roleListController::confirmBoxService.confirm error:', err); + }); /* $.ajax({ type : 'POST', url : uuu, @@ -219,8 +221,6 @@ app.controller('rolepopupController', function ($scope, role, roleId, confirmBo function(data) { confirmBoxService.showInformation("Error while saving."); }); - } else { - availableRole.selected=false; } /* $.ajax({ type : 'POST', @@ -236,7 +236,10 @@ app.controller('rolepopupController', function ($scope, role, roleId, confirmBo } });*/ - }); + }).catch(function(err) { + availableRole.selected=!availableRole.selected; + $log.error('roleListController::confirmBoxService.confirm error:', err); + }); }