diff options
Diffstat (limited to 'ecomp-portal-FE-common/client/app/views/widget-onboarding/widget-onboarding.controller.js')
-rw-r--r-- | ecomp-portal-FE-common/client/app/views/widget-onboarding/widget-onboarding.controller.js | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/ecomp-portal-FE-common/client/app/views/widget-onboarding/widget-onboarding.controller.js b/ecomp-portal-FE-common/client/app/views/widget-onboarding/widget-onboarding.controller.js index 0e7fd9fb..8dc2201b 100644 --- a/ecomp-portal-FE-common/client/app/views/widget-onboarding/widget-onboarding.controller.js +++ b/ecomp-portal-FE-common/client/app/views/widget-onboarding/widget-onboarding.controller.js @@ -21,7 +21,7 @@ (function () { class WidgetOnboardingCtrl { constructor($log, applicationsService, widgetsCatalogService, ngDialog, confirmBoxService, - userProfileService, $cookies, $scope) { + userProfileService, $cookies, $scope,$modal) { $scope.infoMessage = true; let populateAvailableApps = widgets => { @@ -145,16 +145,20 @@ widget: selectedWidget } } - ngDialog.open({ + var modalInstance = $modal.open({ templateUrl: 'app/views/widget-onboarding/widget-details-dialog/widget-details.modal.html', - controller: 'WidgetOnboardingDetailsModalCtrl', - controllerAs: 'widgetOnboardingDetails', - data: data - }).closePromise.then(needUpdate => { - if(needUpdate.value === true){ - getOnboardingWidgets(); - } - }); + controller: 'WidgetOnboardingDetailsModalCtrl as widgetOnboardingDetails', + sizeClass: 'modal-medium', + resolve: { + items: function () { + return data; + } + } + }) + + modalInstance.result.finally(function () { + getOnboardingWidgets(); + }); }; this.deleteWidget = widget => { @@ -199,6 +203,7 @@ document.body.removeChild(a); window.URL.revokeObjectURL(url); }, 100); + }); }; @@ -206,6 +211,6 @@ } } WidgetOnboardingCtrl.$inject = ['$log', 'applicationsService', 'widgetsCatalogService', 'ngDialog', 'confirmBoxService', - 'userProfileService','$cookies', '$scope']; + 'userProfileService','$cookies', '$scope','$modal']; angular.module('ecompApp').controller('WidgetOnboardingCtrl', WidgetOnboardingCtrl); })(); |