X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ecomp-portal-FE-os%2Fclient%2Fsrc%2Fviews%2FfunctionalMenu%2FfunctionalMenu.controller.js;h=0ff46e4de660a150898a247b6c39d612063a598c;hb=978dbcf0a196acbafad72fe1e2478ec0e384f02f;hp=343c968dc2e45f5571fb0b45e652d661559a7242;hpb=bc7350dce5b7b1dcd1c472a3922b42c4ea99809d;p=portal.git diff --git a/ecomp-portal-FE-os/client/src/views/functionalMenu/functionalMenu.controller.js b/ecomp-portal-FE-os/client/src/views/functionalMenu/functionalMenu.controller.js index 343c968d..0ff46e4d 100644 --- a/ecomp-portal-FE-os/client/src/views/functionalMenu/functionalMenu.controller.js +++ b/ecomp-portal-FE-os/client/src/views/functionalMenu/functionalMenu.controller.js @@ -20,7 +20,7 @@ 'use strict'; (function () { class FunctionalMenuCtrl { - constructor($log, functionalMenuService, $scope,ngDialog, confirmBoxService) { + constructor($log, functionalMenuService, $scope,ngDialog, confirmBoxService,$modal) { $log.info('FunctionalMenuCtrl init'); $scope.invokeDialog = () => { @@ -145,19 +145,26 @@ title: getDialogTitle(source) }; } - ngDialog.open({ + var modalInstance = $modal.open({ templateUrl: 'app/views/functionalMenu/functionalMenu-dialog/menu-details.modal.html', - controller: 'MenuDetailsModalCtrl', - controllerAs: 'functionalMenuDetails', - data: data - }).closePromise.then(needUpdate => { - if(needUpdate.value === true){ - $log.debug('FunctionalMenuCtrl::openMenuDetailsModal: updating table data...'); + controller: 'MenuDetailsModalCtrl as functionalMenuDetails', + sizeClass: 'modal-large', + resolve: { + items: function () { + return data; + } + } + }) + + modalInstance.result.finally(function (needUpdate){ + if(needUpdate.value === true){ + $log.debug('FunctionalMenuCtrl::openMenuDetailsModal: updating table data...'); if(source==="edit") { init(); } - } - }); + + } + }); }); }; @@ -191,18 +198,25 @@ }; } - ngDialog.open({ + var modalInstance = $modal.open({ templateUrl: 'app/views/functionalMenu/functionalMenu-dialog/menu-details.modal.html', - controller: 'MenuDetailsModalCtrl', - controllerAs: 'functionalMenuDetails', - data: data - }).closePromise.then(needUpdate => { - if(needUpdate.value === true){ + controller: 'MenuDetailsModalCtrl as functionalMenuDetails', + sizeClass: 'modal-large', + resolve: { + items: function () { + return data; + } + } + }) + + modalInstance.result.finally(function (needUpdate){ + if(needUpdate.value === true){ $log.debug('FunctionalMenuCtrl::getMenuDetails: updating table data...'); init(); //getOnboardingWidgets(); - } - }); + + } + }); } }); }; @@ -238,7 +252,7 @@ init(); } } - FunctionalMenuCtrl.$inject = ['$log', 'functionalMenuService','$scope', 'ngDialog', 'confirmBoxService']; + FunctionalMenuCtrl.$inject = ['$log', 'functionalMenuService','$scope', 'ngDialog', 'confirmBoxService','$modal']; angular.module('ecompApp').controller('FunctionalMenuCtrl', FunctionalMenuCtrl); angular.module('ecompApp').directive('jqTree', ['functionalMenuService','$log','confirmBoxService',function(functionalMenuService,$log,confirmBoxService){