PageSourceSearch

https://www.officialcatholicdirectory.com/assets/controllers/web.home.create-request.controller.js

js officialcatholicdirectory.com collected 2026-10-02 12:57:08 UTC 5,128 bytes, 116 lines download raw bytes

1'use strict';
2angular.module('web')
3    .controller('web.home.create-request.controller', ['$state','$scope', '$location', '$dataService', '$sce', '$rootScope', '$localStorage', function($state,$scope, $location, $dataService, $sce, $rootScope, $localStorage) {
4        // 
5        // $scope.data=JSON.parse($localStorage.createRequast);
6        // delete $localStorage.createRequast;
7        //console.log(data);
8        //$scope.directoryArray=data;
9        $scope.selectData={};
10        $scope.data1 = $rootScope.getInfo;
11        $scope.getInfo = $rootScope.getInfo;
12        $scope.direcoryName = $rootScope.currentDirectory.name;
13        $dataService.get('web-data?pageName=products-services-list',
14            function(data) {
15                //  console.log(data);
16                if (data != null) {
17                    $scope.sections = data[0];
18                }
19            },
20            function(error) {
21                console.log(error)
22            })
23
24        // $dataService.get('create-request',
25        //           function(data) {
26
27        //               // if (data != null) {
28        //               //     $scope.getProductCategory = data;
29        //               // }
30        //           },
31        //           function(error) {
32        //               //console.log(error)
33        //           })
34        $scope.createRequest = function(item) {
35
36        }
37
38        $scope.addRequestForInfo = { "directoryId": $rootScope.currentDirectory.directoryId, "direcoryName": $scope.direcoryName, "requestType": "Create Request For Information", "title": "", "organization": "", "name": { "first": "" }
38, "email": "", "vendors": "", "comments": "" };
39        $scope.ClickRequestForInfo = function() {
40            var selectData=[];
41            angular.forEach($scope.data1, function(value, key) {
42                if(value.data)
43                {
44                    selectData.push(value);
45                }
46                });
47
48               $scope.addRequestForInfo.data= selectData; 
49
50        //    $scope.addRequestForInfo.data=$scope.getInfo;
51            $dataService.post('subscriber/web-request', $scope.addRequestForInfo,
52                function(data) {
53                    data = data.data;
54
55                    if (data != null) {
56                        $scope.addRequestForInfo = { "directoryId": $rootScope.currentDirectory.directoryId, "direcoryName": $scope.direcoryName, "type": "Create Request For Information", "title": "", "organization": "", "name": { "first": "" }, "email": "", "vendors": "", "comments": ""};
57
58                        //$scope.addRequestForInfoMsg = "Request submitted successfully! ";
59                        // $scope.addRequestForInfoMsg1 = "A list representative will contact you shortly via email. If you have any questions about the mailing list, please email: ";
60                        // $scope.addRequestForInfoMsg2 = "[email protected]";
61                            showMessages([{
62                        type: 'success',
63                        message: 'Thank you for your inquiry!',
64                        header: 'Create Request For Information'
65                    }]);
66                     
67
68                    }
69                },
70                function(error) {
71                    $scope.addRequestForInfo = { "directoryId": $rootScope.currentDirectory.directoryId, "direcoryName": $scope.direcoryName, "type": "Create Request For Information", "title": "", "organization": "", "name": { "first": "" }
71, "email": "", "vendors": "", "comments": "" };
72                   // $scope.addRequestForInfoMsg = "Request not submitted successfully! ";
73                    console.log('addRequestForInfo', error)
74                    showMessages([{
75                        type: 'error',
76                        message: 'Create Request For Information not submitted successfully! ',
77                        header: 'Create Request For Information'
78                    }]);
79                })
80            $state.go('core.products-services');
81        };
82
83        $scope.updateSelection = function(data) {
84            if(data.flag==undefined)
85                data.flag=true;
86                else
87                data.flag=!data.flag;
88            //var index=array.splice(index, 1);
89            //var index=$scope.data1.indexOf(data);
90            // if(data.flag==undefined)
91            // {
92            // data.flag=1;    
93            // }
94            // else
95            // data.flag=!data.flag;
96            
97
98
99            // if ($scope.data.indexOf(data) < 0) {
100            //     $scope.data ={flag:false};
101            // } else {
102            //    $scope.data={flag:true};
103            //     //$scope.getInfo.splice($scope.getInfo.indexOf(data), 1);
104            // }
105
106            // if ($scope.getInfo.indexOf(data) < 0) {
107            //     $scope.getInfo.push(data)
108            // } else {
109            //     $scope.getInfo.splice($scope.getInfo.indexOf(data), 1);
110            // }
111
112
113        }
114
115
116    }])

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.