var _____WB$wombat$assign$function_____ = function(name) {return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name]; }; if (!self.__WB_pmw) { self.__WB_pmw = function(obj) { this.__WB_source = obj; return this; } } { let window = _____WB$wombat$assign$function_____("window"); let self = _____WB$wombat$assign$function_____("self"); let document = _____WB$wombat$assign$function_____("document"); let location = _____WB$wombat$assign$function_____("location"); let top = _____WB$wombat$assign$function_____("top"); let parent = _____WB$wombat$assign$function_____("parent"); let frames = _____WB$wombat$assign$function_____("frames"); let opener = _____WB$wombat$assign$function_____("opener"); /* * LaraClassifier - Classified Ads Web Application * Copyright (c) BeDigit. All Rights Reserved * * Website: https://laraclassifier.com * * LICENSE * ------- * This software is furnished under a license and may be used and copied * only in accordance with the terms of such license and with the inclusion * of the above copyright notice. If you Purchased from CodeCanyon, * Please read the full License from here - http://codecanyon.net/licenses/standard */ if (typeof loadingWd === 'undefined') { var loadingWd = 'Loading...'; } $(document).ready(function () { if (modalDefaultAdminCode !== 0 && modalDefaultAdminCode !== '') { changeCity(countryCode, modalDefaultAdminCode); } $('#modalAdminField').change(function () { changeCity(countryCode, $(this).val()); }); }); function changeCity(countryCode, modalDefaultAdminCode) { /* Check required variables */ if (typeof languageCode === 'undefined' || typeof countryCode === 'undefined' || typeof modalDefaultAdminCode === 'undefined') { return false; } let url = siteUrl + '/ajax/countries/' + strToLower(countryCode) + '/admin1/cities'; let adminCitiesEl = $('#adminCities'); let ajax = $.ajax({ method: 'POST', url: url, data: { 'languageCode': languageCode, 'adminCode': modalDefaultAdminCode, 'currSearch': $('#currSearch').val(), '_token': $('input[name=_token]').val() }, beforeSend: function() { let spinner = '
\n' + ' ' + loadingWd + '\n' + ' \n' + '
'; adminCitiesEl.html(spinner); } }); ajax.done(function (xhr) { if (typeof xhr.adminCode == 'undefined' || typeof xhr.adminName == 'undefined' || typeof xhr.adminCities == 'undefined') { adminCitiesEl.empty(); return false; } if (!isEmpty(xhr.adminName)) { $('#selectedAdmin strong').html(xhr.adminName); } $('#modalAdminField').val(xhr.adminCode).prop('selected'); adminCitiesEl.html(xhr.adminCities); /* Enable the tooltip */ /* To prevent the tooltip in bootstrap doesn't work after ajax, use selector on exist element like body */ let bodyEl = $('body'); bodyEl.tooltip({selector: '[data-bs-toggle="tooltip"]'}); }); ajax.fail(function(xhr) { adminCitiesEl.empty(); let message = getJqueryAjaxError(xhr); if (message !== null) { jsAlert(message, 'error', false, true); /* Close the Modal */ let modalEl = document.querySelector('#browseAdminCities'); if (typeof modalEl !== 'undefined' && modalEl !== null) { let modalObj = bootstrap.Modal.getInstance(modalEl); if (modalObj !== null) { modalObj.hide(); } } } }); } } /* FILE ARCHIVED ON 07:02:14 Jun 25, 2022 AND RETRIEVED FROM THE INTERNET ARCHIVE ON 07:56:45 Apr 08, 2025. JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE. ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. SECTION 108(a)(3)). */ /* playback timings (ms): captures_list: 0.671 exclusion.robots: 0.029 exclusion.robots.policy: 0.017 esindex: 0.013 cdx.remote: 12.198 LoadShardBlock: 194.749 (3) PetaboxLoader3.datanode: 108.963 (5) PetaboxLoader3.resolve: 182.53 (2) load_resource: 374.258 loaddict: 42.296 */