PageSourceSearch

https://recording.charlotteclerk.com/js/self/searchPlatsCondos.js

js charlotteclerk.com collected 2026-10-06 06:11:37 UTC 7,151 bytes, 200 lines download raw bytes

1$(function () {
2    $('#s10clearForm').on('click', clearForm);
3    $('#selectBook').show();
4    $('#typingFilter').hide();
5
6    $.ajax({
7        url: '/Search/GetLastVerified',
8        data: { __RequestVerificationToken: $('#__RequestVerificationToken').val() },
9        type: 'POST'
10    })
11        .done(function (data) {
12            verifyMessage = data;
13            $('#lblVerifyMessage').html(verifyMessage);
14        });
15})
16function getBookData() {
17    var bookId = $("#s10BookType").val();
18    return {
19        bookId: bookId
20    };
21}
22
23//function getBookListData() {
24//    var bookId = $("#s10BookType").val();
25//    var infilter = $("#s10Filter").val();
26//    return {
27//        bookId: bookId,
28//        infilter: infilter
29//    };
30//}
31
32function onChange() {
33    var comboBox = $("#s10Filter").data("kendoComboBox");
34    var text = comboBox.text();
35    if (comboBox.value() == 1) {
36        $('#selectBook').show();
37        $('#typingFilter').hide();
38    }
39    else {
40        $('#selectBook').hide();
41        $('#typingFilter').show();
42        $('#s10SearchLabel').text(text);
43        $('#s10Search').attr('placeholder', 'Enter ' + text);
44    }
45}
46
47function clearForm() {
48    var validator = $("#s10PlatsCondosForm").validate();
49    validator.resetForm();
50
51    $("#s10BookType").data("kendoComboBox").value("");
52
53    $('#s10Search').val('');
54}
55
56jQuery.validator.setDefaults({
57    highlight: function (element) {
58        jQuery(element).closest('.form-control').addClass('is-invalid');
59    },
60    unhighlight: function (element) {
61        jQuery(element).closest('.form-control').removeClass('is-invalid');
62    },
63    errorElement: 'span',
64    errorClass: 'label label-danger',
65    errorPlacement: function (error, element) {
66        if (element.parent('.input-group').length) {
67            error.insertAfter(element.parent());
68        } else {
69            error.insertAfter(element);
70        }
71    }
72});
73
74$.validator.addMethod("atLeastOneField", function (value, element, params) {
75    var field1Value = $('#s10Books').val();
76    var field2Value = $('#s10Search').val();
77    return (field1Value !== '' || field2Value !== '');
78}, "Please set a value.")
79
80$('#s10PlatsCondosForm').validate({
81    rules: {
82        s10BookType_input: {
83            required: true
84        },
85        s10Filter_input: {
86            required: true
87        },
88        s10Books_input: {
89            atLeastOneField: true
90        },
91        s10Search: {
92            atLeastOneField: true
93        }
94    },
95    messages: {
96        s10BookType: {
97            required: "Please select a book type.",
98            notEmpty: "Please select a valid book type." // Custom message for ComboBox
99        },
100        s10Filter: {
101            required: "Please select a filter.",
102            notEmpty: "Please select a valid filter."
103        },
104        s10Search: {
105            required: "Please enter a search parameter"
106        }
107    },
108    errorElement: 'span',
109    errorPlacement: function (error, element) {
110        error.addClass('invalid-feedback');
111        element.closest('.form-group').append(error);
112    },
113    highlight: function (element, errorClass, validClass) {
114        $(element).addClass('is-invalid');
115    },
116    unhighlight: function (element, errorClass, validClass) {
117        $(element).removeClass('is-invalid');
118    },
119    submitHandler: function (form, e) {
120
121        return false;
122    }
123});
124
125$("#s10PlatsCondosForm").submit(function (e) {
126
127    if ($(this).valid()) {
128
129        e.preventDefault(); // avoid to execute the actual submit of the form.
130        grecaptcha.ready(function () {
131            grecaptcha.execute($('#siteKey').data('message'), { action: 'search/bookpage' }).then(function (token) {
132                // Verificar el token del captcha
133                if (!token) {
134                    // Mostrar alerta si el token es inválido o no existe
135                    alert("Error: getting token re-captcha");
136                    return;
137                }
138
139                // Verificar el token del captcha del lado del servidor
140                var searchFilter = $("#s10Books").val();
141                if ($("#s10Filter").val() !== "1") {
142                    searchFilter = $("#s10Search").val()
143                }
144                console.log(searchFilter);
145                $.getJSON("/Home/Verify?token=" + token, function (data) {
146                    if (data) {
147                        var FromSearch = 'PLATCONDO';
148                        var DirectReverse = '';
149                        var FilterCriteria = $("#s10Filter").val();
150                        var CompressedName = '';
151                        var BookType = $("#s10BookType").val();
152                        var Book = searchFilter;
153                        var Page = '';
154                        var StartDate = '';
155                        var EndDate = '';
156                        var CaseNumber = '';
157                        var InstrumentNumber = '';
158                        var Legal = '';
159                        var StrDocumentTypeIds = '';
160
161                        // Redirigir a la página de visualización de documentos con los parámetros
162                        window.location = '/Render/ViewDocuments?' +
163                            'inFromSearch=' + FromSearch + '&' +
164                            'inDirectReverse=' + DirectReverse + '&' +
165                            'inFilterCriteria=' + FilterCriteria + '&' +
166                            'inCompressedName=' + CompressedName + '&' +
167                            'inBookType=' + BookType + '&' +
168                            'inBook=' + Book + '&' +
169                            'inPage=' + Page + '&' +
170                            'inStartDate=' + StartDate + '&' +
171                            'inEndDate=' + EndDate + '&' +
172                            'inCaseNumber=' + CaseNumber + '&' +
173                            'inInstrumentNumber=' + InstrumentNumber + '&' +
174                            'inLegal=' + Legal + '&' +
175                            'inDocumentTypeIds=' + StrDocumentTypeIds;
176                    } else {
177                        // Mostrar error si la verificación del token no fue exitosa
178                        alert("Error: CAPTCHA not verified correctly.");
179                        window.location = "/Home/Error";
180                    }
181                }).fail(function (ex) {
182                    console.log(ex);
183                    // Manejar el fallo de la solicitud JSON
184                    alert("Error: CAPTCHA not verified correctly.");
185                    window.location = "/Home/Error";
186                });
187            }).catch(function (error) {
188                // Capturar y manejar cualquier error durante la ejecución del captcha
189                console.error('Error executing CAPTCHA:', error);
190                alert("Error:CAPTCHA not executed correctly.");
191                window.location = "/Home/Error";
192            });
193        });
194
195    }
196    else {
197
198        return false;
199    }
200})

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.