' + place.name + '' + place.formatted_address;
+ var content = '
' + place.name + '
' + place.formatted_address + '
';
that.setFormVars({
lat: latLng.lat,
lng: latLng.lng,
@@ -142,7 +210,7 @@ var GoogleMapsManager = {
}
});
},
- addMarker: function(latLng, address = null, fa = null, cb = null) {
+ addMarker: function(latLng, address = null, fa = null, addInfoWindow = true, cb = null) {
var that = this;
that.clearAllMarkers();
var marker = new google.maps.Marker({
@@ -163,23 +231,36 @@ var GoogleMapsManager = {
});
});
- if (address === null && fa) {
- // open info window
- that.addInfoWindow(marker, fa);
+ if (addInfoWindow) {
+ if (address === null && fa) {
+ // open info window
+ that.addInfoWindow(marker, fa);
+ } else {
+ var request = {
+ placeId: address.place_id,
+ fields: ['name'],
+ };
+
+ that.placesService.getDetails(request, function(place, status) {
+ if (status === google.maps.places.PlacesServiceStatus.OK) {
+ // open info window
+ var content = '
' + place.name + '
' + address.formatted_address + '
';
+ that.addInfoWindow(marker, content);
+
+ if(cb && typeof cb === 'function') {
+ cb();
+ }
+ }
+ });
+ }
} else {
- var request = {
- placeId: address.place_id,
- fields: ['name'],
- };
- that.placesService.getDetails(request, function(place, status) {
- if (status === google.maps.places.PlacesServiceStatus.OK) {
- // open info window
- var content = '
' + place.name + '
' +
- address.formatted_address + '
';
- that.addInfoWindow(marker, content);
- }
- });
+ if(cb && typeof cb === 'function') {
+ cb();
+ }
+
+ return marker;
}
+
},
clearAllMarkers: function() {
for (var i = 0; i < this.markers.length; i++) {
@@ -190,13 +271,21 @@ var GoogleMapsManager = {
addInfoWindow: function(marker, content) {
if (typeof google === 'object') {
var that = this;
+
var infoWindow = new google.maps.InfoWindow({
content: content,
+ maxWidth: 200,
});
+
infoWindow.open({
anchor: marker,
map: that.map
});
+
+ google.maps.event.addListener(infoWindow, 'closeclick', function () {
+ that.clearAllMarkers();
+ });
+
var latLng = marker.getPosition();
that.setFormVars({
lat: latLng.lat(),
@@ -214,6 +303,10 @@ var GoogleMapsManager = {
},
}
+$(document).on('click', 'button.gm-ui-hover-effect', function () {
+ GoogleMapsManager.clearAllMarkers();
+});
+
function initGoogleMaps() {
if (typeof enabledDisplayMap != 'undefined'
&& typeof google === 'object'
@@ -767,6 +860,13 @@ function showLangField(select_lang_name, id_lang)
$('.all_lang_icon').attr('src', img_dir_l+id_lang+'.jpg');
$('#choosedLangId').val(id_lang);
+
+ var id_old_language = id_language;
+ id_language = id_lang;
+
+ if (id_old_language != id_lang) {
+ changeEmployeeLanguage();
+ }
}
/* ---- HotelConfigurationSettingController Admin ---- */
diff --git a/modules/hotelreservationsystem/views/js/admin/hotel_rooms_booking.js b/modules/hotelreservationsystem/views/js/admin/hotel_rooms_booking.js
index d02a0b756..ac723fcac 100644
--- a/modules/hotelreservationsystem/views/js/admin/hotel_rooms_booking.js
+++ b/modules/hotelreservationsystem/views/js/admin/hotel_rooms_booking.js
@@ -28,6 +28,8 @@ $(document).ready(function() {
url: rooms_booking_url,
method: 'POST',
extraParams: function() {
+ removeInitializedTooltips();
+
return $.extend(
{
ajax: true,
@@ -183,6 +185,14 @@ $(document).ready(function() {
calendar.render();
}
+ function removeInitializedTooltips() {
+ $('#fullcalendar a.day-info, #fullcalendar .fc-daygrid-event').each(function () {
+ if ($(this).data('ui-tooltip')) {
+ $(this).tooltip('destroy');
+ }
+ });
+ }
+
function getSearchData()
{
return {
@@ -869,6 +879,12 @@ $(document).ready(function() {
$("#cartModal").html(result.cart_content);
}
$("#cart_record").html(result.total_products_in_cart);
+
+ if (parseInt(result.total_products_in_cart) > 0) {
+ $('#cart_record').closest('button').removeClass('disabled');
+ } else {
+ $('#cart_record').closest('button').addClass('disabled');
+ }
}
}
});
diff --git a/modules/hotelreservationsystem/views/templates/admin/add_hotel/helpers/form/form.tpl b/modules/hotelreservationsystem/views/templates/admin/add_hotel/helpers/form/form.tpl
index 0afa3e37b..20e188368 100644
--- a/modules/hotelreservationsystem/views/templates/admin/add_hotel/helpers/form/form.tpl
+++ b/modules/hotelreservationsystem/views/templates/admin/add_hotel/helpers/form/form.tpl
@@ -292,7 +292,7 @@
{l s='Upload images' mod='hotelreservationsystem'} :
-
+
{if !isset($booking_product) || (isset($booking_product) && $booking_product == 1)}{l s='Booking Calender' mod='hotelreservationsystem'}{else}{l s='Service Products' mod='hotelreservationsystem'}{/if }
-
+
{if !isset($booking_product) || (isset($booking_product) && $booking_product == 1)}
diff --git a/modules/hotelreservationsystem/views/templates/admin/order_refund_rules/helpers/form/form.tpl b/modules/hotelreservationsystem/views/templates/admin/order_refund_rules/helpers/form/form.tpl
index e685b6898..76df5b221 100644
--- a/modules/hotelreservationsystem/views/templates/admin/order_refund_rules/helpers/form/form.tpl
+++ b/modules/hotelreservationsystem/views/templates/admin/order_refund_rules/helpers/form/form.tpl
@@ -133,3 +133,10 @@
+
+{block name=script}
+
+{/block}
diff --git a/modules/hotelreservationsystem/views/templates/admin/room_type_global_demand/helpers/form/form.tpl b/modules/hotelreservationsystem/views/templates/admin/room_type_global_demand/helpers/form/form.tpl
index 3c0448dbc..696bf3c9e 100644
--- a/modules/hotelreservationsystem/views/templates/admin/room_type_global_demand/helpers/form/form.tpl
+++ b/modules/hotelreservationsystem/views/templates/admin/room_type_global_demand/helpers/form/form.tpl
@@ -274,4 +274,11 @@
-
\ No newline at end of file
+
+
+{block name=script}
+
+{/block}
diff --git a/modules/statsbestcategories/statsbestcategories.php b/modules/statsbestcategories/statsbestcategories.php
index 1b6feb710..f776d314d 100644
--- a/modules/statsbestcategories/statsbestcategories.php
+++ b/modules/statsbestcategories/statsbestcategories.php
@@ -130,10 +130,6 @@ class StatsBestCategories extends ModuleGrid