PageSourceSearch

https://www.tsgrealtyflorida.com/resources/assets/themes/1076/controllers/testimonialcontroller.js

js tsgrealtyflorida.com collected 2026-09-28 02:22:12 UTC 3,238 bytes, 80 lines download raw bytes

1'use strict';
2
3
4angular.module('dpiApp')
5    .controller('TestimonialController', function($scope, $timeout, $http, configService, $rootScope, $window, $location, $route, $routeParams) {
6        $scope.userid = isNaN(current_theme) ? user_id : current_theme; //408;
7        $scope.front_spinner = 0;
8        $scope.showSuccMsg = 0;
9        $scope.show_message = "";
10        $scope.change_class = '';
11        $scope.showErrMsg = 0;
12        $scope.contact = {};
13
14        // page heading Setting
15        if (typeof $scope.meta_heading[$routeParams.page_name] != 'undefined') {
16            $scope.page_heading = $scope.meta_heading[$routeParams.page_name];
17        } else {
18            $scope.$on('menudatareceived', function(event, args) {
19                $scope.page_heading = $scope.meta_heading[$routeParams.page_name];
20            });
21        }
22
23        /****** Get Current Route Name ******/
24        $scope.location = $location.path();
25        $scope.routeName = $route.current.$$route.name;
26        /****** Get Current Route Name ******/
27
28        /****** SUBMIT A TESTIMONIAL START ******/
29        $scope.submitTestimonial = function() {
30            var data = {
31                contact: $scope.contact,
32                member_id: $scope.userid, //Logged client_id
33            };
34
35            var httpRequest = $http({
36                    method: 'POST',
37                    url: base_url + '/firsthometheme/submit-testimonial',
38                    data: data
39                }).success(function(data, status) {
40                    $window.scrollTo(0, 0); // Scroll top
41                    if (data.success == 1) {
42                        $scope.showSuccMsg = 1;
43                        $scope.show_message = "Your testimonial has been sent successfully for approval. We will update you soon.";
44                        $scope.change_class = "alert alert-success";
45                        setTimeout(function() {
46                            $scope.showSuccMsg = 0;
47                        }, 2000);
48                        
49                        $scope.testimonialForm.reset();
50                    } else {
51                        $scope.showErrMsg = 1
52                        $scope.show_message = "Some error occured.";
53                        $scope.change_class = "alert alert-danger";
54                        setTimeout(function() {
55                            $scope.$apply(function() {
56                                $scope.showErrMsg = 0;
57                            });
58                        }, 2000);
59                    }
60                })
61                .error(function(data, status, header, config) {
62                    $window.scrollTo(0, 0); // Scroll top
63                    $scope.showErrMsg = 1
64                    $scope.show_message = "Some error occured.";
65                    $scope.change_class = "alert alert-danger";
66                    setTimeout(function() {
67                        $scope.$apply(function() {
68                            $scope.showErrMsg = 0;
69                        });
70                    }, 2000);
71                });
72        };
73
74        /****** SUBMIT A TESTIMONIAL END ******/
75
76
77
78    });
79
80/***************************************************************************************/

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.