c8a363c94ba33edbdfe67c2ed133127c68e9f12a
[portal/sdk.git] /
1 app.controller("droolsListController", function ($scope,$http,droolsService, modalService, $modal) { 
2         // Table Data
3         droolsService.getDrools().then(function(data){
4                 
5                 var j = data;
6                 $scope.tableData = JSON.parse(j.data);
7                 //$scope.resetMenu();
8         
9         },function(error){
10                 console.log("failed");
11                 reloadPageOnce();
12         });
13         
14         $scope.viewPerPage = 20;
15     $scope.scrollViewsPerPage = 2;
16     $scope.currentPage = 1;
17     $scope.totalPage;
18     $scope.searchCategory = "";
19     $scope.searchString = "";
20  /*    modalService.showSuccess('','Modal Sample') ; */
21         for(x in $scope.tableData){
22                 if($scope.tableData[x].active_yn=='Y')
23                         $scope.tableData[x].active_yn=true;
24                 else
25                         $scope.tableData[x].active_yn=false;
26         }
27     $scope.openDialog = function(droolFile){
28         droolsService.setSelectedFile(droolFile);
29         $modal.open({
30             templateUrl: 'app/fusionapp/drools/view-models/droolsView.html',
31             controller: 'droolsViewController'
32           
33         })
34     }
35    
36
37    
38 });
39
40 function openInNewTab(url) {
41           var win = window.open(url, '_blank');
42           win.focus();
43 };