PageSourceSearch

https://www.rachelsellsthegulfcoast.com/resources/assets/themes/as…/controllers/idxcontroller.js?v=1786709036

js rachelsellsthegulfcoast.com collected 2026-09-28 18:31:41 UTC 6,512 bytes, 178 lines download raw bytes

1'use strict';
2
3
4angular.module('dpiApp')
5    .controller('IdxController', function ($scope, $timeout, $http, configService, $rootScope, $location, $route, $routeParams, $localStorage) {
6
7        $scope.page_heading = '';
8        $scope.userid = isNaN(current_theme) ? user_id : current_theme; // user_id set in index.blade.php for preview page
9        $scope.show_default = 1; // For default website show  default list
10        $scope.front_spinner = 0;
11        // $scope.menu_id = (typeof $routeParams.menu_id == 'undefined') ? 2 : $routeParams.menu_id;
12        $scope.menu_id = (typeof $routeParams.menu_id == 'undefined') ? $rootScope.menu_id : $routeParams.menu_id;
13
14        setTimeout(function () {
15            ImageFitCont();
16        }, 500);
17
18
19        $scope.location = $location.path();
20        $scope.routeName = $route.current.$$route.name;
21        $scope.newobject.active_class = $routeParams.page_name; // Set Active class
22        $scope.meta_name = (typeof $routeParams.page_name == 'undefined') ? $rootScope.page_name : $routeParams.page_name;
23
24        // page heading Setting
25        if (typeof $scope.meta_heading[$routeParams.page_name] != 'undefined') {
26            $scope.page_heading = $scope.meta_heading[$routeParams.page_name];
27        } else {
28            $scope.$on('menudatareceived', function (event, args) {
29                $scope.page_heading = $scope.meta_heading[$routeParams.page_name];
30            });
31        }
32
33
34        /********** GET LOCATION DETAILS ***********/
35
36        $scope.getAllIdx = function () {
37            $scope.front_spinner = 1;
38            var page_type = $scope.meta_name;
39            var user_id = $scope.userid;
40
41            var httpRequest = $http({
42                method: 'POST',
43                url: base_url + '/firsthometheme/idx-location',
44                data: {
45                    user_id: user_id,
46                    menu_id: $scope.menu_id,
47                    page_type: page_type
48                }
49
50            }).success(function (data, status) {
51
52                $scope.front_spinner = 0;
53                setTimeout(function () {
54                    ImageFitCont();
55                }, 500);
56
57                $scope.location_array = data.location_array;
58                //console.log($scope.location_array);
59            });
60        }
61
62        // ======== Self Invoking Function Start ==========//
63
64        $scope.getAllIdx(); //Getting idx  location list
65
66        // ======== Self Invoking Function End ==========//
67
68
69        //====== Function for  Home/Condo click link =======//
70
71        // $scope.getProperty = function (location_id, criteria_id) {
72        //     // Retrieve Criteria for the user
73        //     $rootScope.firstCitySearchLoading = true;
74        //     // return;
75        //     // propertylist-criteria/:location_id/:menu_id/:criteria_id
76        //     if ($rootScope.page_name == 'for_sale') {
77        //         $rootScope.previousRoute = 'for_sale';
78        //     } else if ($rootScope.page_name == 'for_rent') {
79        //         $rootScope.previousRoute = 'for_rent';
80        //     }
81        //     $location.path('/propertylist-criteria/' + location_id + '/' + $scope.menu_id + '/' + criteria_id);
82        // }
83        $scope.getProperty = function (location_id, criteria_id, page = "") {
84
85            // Retrieve Criteria for the user
86
87            $rootScope.firstCitySearchLoading = true;
88
89            // console.log(location_id, criteria_id);
90
91            // return;
92
93            // return;
94
95            // propertylist-criteria/:location_id/:menu_id/:criteria_id
96            if(page != ""){
97                $rootScope.page_name = page;
98                if(page == 'for_sale'){
99                    $scope.menu_id = 3;
100                } else if(page == 'for_rent'){
101                    $scope.menu_id = 5;
102                }
103            }
104
105            if ($rootScope.page_name == 'for_sale') {
106
107                $rootScope.previousRoute = 'for_sale';
108
109            } else if ($rootScope.page_name == 'for_rent') {
110
111                $rootScope.previousRoute = 'for_rent';
112
113            }
114
115            if(criteria_id == 2742){
116
117                // Luxury Waterfront properties
118
119                $rootScope.previousRoute = '3/luxury_waterfront_homes/2741';
120
121                $rootScope.luxuryWaterfrontProperties = true;
122
123                $rootScope.luxuryWaterfrontMinPrice = 2000000;
124
125                $rootScope.luxuryWaterfrontPropertyTypes = ["Single Family"];
126
127                $location.path('/propertylist-criteria/' + location_id + '/3/' + 39);
128
129            } else {
130
131                $location.path('/propertylist-criteria/' + location_id + '/' + $scope.menu_id + '/' + criteria_id);
132
133            }
134
135        }
136
137
138        //====== Function for  City click link =======//
139
140        $scope.getCityProperty = function (location_id, homes_id, condos_id) {
141            console.log(location_id + '##' + homes_id + '###' + condos_id);
142            if (homes_id != undefined && condos_id != undefined)
143                $location.path('/propertylist-criteria/' + location_id + '/' + homes_id + '/' + condos_id);
144            else if (homes_id != undefined && condos_id == undefined)
145                $location.path('/propertylist-criteria/' + location_id + '/' + homes_id);
146            else if (homes_id == undefined && condos_id != undefined)
147                $location.path('/propertylist-criteria/' + location_id + '/' + condos_id);
148        }
149
150        /* For Dynamic Meta data call Start */
151
152        $scope.allSetMeta = function () // Call all meta tag and social tag set for user/ default
153        {
154            var httpRequest = $http({
155                method: 'POST',
156                url: base_url + '/firsthometheme/all-social-meta',
157                data: {
158                    menu_id: $scope.menu_id,
159                    userid: $scope.userid
160                }
161
162            }).success(function (data, status) {
163                $scope.allsocialmeta = data.social_meta_des;
164                if ($scope.allsocialmeta.og_url == 1) {
165                    $scope.allsocialmeta.og_url = $location.absUrl();
166                }
167                /*console.log($scope.allsocialmeta);
168                console.log($location.absUrl());*/
169            });
170        }
171
172        /* For Dynamic Meta data call End */
173
174        //===========================================================================//
175        $scope.allSetMeta(); // self invoking
176        //===========================================================================//
177
178    });

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.