summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-services/modalServiceDS2.js
blob: d3cd873722bf8a059525c6b121ace5c1c8f55675 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
angular.module("modalServicesDS2",[]).service('modalService', ['$modal', function ($modal) {
	
	this.popupConfirmWinWithCancel = function(title, msgBody, callback,dismissCallback){
		debugger;
		 var modalInstance = $modal.open({
 	        templateUrl: 'confirmation_informativeDS2.html',
 	        //controller: 'modalpopupControllerDS2',
 	        //size: 'sm',
 	        resolve: {
 	           message: function () {
 	        	   var message = {
 	        			   title:    title,
                       		text:    msgBody
                       	};
			          return message;
		        	}
 	        }
 	      }); 
		 var args = Array.prototype.slice.call( arguments, 0 );
	     args.splice( 0, 3); 
 		modalInstance.result.then(function(){
	 			callback.apply(null, args);
 			}, function() {
 			  dismissCallback();
 		  })['finally'](function(){
 		   modalInstance = undefined;
 		  });
		
	};
															
 }]);