| Server IP : 103.234.187.230 / Your IP : 216.73.216.216 Web Server : Apache System : Linux lserver42043-ind.megavelocity.net 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64 User : apache ( 48) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/b2c.hellogtx.com/public/js/ |
Upload File : |
function countWords(tx) {
return tx ? tx.replace(/ +/g, " ").replace(/\w+| $|^ /g, "").length + 1 : 0;
}
var HotelsTags = [];
if (hotel_enable_status == 'TJ_ENABLED') {
var DefaultCityHotels = [{
"CityId": 0,
"TBBCityId": 725862,
"CityName": "DELHI",
"countryTitle": "INDIA",
"CountryId": "101",
"label": "DELHI (INDIA)"
},
{
"CityId": 0,
"TBBCityId": 699261,
"CityName": "MUMBAI",
"countryTitle": "INDIA",
"CountryId": "101",
"label": "MUMBAI (INDIA)"
},
{
"CityId": 0,
"TBBCityId": 699356,
"CityName": "GOA",
"countryTitle": "INDIA",
"CountryId": "101",
"label": "GOA (INDIA)"
},
{
"CityId": 0,
"TBBCityId": 740075,
"CityName": "BENGALURU",
"countryTitle": "INDIA",
"CountryId": "101",
"label": "BENGALURU (INDIA)"
},
{
"CityId": 0,
"TBBCityId": 738801,
"CityName": "CHENNAI",
"countryTitle": "INDIA",
"CountryId": "101",
"label": "CHENNAI (INDIA)"
},
{
"CityId": 0,
"TBBCityId": 739947,
"CityName": "KOLKATA",
"countryTitle": "INDIA",
"CountryId": "101",
"label": "KOLKATA (INDIA)"
},
{
"CityId": 0,
"TBBCityId": 697486,
"CityName": "JAIPUR DISTRICT",
"countryTitle": "INDIA",
"CountryId": "101",
"label": "JAIPUR DISTRICT (INDIA)"
},
{
"CityId": 0,
"TBBCityId": 738891,
"CityName": "LUCKNOW",
"countryTitle": "INDIA",
"CountryId": "101",
"label": "LUCKNOW (INDIA)"
},
{
"CityId": 0,
"TBBCityId": 738356,
"CityName": "PATNA",
"countryTitle": "INDIA",
"CountryId": "101",
"label": "PATNA (INDIA)"
},
{
"CityId": 0,
"TBBCityId": 707176,
"CityName": "PUNE",
"countryTitle": "INDIA",
"CountryId": "101",
"label": "PUNE (INDIA)"
},
{
"CityId": 0,
"TBBCityId": 697010,
"CityName": "DUBAI",
"countryTitle": "UNITED ARAB EMIRATES",
"CountryId": "228",
"label": "DUBAI (UNITED ARAB EMIRATES)"
},
{
"CityId": 0,
"TBBCityId": 727326,
"CityName": "BANGKOK",
"countryTitle": "THAILAND",
"CountryId": "215",
"label": "BANGKOK (THAILAND)"
},
{
"CityId": 0,
"TBBCityId": 738005,
"CityName": "SINGAPORE",
"countryTitle": "SINGAPORE",
"CountryId": "190",
"label": "SINGAPORE (SINGAPORE)"
},
{
"CityId": 0,
"TBBCityId": 695869,
"CityName": "PATTAYA",
"countryTitle": "THAILAND",
"CountryId": "3623",
"label": "PATTAYA (THAILAND)"
},
{
"CityId": 0,
"TBBCityId": 111003,
"CityName": "KAYSERSBERG",
"countryTitle": "FRANCE",
"CountryId": "76",
"label": "KAYSERSBERG (FRANCE)"
},
{
"CityId": 0,
"TBBCityId": 111142,
"CityName": "LA CALEVIE",
"countryTitle": "FRANCE",
"CountryId": "76",
"label": "LA CALEVIE (FRANCE)"
},
{
"CityId": 0,
"TBBCityId": 111290,
"CityName": "LENTIER",
"countryTitle": "FRANCE",
"CountryId": "76",
"label": "LENTIER (FRANCE)"
},
{
"CityId": 0,
"TBBCityId": 113113,
"CityName": "BAIHU",
"countryTitle": "CHINA",
"CountryId": "46",
"label": "BAIHU (CHINA)"
}
];
} else if (hotel_enable_status == 'TBO_ENABLED') {
var DefaultCityHotels = [{
"CityId": 0,
"TBBCityId": 130443,
"CityName": "New Delhi",
"countryTitle": "INDIA",
"CountryCode": "IN",
"CountryId": "101",
"label": "New Delhi (INDIA)"
},
{
"CityId": 0,
"TBBCityId": 144306,
"CityName": "MUMBAI",
"countryTitle": "INDIA",
"CountryCode": "IN",
"CountryId": "101",
"label": "MUMBAI (INDIA)"
},
{
"CityId": 0,
"TBBCityId": 119805,
"CityName": "GOA",
"countryTitle": "INDIA",
"CountryCode": "IN",
"CountryId": "101",
"label": "GOA (INDIA)"
},
{
"CityId": 0,
"TBBCityId": 111124,
"CityName": "BENGALURU",
"countryTitle": "INDIA",
"CountryCode": "IN",
"CountryId": "101",
"label": "BENGALURU (INDIA)"
},
{
"CityId": 0,
"TBBCityId": 127343,
"CityName": "CHENNAI",
"countryTitle": "INDIA",
"CountryCode": "IN",
"CountryId": "101",
"label": "CHENNAI (INDIA)"
},
{
"CityId": 0,
"TBBCityId": 113128,
"CityName": "KOLKATA",
"countryTitle": "INDIA",
"CountryCode": "IN",
"CountryId": "101",
"label": "KOLKATA (INDIA)"
},
{
"CityId": 0,
"TBBCityId": 122175,
"CityName": "JAIPUR DISTRICT",
"countryTitle": "INDIA",
"CountryCode": "IN",
"CountryId": "101",
"label": "JAIPUR DISTRICT (INDIA)"
},
{
"CityId": 0,
"TBBCityId": 126666,
"CityName": "LUCKNOW",
"countryTitle": "INDIA",
"CountryCode": "IN",
"CountryId": "101",
"label": "LUCKNOW (INDIA)"
},
{
"CityId": 0,
"TBBCityId": 132429,
"CityName": "PATNA",
"countryTitle": "INDIA",
"CountryCode": "IN",
"CountryId": "101",
"label": "PATNA (INDIA)"
},
{
"CityId": 0,
"TBBCityId": 133133,
"CityName": "PUNE",
"countryTitle": "INDIA",
"CountryCode": "IN",
"CountryId": "101",
"label": "PUNE (INDIA)"
},
{
"CityId": 0,
"TBBCityId": 115936,
"CityName": "DUBAI",
"countryTitle": "United Arab Emirates",
"CountryCode": "AE",
"CountryId": "0",
"label": "DUBAI (UAE)"
},
];
}
$(".hotel_name_search").autocomplete({
source: function (request, response) {
if (request.term.replace(/ /g, '').length > 2) {
var query = request.term;
$.getJSON("/hotel/hotel-city", 'query=' + query, function (source) {
var term = $.ui.autocomplete.escapeRegex(request.term),
startsWithMatcher = new RegExp("^" + term, "i"),
startsWith = $.grep(source, function (value) {
return startsWithMatcher.test(value.CityName || value.value || value);
}),
containsMatcher = new RegExp(term, "i"),
contains = $.grep(source, function (value) {
return $.inArray(value, startsWith) < 0 &&
containsMatcher.test(value.label || value.value || value);
});
response(startsWith.concat(contains).slice(0, 15));
});
} else {
source = DefaultCityHotels;
var query = 'd';
var term = $.ui.autocomplete.escapeRegex(query),
startsWithMatcher = new RegExp("^" + term, "i"),
startsWith = $.grep(source, function (value) {
return startsWithMatcher.test(value.CityName || value.value || value);
}),
containsMatcher = new RegExp(term, "i"),
contains = $.grep(source, function (value) {
return $.inArray(value, startsWith) < 0 &&
containsMatcher.test(value.label || value.value || value);
});
response(startsWith.concat(contains).slice(0, 15));
}
},
minLength: 0,
autoFocus: true,
select: function (event, ui) {
var index = $(this).attr('index');
var value = ui.item.value;
ui.item.value = ui.item.CityName;
$('.hotelserchcls').prop("disabled", false);
$('.hotelCountry').html(ui.item.countryTitle);
$('#hidden_selected_hotel_cityid').val(ui.item.TBBCityId);
$('#hidden_selected_hotel_countryCode').val(ui.item.CountryCode);
$('#countryTitle').val(ui.item.countryTitle);
}
}).focus(function () {
$(this).autocomplete('search');
});
$("#selectDestinationInv").autocomplete({
source: function (request, response) {
var query = $("#selectDestinationInv").val();
var countryId = '';
$.getJSON("hotelsinv/index/get-city-hoteldata", {
query: query,
countryId: countryId
},
response);
},
minLength: 0,
autoFocus: true,
select: function (event, ui) {
var CityId = ui.item.CityId;
var TBBCityId = ui.item.TBBCityId;
var CityName = ui.item.CityName;
$("#hidden_selected_hotel_cityid").val(CityId);
$("#hidden_selected_hotel_TBBCityId").val(TBBCityId);
$("#hidden_selected_city_name").val(CityName);
$('.hotelserchcls').prop("disabled", false);
}
}).focus(function () {
$(this).autocomplete('search', '');
});