PageSourceSearch

https://www.rastogiworld.com/public//storage/web/custom/js/common.js

js rastogiworld.com collected 2026-09-25 13:05:00 UTC 33,953 bytes, 924 lines download raw bytes

1let selectedType, selectedPlacement, selectedPlacementAllign, toastPlacement;
2let toastPlacementExample = document.querySelector('.toast-placement-ex');
3$(document).ready(function(){
4    $('#offcanvasBottom').offcanvas('show');
5
6    $(".mustHaveEdit").show();
7    $(".goodToHaveEdit").hide();
8    $("#mustHave-tab").click(function () {
9        $(".mustHaveEdit").show();
10        $(".goodToHaveEdit").hide();
11    });
12    $("#GooHave-tab").click(function () {
13        $(".mustHaveEdit").hide();
14        $(".goodToHaveEdit").show();
15    });
16
17    setTimeout(function () {
18		$('.disbaledValue').trigger('change');
19	}, 100);
20    $('.disbaledValue').on('select2:select', function (e) {
21        let selectedValues = $(this).val() || [];
22        let newSelection = e.params.data.id;
23        if (newSelection === 'Does Not Matter' && selectedValues.length > 1) {
24            // Clear others and keep only 'Does Not Matter'
25            $(this).val(['Does Not Matter']).trigger('change.select2');
26        } else if (newSelection !== 'Does Not Matter' && selectedValues.includes('Does Not Matter')) {
27            // Remove 'Does Not Matter' and keep newly selected
28            let updatedValues = selectedValues.filter(val => val !== 'Does Not Matter');
29            $(this).val(updatedValues).trigger('change.select2');
30        }
31    });
32
33    var deleteRecordMsg = 'Are you sure to proceed ?';
34    // Check All Check box: Date : 01-08-2023
35    $('body').on('click','.all_check',function(){
36        if ($(this).prop('checked') == true) {
37            $('.checkboxId').prop('checked', true);
38        } else {
39            $('.checkboxId').prop('checked', false);
40        }
41    });
42
43    $("#resultData").on("click", ".checkboxId", function() {
44        if ($(this).prop('checked') == true) {
45            // Checked Checkbox count is same all check box then all checkbox check
46            if ($('.checkboxId:checked').length == $('.checkboxId').length) {
47                $('.all_check').prop('checked', true);
48            }
49        } else {
50            $('.all_check').prop('checked', false);
51        }
52    });
53
54    // Action Status Update : Date : 01-08-2023
55	$('.actionBtn').click(function(){
56		var formData = new FormData();
57		if($('.checkboxId:checked').length <=0){
58			showNotification('top-0', 'end-0','bg-danger','withicon','fa fa-times','Please select at least one record to process!','Failed');
59			return false;
60		}
61		var checkboxId = [];
62		$('.checkboxId:checked').each(function() {
63			checkboxId.push($(this).val());
64		});
65		formData.append($(this).attr('data-column'),$(this).attr('data-value'));
66        formData.append('id',checkboxId);
67        var url = $('#changeStatusUrl').val();
68        // Delete Confirmation : Date : 01-08-2023
69        if($(this).attr("isconfirm") && $(this).attr("isconfirm") == 1){
70            if(confirm(deleteRecordMsg)){
71                ajaxRequest('#resultData',formData,url,'ajaxChangeStatusResponse');
72            }
73        }else{
74            // Other Action :
75            ajaxRequest('#resultData',formData,url,'ajaxChangeStatusResponse');
76        }
77    });
78
79    // Click On Pagination : Date : 01-08-2023
80    $("#resultData").on("click",".ajaxPagination", function(e){
81        e.preventDefault();
82        $('#page').val($(this).find('a').attr('data-page'));
83		getAjaxPaginationData();
84	});
85
86    // Search Ajax Data Click : Date : 01-08-2023
87    $('#commonSearch').click(function(){
88        $('#page').val(1);
89        getAjaxPaginationData();
90    });
91
92    // Search On Press Enter and If blank : Date : 01-08-2023
93    $("#searchText").keyup(function(event) {
94		if (event.keyCode === 13 || $(this).val() == '') {
95			$("#commonSearch").click();
96		}
97	});
98
99    // Record Per Page Change : Date : 01-08-2023
100    $('#recordLimit').change(function(){
101        if($(this).val() !=''){
102            $('#page').val(1);
103            getAjaxPaginationData();
104        }
105    });
106
107    // Tab Change Ajax data : Date : 01-08-2023
108    $('.tabClick').click(function(){
109        if(!$(this).hasClass('active')){
110            $('.tabClick').removeClass('active');
111            $(this).addClass('active');
112            $('#page').val(1);
113            getAjaxPaginationData();
114        }
115    });
116
117    $('#formSubmitBtn').click(function(e){
118		e.preventDefault();
119		if ($("#addEditForm").valid()) {
120			$('#addEditForm').trigger('submit');
121		}else{
122            return false;
123        }
124	});
125
126    $("body").on("click",".common-send-interest", function(e){
127        if ($(this).prop("disabled")) return;
128        $(this).prop("disabled", true);
129        let formData = new FormData();
130        formData.append('receiver_member_id',$(this).attr('data-id'));
131        let action = $("#base_url").val()+'/send-connection';
132        ajaxRequest($(this),formData,action,'ajaxSendInterestResponse');
133    });
134
135    $("body").on("click",".common-add-remove-shortlist", function(e){
136        if ($(this).prop("disabled")) return;
137        $(this).prop("disabled", true);
138        let formData = new FormData();
139        formData.append('receiver_member_id',$(this).attr('data-id'));
140        formData.append('value',$(this).attr('data-value'));
141        let action = $("#base_url").val()+'/add-remove-shortlist';
142        ajaxRequest($(this),formData,action,'ajaxAddRemoveShortListResponse');
143    });
144
145    $("body").on("click",".sendPhotoRequest", function(e){
146        if ($(this).prop("disabled")) return;
147        $(this).prop("disabled", true);
148        let formData = new FormData();
149        formData.append('receiver_member_id',$('#memberActionId').val());
150        // formData.append('value',$(this).attr('data-value'));
151        let action = $("#base_url").val()+'/photo-request/send';
152        ajaxRequest($(this),formData,action,'ajaxSendPhotoRequestResponse');
153    });
154
155    $('body').on('click', ".blockMemberProfile", function (e) {
156        if ($(this).prop("disabled")) return;
157        $(this).prop("disabled", true);
158		var formData = new FormData();
159		let memberId = $(this).attr('data-id');
160		let value = $(this).attr('data-value');
161		formData.append('id',memberId);
162		formData.append('value',value);
163		var action = $("#base_url").val()+'/blocked-member';
164		ajaxRequest($(this),formData,action,'responseBlockMemberProfile');
165	});
166
167    $(".submitSubscribeForm").click(function(e) {
168        if ($("#subscribeForm").valid()) {
169            e.preventDefault();
170            $(this).prop('disabled',true);
171            var formData = new FormData($('#subscribeForm')[0]);
172            var url = $('#subscribeForm').attr('action');
173            $(this).text('');
174			$(this).append("<div class='spinner-border' role='status'><span class='visually-hidden'>Loading... </span></div>").append('  Loading...');
175            ajaxRequest($(this),formData,url,'responseEmailSubscribe');
176        }else{
177            return false;
178        }
179    });
180
181    // Report Spam Profile Request:
182    $("body").on("click",".reportProfileSubmitBtn", function(e){
183        var _formId = '#'+$(this).data('formid');
184        if($(_formId).valid()) {
185            $(this).prop('disabled', true);
186            var formData = new FormData($(_formId)[0]);
187            formData.append('report_id',$('#report_id').val());
188            var url = $('#reportProfile').attr('action');
189            $(this).text('');
190			$(this).append("<i class='bx bx-loader-circle bx bx-spin fts-18'></i>").append(' Please wait...');
191            ajaxRequest($(this),formData,url,'responseReportSpamRequest');
192        }else{
193            return false;
194        }
195    });
196
197    $('body').on('click', "#userProfilecheck", function (e) {
198        e.preventDefault();
199        var formData = new FormData();
200        formData.append('dataKey',$(this).data('key'));
201        var baseUrl = $('#base_url').val();
202        var url = baseUrl+'/userProfileClick';
203        ajaxRequest($(this),formData,url,'responseUserProfileView');
204    });
205
206    $('.generateOTPSubmitBtn').click(function(){
207        var _formId = '#'+$(this).data('formid');
208        if($(_formId).valid()) {
209            $(this).prop('disabled', true);
210            var formData = new FormData($(_formId)[0]);
211            var url = $('#generateOTP').attr('action');
212            formData.append('otpType','SendOtp');
213            $(this).text('');
214			$(this).append("<i class='bx bx-loader-circle bx bx-spin fts-18'></i>").append(' Please wait...');
215            ajaxRequest($(this),formData,url,'responseSendOtp');
216        }else{
217            return false;
218        }
219    });
220
221    // Generate Otp
222    $('.verifyOtpSubmitBtn').click(function(){
223        var _formId = '#'+$(this).data('formid');
224        var otp1 = $('#otp1').val();
225        var otp2 = $('#otp2').val();
226        var otp3 = $('#otp3').val();
227        var otp4 = $('#otp4').val();
228        var otp5 = $('#otp5').val();
229        var otp6 = $('#otp6').val();
230        var checkOtp = otp1+otp2+otp3+otp4+otp5+otp6;
231        var formData = new FormData($(_formId)[0]);
232        formData.append('otp', checkOtp);
233        var url = $('#verifyMobileOtp').attr('action');
234        $(this).text('');
235        $(this).append("<i class='bx bx-loader-circle bx bx-spin fts-18'></i>").append(' Please wait...');
236        ajaxRequest($(this),formData,url,'responseVerifyOtp');
237    });
238
239    $('#resendOtp').click(function(){
240        var _formId = '#verifyMobileOtp';
241        if ($(_formId).valid()) {
242            $("#is_timer").show();
243            $("#resendOtp").hide();
244            timer_on_otp();
245            $(this).prop('disabled', true);
246            var formData = new FormData($(_formId)[0]);
247            formData.append('otpType','ResendOtp');
248            var baseUrl = $('#base_url').val();
249            var url = baseUrl+'/generate-mobile-otp';
250            ajaxRequest($(this), formData, url, 'responseResendOtp');
251        } else {
252            return false;
253        }
254    });
255	$('.sendConfirmationEmail').click(function(){
256        var formData = new FormData();
257        var baseUrl = $('#base_url').val();
258        var url = baseUrl+'/send-confirmation-email';
259        $(this).prop('disabled', true);
260        $(this).text('');
261        $(this).append("<i class='bx bx-loader-circle bx bx-spin fts-18'></i>").append(' Please wait...');
262        ajaxRequest($(this),formData,url,'responseSendConfirmationEmail');
263    });
264    $(".notificationUnread").click(function () {
265        let formData = new FormData;
266        var baseUrl = $('#base_url').val();
267        var url = baseUrl+'/notification-read';
268        ajaxRequest($(this), formData, url, 'responceNotificationRead');
269    });
270    $(document).on('click','.create-chat',function(){
271        var memberId = $(this).attr('data-id');
272        var memberMatriId = $(this).attr('data-matri');
273        var baseUrl = $('#base_url').val();
274        if(memberId !='' && memberMatriId !=''){
275            localStorage.removeItem('id');
276            localStorage.removeItem('matri_id');
277            localStorage.setItem('id', memberId);
278            localStorage.setItem('matri_id', memberMatriId);
279            window.location.href = baseUrl+'/custom-chat';
280        }
281    });
282});
283
284function responseUserProfileView(_this,response){
285    if(response.status == 'success'){
286        if (response.redirect != '' && response.redirect != undefined) {
287            window.location.href = response.redirect;
288        }
289    }
290}
291
292function responseBlockMemberProfile(_this,response){
293    $(_this).prop("disabled", false);
294	showResponseMessage(response);
295    if(response.status == 'success'){
296		$(_this).find('img').attr('src', response.data.blockedIcon);
297        if ($(_this).attr('data-value') == 0) {
298            $(_this).removeClass('filled');
299            $(_this).attr('data-value', 1);
300        } else {
301            // $(_this).addClass('filled');
302            $(_this).attr('data-value', 0);
303        }
304    }
305}
306
307function responceNotificationRead(_this, response){
308    if(response.status == 'success'){
309        $('#notificationRead').hide();
310    }
311}
312
313function responseResendOtp(_this, response) {
314	$(_this).prop('disabled', false);
315	var baseUrlImage = $('#baseUrlImage').val();
316    var sucessImgPath = baseUrlImage+'icons/Success-alert-icons.png';
317    var errorImgPath = baseUrlImage+'icons/error-input-icon.svg';
318    if(response.status == 'success'){
319        var message = '<img src="'+sucessImgPath+'" /> Success : '+ response.message;
320        $("#errorMsgNew").addClass('errorMsgNew d-none');
321        $("#successMsgNew").removeClass('successMsgNew d-none');
322        $("#successMsgNew").show();
323        $("#responseSucMsgNew").html(message);
324    }else{
325        var message = '<img src="'+errorImgPath+'" /> Error :'+ response.message;
326        $("#successMsgNew").addClass('successMsg d-none');
327        $("#errorMsgNew").removeClass('d-none');
328        $("#errorMsgNew").show();
329        $("#responseErrMsgNew").html(message);
330	}
331}
332
333function responseVerifyOtp(_this,response){
334    $(_this).prop('disabled', false);
335    $(_this).text('Verify');
336	var baseUrlImage = $('#baseUrlImage').val();
337    var sucessImgPath = baseUrlImage+'icons/Success-alert-icons.png';
338    var errorImgPath = baseUrlImage+'icons/error-input-icon.svg';
339    if(response.status == 'success'){
340        var message = '<img src="'+sucessImgPath+'" /> Success : '+ response.message;
341        $("#errorMsg").addClass('errorMsgNew d-none');
342        $("#successMsgNew").removeClass('successMsgNew d-none');
343        $("#responseSucMsgNew").html(message);
344        $("#successMsgNew").show();
345        $("#successMsgNew").fadeOut(5000);
346        setTimeout(function(){
347            location.reload();
348        }, 5100);
349    }else{
350        var message = '<img src="'+errorImgPath+'" /> Error :'+ response.message;
351        $("#successMsgNew").addClass('successMsgNew d-none');
352        $("#errorMsgNew").removeClass('d-none');
353        $("#errorMsgNew").show();
354        $("#responseErrMsgNew").html(message);
355        $("#errorMsgNew").fadeOut(5000);
356    }
357}
358
359function responseReportSpamRequest(_this,response){
360    $(_this).prop('disabled', false);
361    $(_this).text('Submit');
362    var baseUrlImage = $('#baseUrlImage').val();
363    var sucessImgPath = baseUrlImage+'icons/Success-alert-icons.png';
364    var errorImgPath = baseUrlImage+'icons/error-input-icon.svg';
365    if(response.status == 'success'){
366        var message = '<img src="'+sucessImgPath+'" /> Success : '+ response.message;
367        $("#errorMsgRS").addClass('errorMsgRS d-none');
368        $("#successMsgRS").removeClass('successMsgRS d-none');
369        $("#responseSucMsgRS").html(message);
370        $("#successMsgRS").show();
371        $("#successMsgRS").fadeOut(5000);
372        $("#reportProfile")[0].reset();
373    }else{
374        var message = '<img src="'+errorImgPath+'" /> Error :'+ response.message;
375        $("#successMsgRS").addClass('successMsgRS d-none');
376        $("#errorMsgRS").removeClass('d-none');
377        $("#errorMsgRS").show();
378        $("#responseErrMsgRS").html(message);
379        $("#errorMsgRS").fadeOut(5000);
380    }
381}
382
383function responseSendOtp(_this,response){
384    $(_this).prop('disabled', false);
385    $(_this).text('Generate OTP');
386    var baseUrlImage = $('#baseUrlImage').val();
387    var sucessImgPath = baseUrlImage+'icons/Success-alert-icons.png';
388    var errorImgPath = baseUrlImage+'icons/error-input-icon.svg';
389    if(response.status == 'success'){
390        var message = '<img src="'+sucessImgPath+'" /> Success : '+ response.message;
391        $("#errorMsg").addClass('errorMsgOTP d-none');
392        $("#successMsgOTP").removeClass('successMsgOTP d-none');
393        $("#responseSucMsgOTP").html(message);
394        $("#successMsgOTP").show();
395        $("#successMsgOTP").fadeOut(5000);
396        setTimeout(function(){
397            $("#generateOtp").hide();
398            $("#verifyOtp").removeClass('d-none');
399            $("#is_timer").show();
400            $("#resendOtp").hide();
401            timer_on_otp();
402            $('#otp1').focus();
403        }, 1000);
404    }else{
405        var message = '<img src="'+errorImgPath+'" /> Error :'+ response.message;
406        $("#successMsgOTP").addClass('successMsgOTP d-none');
407        $("#errorMsgOTP").removeClass('d-none');
408        $("#errorMsgOTP").show();
409        $("#responseErrMsgOTP").html(message);
410        $("#errorMsgOTP").fadeOut(5000);
411    }
412}
413
414function responseSendConfirmationEmail(_this,response){
415    $(_this).prop('disabled', false);
416    $(_this).text('Confirm Email');
417    var baseUrlImage = $('#baseUrlImage').val();
418    var sucessImgPath = baseUrlImage+'icons/Success-alert-icons.png';
419    var errorImgPath = baseUrlImage+'icons/error-input-icon.svg';
420    if(response.status == 'success'){
421        var message = '<img src="'+sucessImgPath+'" /> Success : '+ response.msg;
422        $("#errorMsg").addClass('errorMsgOTP d-none');
423        $("#successMsgEmail").removeClass('successMsgEmail d-none');
424        $("#responseSucMsgEmail").html(message);
425        $("#successMsgEmail").show();
426        $("#successMsgEmail").fadeOut(5000);
427        setTimeout(function() {
428            $('#emailVerification').modal("hide")
429        }, 5100);
430    }else{
431        var message = '<img src="'+errorImgPath+'" /> Error :'+ response.msg;
432        $("#errorMsgOTP").addClass('errorMsgOTP d-none');
433        $("#errorMsgEmail").removeClass('d-none');
434        $("#errorMsgEmail").show();
435        $("#responseErrMsgEmail").html(message);
436        $("#errorMsgEmail").fadeOut(5000);
437    }
438}
439function timer_on_otp() {
440	let timerOn = true;
441	function timer(remaining) {
442		var m = Math.floor(remaining / 60);
443		var s = remaining % 60;
444		m = m < 10 ? '0' + m : m;
445		s = s < 10 ? '0' + s : s;
446        let element = document.getElementById('timer');
447        if(element){
448			element.innerHTML = m + ':' + s;
449		}
450		remaining -= 1;
451		if(remaining >= 0 && timerOn) {
452			setTimeout(function() {
453				timer(remaining);
454			}, 1000);
455			return;
456		}
457		if(!timerOn) {
458			return;
459		}
460		$("#resendOtp").show();
461		$("#is_timer").hide();
462	}
463	timer(30);
464}
465
466function responseEmailSubscribe(_this,response){
467    var baseUrlImage = $('#baseUrlImage').val();
468    var sucessImgPath = baseUrlImage+'icons/Success-alert-icons.png';
469    var errorImgPath = baseUrlImage+'icons/error-input-icon.svg';
470    $(_this).prop('disabled',false);
471    $(_this).text('Send Now!');
472    if(response.status == 'success'){
473        var message = '<img src="'+sucessImgPath+'" /> Success : '+ response.message;
474        $("#errorMsgSus").addClass('errorMsgSus d-none');
475		$("#successMsgSus").removeClass('successMsgSus d-none');
476		$("#successMsgSus").show();
477        $("#responseSucMsgSus").html(message);
478        $("#successMsgSus").fadeOut(5000);
479    }else{
480        var message = '<img src="'+errorImgPath+'" /> Error :'+ response.message;
481		$("#successMsgSus").addClass('successMsgSus d-none');
482		$("#errorMsgSus").removeClass('d-none');
483		$("#errorMsgSus").show();
484        $("#responseErrMsgSus").html(message);
485		$("#errorMsgSus").fadeOut(6000);
486	}
487}
488
489// Common Ajax Request : Date : 31-07-2023
490function ajaxRequest(element, formData, requestUrl, responseFunction='') {
491	formData.append('isPost',1);
492    formData.append('_token',$("input[name=_token]").val());
493    $.ajax({
494        url: requestUrl,
495        type: 'POST',
496        processData: false,
497        contentType: false,
498        data: formData,
499
500        success: function(data) {
501            // var responseData = JSON.parse(data);
502            var responseData = data;
503			if (responseData.redirectUrl != '' && responseData.redirectUrl != undefined) {
504				window.location.href = responseData.redirectUrl;
505			}
506
507			// Call Back Function :
508			if (responseFunction !='') {
509            	window[responseFunction](element, responseData);
510			}
511
512            setTimeout(function() {
513                $("#overlay").fadeOut(300);
514            }, 500);
515        },
516        error: function(jqXHR, textStatus, errorThrown) {
517            $(element).prop('disabled', false);
518            if (jqXHR.status == 422){
519            }else{
520            }
521        }
522    });
523}
524
525// Scroll Top To element : Date : 01-08-2023
526function scrollTop(_this) {
527    $('html, body').animate({
528        scrollTop: $(_this).offset().top
529    }, 1000);
530}
531
532// // Show Notification : Date : 01-08-2023
533// function showNotification(placementFrom = 'top-0',placementAlign = 'end-0', state = 'bg-info', style = 'plain', icon = 'fa fa-bell', message = '', title = '', url = '') {
534//     var placementFrom = placementFrom;
535//     var placementAlign = placementAlign;
536//     var state = state;
537//     var style = style;
538
539//     if(toastPlacement) {
540//         toastDispose(toastPlacement);
541//     }
542//     $('.toast-title').text(title);
543//     $('.toast-body').text(message);
544//     selectedType = state;
545//     selectedPlacement = placementFrom;
546//     selectedPlacementAllign = placementAlign;
547//     toastPlacementExample.classList.add(selectedType);
548//     toastPlacementExample.classList.add(selectedPlacement);
549//     toastPlacementExample.classList.add(placementAlign);
550//     toastPlacement = new bootstrap.Toast(toastPlacementExample);
551//     toastPlacement.show();
552// }
553
554// // Dispose toast when open another
555// function toastDispose(toast) {
556//     if (toast && toast._element !== null) {
557//       if (toastPlacementExample) {
558//         toastPlacementExample.classList.remove(selectedType);
559//         toastPlacementExample.classList.remove(selectedPlacement);
560//         toastPlacementExample.classList.remove(selectedPlacementAllign);
561//       }
562//       toast.dispose();
563//     }
564// }
565
566function dropdownChange(currnet_id,disp_on,get_list) {
567	var base_url = $("#base_url").val();
568	url = base_url+ '/common-request/get-list';
569	currnet_val = $("#"+currnet_id).val();
570    if(currnet_val != 'Does Not Matter'){
571        if(currnet_val !='' && currnet_val != null ) {
572            var formData = new FormData();
573            formData.append('get_list',get_list);
574            formData.append('currnet_val',currnet_val);
575            formData.append('disp_on',disp_on);
576            if($('#'+disp_on).attr('data-value') != '' && typeof $('#'+disp_on).attr('data-value') !== 'undefined'){
577                formData.append('selectedVal', $('#'+disp_on).attr('data-value'));
578            }
579            ajaxRequest('#resultData',formData,url,'getListCommonResponse');
580        } else {
581            //$("#"+disp_on).html('<option value="">Please Select</option>');
582            $("#" + disp_on).val('').attr('data-value', '').trigger('change');
583            if(get_list =='caste_list') {
584                if($("#caste").length > 0) {
585                    $("#caste").html('<option value="">Select Caste</option>');
586                }
587            }
588            if(get_list =='state_list') {
589                if($("#city").length > 0) {
590                    $("#city").html('<option value="">Select City</option>');
591                }
592            }
593        }
594    }else{
595        if(get_list =='state_list' && currnet_val == 'Does Not Matter') {
596            if($("#state_id").length > 0) {
597                $("#state_id").html("<option value='Does Not Matter'>Does Not Matter</option>");
598            }
599        }
600        if(get_list =='caste_list' && currnet_val == 'Does Not Matter') {
601            if($("#caste").length > 0) {
602                $("#caste").html("<option value='Does Not Matter'>Does Not Matter</option>");
603            }
604            if($("#part_religion").length > 0) {
605                $("#part_caste").html("<option value='Does Not Matter'>Does Not Matter</option>");
606            }
607        }
608    }
609}
610function getDependecyList(from_id,to_id) {
611	var base_url = $("#base_url").val();
612	url = base_url+ '/common-request/get-search-list';
613    if(from_id !='' && from_id != null && to_id !='' && to_id != null) {
614
615        var selectedVal = [];
616        var i = 0;
617		$('input[name="' + from_id + '[]"]:checked').each(function() {
618            selectedVal[i] = this.value;
619            i++;
620		});
621
622        var selectedValTo = [];
623        var j = 0;
624		$('input[name="' + to_id + '[]"]:checked').each(function() {
625            selectedValTo[j] = this.value;
626            j++;
627		});
628
629        var formData = new FormData();
630        formData.append('listfrom',from_id);
631        formData.append('listto',to_id);
632        formData.append('value',selectedVal);
633        formData.append('value_to',selectedValTo);
634        ajaxRequest('#resultData',formData,url,'getDependencyCommonResponse');
635    }
636}
637
638
639// Get List Common Response :
640function getDependencyCommonResponse(_this,response){
641    if(response.status == 'success'){
642        $("#listDisplay_"+response.listTo).html(response.html);
643    }
644}
645
646
647// Get List Common Response :
648function getListCommonResponse(_this,response){
649    if(response.status == 'success'){
650        $("#"+response.data.disp_on).html(response.html);
651        if(response.data.disp_on =='part_religion'){
652            if($("#part_religion").length > 0){
653                $("#part_caste").append('<option value="Does Not Matter">Does Not Matter</option>');
654            }
655        }
656        if(response.data.get_list =='state_list'){
657            if($("#city").length > 0){
658                $("#city").html('<option value="">
658Select City</option>');
659            }
660        }
661    }
662}
663
664// Check Two Value Same : Date : 29-01-2021
665function isSameValue(value1 = '', value2 = '') {
666    var returnValue = false;
667    if (value1 == value2) {
668        returnValue = true;
669    }
670    return returnValue;
671}
672
673function razorPaySubmit(){
674    $('#razorpaySubmitBtn').submit();
675}
676function razorPaySubmitEvent(){
677    $('#razorpaySubmitEventBtn').submit();
678}
679
680// Append Message :
681function appendNewMessageReceiver(notificationData){
682    let html = '<div class="recive-sms-rm">'+notificationData.message+
683                    '<div class="d-flex gap-1 align-items-center justify-content-end">'+
684                        '<div class="msgtimes fts-10 heading-color-L FFM-Medium">'+ notificationData.display_time +'</div>'+
685                    '</div>'+
686                '</div>';
687    $('body').find('#chatConversation').find('#messageList').append(html);
688    $('body').find('#chatConversation').find('#chatDiv').scrollTop($('#chatDiv')[0].scrollHeight);;
689}
690
691$(document).ready(function() {
692    $("#leftSideScroll").click(function() {
693        var scrollDistance = 600;
694        $(".mobile_overflowchats").animate({scrollLeft: '+=' + scrollDistance}, 'fast');
695    });
696    $('body').on('click','#rightClickchat',function(){
697        var scrollDistance = 0;
698        $(".mobile_overflowchats").animate({scrollLeft: '-=' - scrollDistance}, 'fast');
699    });
700    $('.ctmcropclose').on('click', function() {
701        $(this).closest('.modal').hide(); // Hides the closest modal container
702        $('#registerCrop').modal('hide');
703        $('.modal-backdrop').hide();
704    });
705});
706
707
708function responseAddEditMember(_this,response){
709	$(_this).prop('disabled', false);
710    if(response.status == 'success'){
711		showNotification('top-0','end-0','bg-success','withicon','fa fa-check',response.msg,'Success');
712        setTimeout(function(){
713			$(_this).prop('disabled', false);
714            var activeNav = $('.nav-link.active');
715			var liActive = $(activeNav).removeClass('active');
716			if($(activeNav).closest('li').next("li").find("button").length > 0){
717                $(activeNav).closest('li').next("li").find("button").addClass('active');
718				var oldActiveTabContent = $(activeNav).attr("data-bs-target");
719				var newActiveTabContent = $(activeNav).closest('li').next("li").find("button").attr("data-bs-target");
720
721				// After Success Response Old Active Tab Mode Change :
722				var _oldActiveFormId = '#'+$(_this).data('formid');
723				if(response.data.mode == 'add'){
724					// $(_oldActiveFormId).find('#id'+response.data.step).val(response.data.member_id);
725					// $(_oldActiveFormId).find('#mode'+response.data.step).val('edit');
726					// $(newActiveTabContent).find('form').find($('[name ="id"]')).val(response.data.member_id);
727					// $(newActiveTabContent).find('form').find($('[name ="mode"]')).val('edit');
728					$('#mode').val('edit');
729					$('#id').val(response.data.member_id);
730				}
731				$(oldActiveTabContent).removeClass('active show');
732				$(newActiveTabContent).addClass('active show');
733			}else{
734				window.location.href = $('#successUrl').val();
735			}
736		}, 1000);
737    }else{
738		$(_this).prop('disabled', false);
739        showNotification('top-0','end-0','bg-danger','withicon','fa fa-times',response.msg,'Failed');
740	}
741}
742
743function getMemberId(member_id){
744    $('#memberActionId').val(member_id);
745}
746
747function ajaxSendInterestResponse(_this, response) {
748    $(_this).prop("disabled", false);
749    $("html, body").animate({ scrollTop: 0 }, "fast");
750	showResponseMessage(response);
751    if (response.status == 'success') {
752        // $(_this).addClass('filled');
753        $(_this).find('img').attr('src', response.data.iconUrl);
754    }
755}
756
757function ajaxAddRemoveShortListResponse(_this, response) {
758    $(_this).prop("disabled", false);
759    $("html, body").animate({ scrollTop: 0 }, "fast");
760	showResponseMessage(response);
761    if (response.status == 'success') {
762        $(_this).find('img').attr('src', response.data.iconUrl);
763        if ($(_this).attr('data-value') == 0) {
764            $(_this).removeClass('filled');
765            $(_this).attr('data-value', 1);
766        } else {
767            // $(_this).addClass('filled');
768            $(_this).attr('data-value', 0);
769        }
770    }
771}
772function ajaxSendPhotoRequestResponse(_this, response) {
773    $(_this).prop("disabled", false);
774	var baseUrlImage = $('#baseUrlImage').val();
775    var sucessImgPath = baseUrlImage+'icons/Success-alert-icons.png';
776    var errorImgPath = baseUrlImage+'icons/error-input-icon.svg';
777    if (response.status == 'success') {
778        var message = '<img src="'+sucessImgPath+'" /> Success : '+ response.message;
779        $("#errorMsgPR").addClass('errorMsgPR d-none');
780		$("#successMsgPR").removeClass('successMsgPR d-none');
781		$("#successMsgPR").show();
782        $("#responseSucMsgPR").html(message);
783        $("#successMsgPR").fadeOut(5000);
784        setTimeout(function() {
785            $('#photoRequest').modal("hide")
786        }, 5100);
787    } else {
788        var message = '<img src="'+errorImgPath+'" /> Error :'+ response.message;
789        $("#successMsgPR").addClass('successMsgPR d-none');
790		$("#errorMsgPR").removeClass('d-none');
791		$("#errorMsgPR").show();
792        $("#responseErrMsgPR").html(message);
793        $("#errorMsgPR").fadeOut(5000);
794    }
795}
796
797function showResponseMessage(response) {
798    var baseUrlImage = $('#baseUrlImage').val();
799    var sucessImgPath = baseUrlImage + 'icons/Success-alert-icons.png';
800    var errorImgPath = baseUrlImage + 'icons/error-input-icon.svg';
801    if (response.status == 'success') {
802        var message = '<img src="'+sucessImgPath+'" /> Success : ' + response.message;
803        $("#errorMsg").hide();
804        $("#successMsg").removeClass('d-none').stop(true,true).fadeIn(300);
805        $("#responseSucMsg").html(message);
806        $("#successMsg").delay(5000).fadeOut(600);
807    } else {
808        var message = '<img src="'+errorImgPath+'" /> Error : ' + response.message;
809        $("#successMsg").hide();
810        $("#errorMsg").removeClass('d-none').stop(true,true).fadeIn(300);
811        $("#responseErrMsg").html(message);
812        $("#errorMsg").delay(5000).fadeOut(600);
813    }
814}
815
816function copyToClipboard() {
817    let e = $("<input>");
818    $("body").append(e);
819    let t = $("#copyText1").val();
820    e.val(t).select();
821    document.execCommand("copy");
822    e.remove();
823    alert("Link Copied SuccessFully");
824}
825
826// Show Loader:
827function showLoader(){
828    $('#pageLoader').removeClass('d-none');
829}
830
831function hideLoader(){
832    setTimeout(function () {
833       $('#pageLoader').addClass('d-none');
834    });
835}
836
837window.addEventListener('load', function () {
838    if (window.innerWidth <= 768) {
839        const target = document.querySelector('.li_deleteProfile');
840        if (target) {
841            const rect = target.getBoundingClientRect();
842            const offsetTop = rect.top + window.scrollY;
843
844            // Scroll to the element's position + 100px extra
845            window.scrollTo({
846                top: offsetTop + 100,
847                behavior: 'smooth'
848            });
849        }
850    }
851});
852
853function saveSearch(formName) {
854    var _formId = '#savedSearch';
855    if ($(_formId).valid()) {
856        var searchName;
857        switch (formName) {
858            case 'quickSearchForm':
859                searchName = $("#quick_search_name").val();
860                $("#quick_save_search").val(searchName);
861                break;
862            case 'advanceSearchForm':
863                searchName = $("#advance_search_name").val();
864                $("#advance_save_search").val(searchName);
865                break;
866            case 'keywordSearchForm':
867                searchName = $("#keyword_search_name").val();
868                $("#keyword_save_search").val(searchName);
869                break;
870            default:
871                break;
872        }
873        if (formName && document.getElementById(formName)) {
874            document.getElementById(formName).submit();
875        }
876    } else {
877        return false;
878    }
879}
880
881function isNumberKey(evt) {
882    var charCode = (evt.which) ? evt.which : evt.keyCode;
883
884    // Allow backspace, tab, delete, arrows
885    if (
886        charCo
886de == 8 ||   // backspace
887        charCode == 9 ||   // tab
888        charCode == 37 ||  // left arrow
889        charCode == 39 ||  // right arrow
890        charCode == 46     // delete
891    ) {
892        return true;
893    }
894
895    // Allow numbers 0–9
896    if (charCode >= 48 && charCode <= 57) {
897        return true;
898    }
899
900    return false;
901}
902
903function onlyAlphabets(evt) {
904    var charCode = (evt.which) ? evt.which : evt.keyCode;
905
906    // Allow backspace, delete, tab, arrow keys, and space
907    if (
908        charCode == 8 ||   // backspace
909        charCode == 9 ||   // tab
910        charCode == 32 ||  // space
911        charCode == 37 ||  // left arrow
912        charCode == 39 ||  // right arrow
913        charCode == 46     // delete
914    ) {
915        return true;
916    }
917
918    // Allow A-Z and a-z
919    if ((charCode >= 65 && charCode <= 90) || (charCode >= 97 && charCode <= 122)) {
920        return true;
921    }
922
923    return false;
924}

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.