Merge branch 'develop' into gli-2941
This commit is contained in:
@@ -478,41 +478,42 @@ $(document).ready(function() {
|
||||
$('.no-htl-access-option').on('click', function() {
|
||||
$(this).prop('selected', false);
|
||||
});
|
||||
initTooltip();
|
||||
}); //end dom ready
|
||||
|
||||
|
||||
function initTooltip() {
|
||||
if (!$('.tooltip-trigger').length) {
|
||||
return;
|
||||
}
|
||||
$('.tooltip-trigger').each(function () {
|
||||
if ($(this).data('ui-tooltip')) {
|
||||
return;
|
||||
}
|
||||
$(this).tooltip({
|
||||
content: $(this).siblings('.tooltip-content').html(),
|
||||
items: 'span',
|
||||
trigger: 'hover',
|
||||
tooltipClass: 'tooltip-popup',
|
||||
open: function (event, ui) {
|
||||
if (typeof event.originalEvent === 'undefined') {
|
||||
return false;
|
||||
}
|
||||
var $id = $(ui.tooltip).attr('id');
|
||||
if ($('div.ui-tooltip').not('#' + $id).length) {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
close: function (event, ui) {
|
||||
ui.tooltip.hover(
|
||||
function () { $(this).stop(true).fadeTo(400, 1); },
|
||||
function () { $(this).fadeOut(400, function () { $(this).remove(); }); }
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
function initTooltip($target, contentFn, items) {
|
||||
var $elements = $target || $('.tooltip-trigger');
|
||||
if (!$elements.length) {
|
||||
return;
|
||||
}
|
||||
$elements.each(function () {
|
||||
var $this = $(this);
|
||||
if (!contentFn && $this.data('ui-tooltip')) {
|
||||
return;
|
||||
}
|
||||
$this.tooltip({
|
||||
content: contentFn || $this.next('.tooltip-content').html(),
|
||||
items: items || 'span',
|
||||
trigger: 'hover',
|
||||
tooltipClass: 'tooltip-popup',
|
||||
open: function (event, ui) {
|
||||
if (event.buttons == 1 || event.buttons == 3) {
|
||||
ui.tooltip.remove();
|
||||
}
|
||||
if (typeof event.originalEvent === 'undefined') {
|
||||
return false;
|
||||
}
|
||||
var $id = $(ui.tooltip).attr('id');
|
||||
if ($('div.ui-tooltip').not('#' + $id).length) {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
close: function (event, ui) {
|
||||
ui.tooltip.hover(
|
||||
function () { $(this).stop(true).fadeTo(300, 1); },
|
||||
function () { $(this).fadeOut(300, function () { $(this).remove(); }); }
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
initTooltip();
|
||||
});
|
||||
@@ -3,6 +3,10 @@ Modernizr.load([
|
||||
test: window.matchMedia,
|
||||
nope: ["themes/default/js/vendor/matchMedia.js", "themes/default/js/vendor/matchMedia.addListener.js"]
|
||||
},
|
||||
"themes/default/js/vendor/enquire.min.js",
|
||||
"themes/default/js/admin-theme.js",
|
||||
{
|
||||
load: ["themes/default/js/vendor/enquire.min.js", "themes/default/js/admin-theme.js"],
|
||||
complete: function() {
|
||||
$(document).trigger('admin-theme.js.ready');
|
||||
}
|
||||
}
|
||||
]);
|
||||
@@ -309,36 +309,3 @@ body.display-modal
|
||||
.page-topbar
|
||||
#help-container
|
||||
margin-top: 140px
|
||||
.tooltip-trigger
|
||||
cursor: pointer
|
||||
display: inline-block
|
||||
vertical-align: middle
|
||||
margin-left: 4px
|
||||
|
||||
.ui-tooltip.tooltip-popup
|
||||
background: #ffffff
|
||||
border: 1px solid #ddd
|
||||
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2)
|
||||
color: #333333
|
||||
padding: 8px 12px
|
||||
font-size: 13px
|
||||
ul
|
||||
margin: 0
|
||||
padding: 0 0 0 16px
|
||||
list-style: disc
|
||||
li
|
||||
padding: 2px 0
|
||||
|
||||
.tooltip-row
|
||||
display: flex
|
||||
justify-content: space-between
|
||||
align-items: center
|
||||
gap: 12px
|
||||
margin: 3px 0
|
||||
white-space: nowrap
|
||||
label
|
||||
font-weight: 600
|
||||
margin: 0
|
||||
|
||||
.tooltip-cont
|
||||
max-width: 200px
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
.tooltip_cont
|
||||
min-width: 280px
|
||||
width: 100%
|
||||
font-size: 14px
|
||||
font-weight: 600
|
||||
@@ -7,6 +6,7 @@
|
||||
margin-bottom: 10px
|
||||
.tip-body > div
|
||||
margin-bottom: 6px
|
||||
margin-right: 10px
|
||||
|
||||
.tip_element_head
|
||||
font-size: 12px
|
||||
@@ -28,3 +28,30 @@
|
||||
border: none
|
||||
padding: 10px
|
||||
box-shadow: 0px 0px 15px 0px rgba(0, 0, 0, 0.15)
|
||||
width: auto
|
||||
|
||||
.tooltip-trigger
|
||||
cursor: pointer
|
||||
display: inline-block
|
||||
vertical-align: middle
|
||||
|
||||
|
||||
|
||||
.ui-tooltip.tooltip-popup
|
||||
ul
|
||||
margin: 0
|
||||
padding: 0 0 0 16px
|
||||
list-style: disc
|
||||
li
|
||||
padding: 2px 0
|
||||
|
||||
.tooltip-popup-row
|
||||
display: flex
|
||||
justify-content: space-between
|
||||
align-items: center
|
||||
gap: 12px
|
||||
margin: 3px 0
|
||||
white-space: nowrap
|
||||
label
|
||||
font-weight: 600
|
||||
margin: 0
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
{*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License version 3.0
|
||||
* that is bundled with this package in the file LICENSE.md
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/license/osl-3-0-php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to support@qloapps.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to a newer
|
||||
* versions in the future. If you wish to customize this module for your needs
|
||||
* please refer to https://store.webkul.com/customisation-guidelines for more information.
|
||||
*
|
||||
* @author Webkul IN
|
||||
* @copyright Since 2010 Webkul
|
||||
* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0
|
||||
*}
|
||||
|
||||
{capture name='tooltip_list_content'}
|
||||
<ul>
|
||||
{foreach $tooltip_items as $tooltip_item}
|
||||
<li>{$tooltip_item|escape:'html':'UTF-8'}</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
{/capture}
|
||||
{include file='helpers/tooltip.tpl' tooltip_content=$smarty.capture.tooltip_list_content allow_html=true}
|
||||
@@ -0,0 +1,47 @@
|
||||
{**
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License version 3.0
|
||||
* that is bundled with this package in the file LICENSE.md
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/license/osl-3-0-php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to support@qloapps.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to a newer
|
||||
* versions in the future. If you wish to customize this module for your needs
|
||||
* please refer to https://store.webkul.com/customisation-guidelines for more information.
|
||||
*
|
||||
* @author Webkul IN
|
||||
* @copyright Since 2010 Webkul
|
||||
* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0
|
||||
*}
|
||||
|
||||
{capture name='stay_periods_tooltip'}
|
||||
<div class="bootstrap tooltip_cont">
|
||||
<div class="tip_header">
|
||||
<div>{l s='Stay Periods'}</div>
|
||||
</div>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="tip_element_head">{l s='Duration'}</th>
|
||||
<th class="tip_element_head">{l s='Rooms'}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach from=$stay_periods item=stay_period}
|
||||
<tr>
|
||||
<td class="tip_element_value">{$stay_period.from} – {$stay_period.to}</td>
|
||||
<td class="tip_element_value center">{$stay_period.count}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{/capture}
|
||||
{capture name='stay_periods_tooltip_title'}<span class="badge tooltip-trigger">+{$extra_stay_periods_count}</span>{/capture}
|
||||
{include file='helpers/tooltip.tpl' tooltip_content=$smarty.capture.stay_periods_tooltip tooltip_title=$smarty.capture.stay_periods_tooltip_title}
|
||||
@@ -1404,6 +1404,7 @@
|
||||
{
|
||||
$("#customer_cart_details").empty();
|
||||
$("#customer_cart_details").append(res.cart_detail_html);
|
||||
initTooltip();
|
||||
|
||||
displaySummary(res);
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
{capture name='room_type_service_tooltip_content'}
|
||||
{assign var="priceCalcMethod" value=$product['price_calculation_method']|default:0}
|
||||
<div class="tooltip-cont">
|
||||
<div class="tooltip-row"><label>{l s='Applied on:'}</label></div>
|
||||
<div class="tooltip-popup-row"><label>{l s='Applied on:'}</label></div>
|
||||
<ul class="tooltip-days">
|
||||
{foreach from=Product::getPriceCalculationMethodDaysLabel($priceCalcMethod) item='pcmDayLabel'}
|
||||
<li>{$pcmDayLabel}</li>
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
{capture name='room_type_service_tooltip_content'}
|
||||
{assign var="priceCalcMethod" value=$service['price_calculation_method']|default:0}
|
||||
<div class="tooltip-cont">
|
||||
<div class="tooltip-row"><label>{l s='Applied on:'}</label></div>
|
||||
<div class="tooltip-popup-row"><label>{l s='Applied on:'}</label></div>
|
||||
<ul class="tooltip-days">
|
||||
{foreach from=Product::getPriceCalculationMethodDaysLabel($priceCalcMethod) item='pcmDayLabel'}
|
||||
<li>{$pcmDayLabel}</li>
|
||||
@@ -153,7 +153,7 @@
|
||||
{capture name='adm_pcm_tooltip_content'}
|
||||
{assign var="priceCalcMethod" value=$product['price_calculation_method']|default:0}
|
||||
<div class="tooltip-cont">
|
||||
<div class="tooltip-row"><label>{l s='Applied on:'}</label></div>
|
||||
<div class="tooltip-popup-row"><label>{l s='Applied on:'}</label></div>
|
||||
<ul class="tooltip-days">
|
||||
{foreach from=Product::getPriceCalculationMethodDaysLabel($priceCalcMethod) item='pcmDayLabel'}
|
||||
<li>{$pcmDayLabel}</li>
|
||||
@@ -323,7 +323,7 @@
|
||||
{capture name='room_type_service_pcm_tooltip_content'}
|
||||
{assign var="priceCalcMethod" value=$service['price_calculation_method']|default:0}
|
||||
<div class="tooltip-cont">
|
||||
<div class="tooltip-row"><label>{l s='Applied on:'}</label></div>
|
||||
<div class="tooltip-popup-row"><label>{l s='Applied on:'}</label></div>
|
||||
<ul class="tooltip-days">
|
||||
{foreach from=Product::getPriceCalculationMethodDaysLabel($priceCalcMethod) item='pcmDayLabel'}
|
||||
<li>{$pcmDayLabel}</li>
|
||||
|
||||
@@ -20,63 +20,22 @@
|
||||
* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0
|
||||
*}
|
||||
{if isset($htl_connected_rooms) && $htl_connected_rooms|@count > 0}
|
||||
<span class="connected-room-tooltip-trigger"
|
||||
data-connected-details='{json_encode($htl_connected_rooms.connected_room_types)|escape:'html':'UTF-8'}'>
|
||||
<i class="icon-random" style="color: #008abd; cursor: pointer;"></i>
|
||||
</span>
|
||||
{capture name='connected_room_tooltip'}
|
||||
<div class="tooltip_cont">
|
||||
<div class="tip_header"><div class="tip_date">{l s='Connected Rooms'}</div></div>
|
||||
<div class="tip-body tip-body-grid">
|
||||
{foreach from=$htl_connected_rooms.connected_room_types item=group}
|
||||
<div>
|
||||
<div class="tip_element_head">{$group.room_type_name|escape:'html':'UTF-8'}</div>
|
||||
<div class="tip_element_value">
|
||||
{foreach from=$group.connected_rooms item=room name=connected_rooms}
|
||||
{$room.name|escape:'html':'UTF-8'}{if !$smarty.foreach.connected_rooms.last}, {/if}
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
{/capture}
|
||||
{include file='helpers/tooltip.tpl' tooltip_content=$smarty.capture.connected_room_tooltip tooltip_icon_class='icon-random' tooltip_icon_style='color: #008abd;' }
|
||||
{/if}
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
{literal}
|
||||
if (typeof window.initConnectedRoomTooltips === 'undefined') {
|
||||
window.initConnectedRoomTooltips = function() {
|
||||
if (typeof $.fn.tooltip === 'undefined' || typeof $.ui === 'undefined' || typeof $.ui.tooltip === 'undefined') {
|
||||
return;
|
||||
}
|
||||
$('.connected-room-tooltip-trigger').each(function() {
|
||||
if ($(this).data('ui-tooltip')) {
|
||||
return;
|
||||
}
|
||||
$(this).tooltip({
|
||||
items: '.connected-room-tooltip-trigger',
|
||||
content: function() {
|
||||
var details = $(this).data('connected-details');
|
||||
if (!details || $.isEmptyObject(details)) {
|
||||
return "{/literal}{l s='No rooms connected' js=1}{literal}";
|
||||
}
|
||||
var html = '<div class="tooltip_cont">';
|
||||
html += '<div class="tip_header"><div class="tip_date">{/literal}{l s="Connected Rooms" js=1}{literal}</div></div>';
|
||||
html += '<div class="tip-body tip-body-grid">';
|
||||
for (var typeId in details) {
|
||||
var group = details[typeId];
|
||||
var names = [];
|
||||
for (var i = 0; i < group.connected_rooms.length; i++) {
|
||||
names.push(group.connected_rooms[i].name);
|
||||
}
|
||||
html += '<div>';
|
||||
html += '<div class="tip_element_head">' + group.room_type_name + '</div>';
|
||||
html += '<div class="tip_element_value">' + names.join(', ') + '</div>';
|
||||
html += '</div>';
|
||||
}
|
||||
html += '</div></div>';
|
||||
return html;
|
||||
},
|
||||
position: { my: "left top+10", at: "left bottom", collision: "flipfit", within: "#content" },
|
||||
close: function(event, ui) {
|
||||
ui.tooltip.hover(function() {
|
||||
$(this).stop(true).fadeTo(300, 1);
|
||||
},
|
||||
function() {
|
||||
$(this).fadeOut('300', function() {
|
||||
$(this).remove();
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
}
|
||||
window.initConnectedRoomTooltips();
|
||||
{/literal}
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -300,8 +300,8 @@
|
||||
{if $params.type == 'range'}
|
||||
{$field_name="`$list_id`Filter_{if isset($params.filter_key)}`$params.filter_key`{else}`$key`{/if}"}
|
||||
<div class="input_range">
|
||||
<input type="text" class="filter form-control" name="{$field_name}[0]" placeholder="{l s='From'}" value="{if isset($smarty.post[$field_name][0]) && $smarty.post[$field_name][0]}{$smarty.post[$field_name][0]}{elseif isset($params.value.0)}{$params.value.0}{/if}">
|
||||
<input type="text" class="filter form-control" name="{$field_name}[1]" placeholder="{l s='To'}" value="{if isset($smarty.post[$field_name][1]) && $smarty.post[$field_name][1]}{$smarty.post[$field_name][1]}{elseif isset($params.value.1)}{$params.value.1}{/if}">
|
||||
<input type="text" class="filter form-control" name="{$field_name}[0]" placeholder="{l s='From'}" value="{if isset($smarty.post[$field_name][0]) && $smarty.post[$field_name][0]}{$smarty.post[$field_name][0]|escape:'html':'UTF-8'}{elseif isset($params.value.0)}{$params.value.0}{/if}">
|
||||
<input type="text" class="filter form-control" name="{$field_name}[1]" placeholder="{l s='To'}" value="{if isset($smarty.post[$field_name][1]) && $smarty.post[$field_name][1]}{$smarty.post[$field_name][1]|escape:'html':'UTF-8'}{elseif isset($params.value.1)}{$params.value.1}{/if}">
|
||||
</div>
|
||||
{elseif $params.type == 'bool'}
|
||||
{$field_name="`$list_id`Filter_{if isset($params.filter_key)}`$params.filter_key`{else}`$key`{/if}"}
|
||||
@@ -314,14 +314,14 @@
|
||||
<div class="date_range">
|
||||
<div class="input-group center">
|
||||
<input type="text" class="filter datepicker date-input form-control" id="local_{$params.id_date}_0" name="local_{$params.name_date}[0]" placeholder="{l s='From'}" autocomplete="off"/>
|
||||
<input type="hidden" id="{$params.id_date}_0" name="{$params.name_date}[0]" value="{if isset($smarty.post[$params.name_date][0]) && $smarty.post[$params.name_date][0]}{$smarty.post[$params.name_date][0]}{elseif isset($params.value.0)}{$params.value.0}{/if}">
|
||||
<input type="hidden" id="{$params.id_date}_0" name="{$params.name_date}[0]" value="{if isset($smarty.post[$params.name_date][0]) && $smarty.post[$params.name_date][0]}{$smarty.post[$params.name_date][0]|escape:'html':'UTF-8'}{elseif isset($params.value.0)}{$params.value.0}{/if}">
|
||||
<span class="input-group-addon">
|
||||
<i class="icon-calendar"></i>
|
||||
</span>
|
||||
</div>
|
||||
<div class="input-group center">
|
||||
<input type="text" class="filter datepicker date-input form-control" id="local_{$params.id_date}_1" name="local_{$params.name_date}[1]" placeholder="{l s='To'}" autocomplete="off"/>
|
||||
<input type="hidden" id="{$params.id_date}_1" name="{$params.name_date}[1]" value="{if isset($smarty.post[$params.name_date][1]) && $smarty.post[$params.name_date][1]}{$smarty.post[$params.name_date][1]}{elseif isset($params.value.1)}{$params.value.1}{/if}">
|
||||
<input type="hidden" id="{$params.id_date}_1" name="{$params.name_date}[1]" value="{if isset($smarty.post[$params.name_date][1]) && $smarty.post[$params.name_date][1]}{$smarty.post[$params.name_date][1]|escape:'html':'UTF-8'}{elseif isset($params.value.1)}{$params.value.1}{/if}">
|
||||
<span class="input-group-addon">
|
||||
<i class="icon-calendar"></i>
|
||||
</span>
|
||||
@@ -398,7 +398,7 @@
|
||||
{/if}
|
||||
{else}
|
||||
{$field_name="`$list_id`Filter_{if isset($params.filter_key)}`$params.filter_key`{else}`$key`{/if}"}
|
||||
<input type="text" id="filter_input_{$key}" class="filter" name="{$field_name}" value="{if isset($smarty.post.$field_name) && $smarty.post.$field_name}{$smarty.post.$field_name}{else}{$params.value|escape:'html':'UTF-8'}{/if}" {if isset($params.width) && $params.width != 'auto'} style="width:{$params.width}px"{/if} />
|
||||
<input type="text" id="filter_input_{$key}" class="filter" name="{$field_name}" value="{if isset($smarty.post.$field_name) && $smarty.post.$field_name}{$smarty.post.$field_name|escape:'html':'UTF-8'}{else}{$params.value|escape:'html':'UTF-8'}{/if}" {if isset($params.width) && $params.width != 'auto'} style="width:{$params.width}px"{/if} />
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -20,21 +20,19 @@
|
||||
* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0
|
||||
*}
|
||||
|
||||
|
||||
<span class="tooltip-trigger{if isset($tooltip_class) && $tooltip_class} {$tooltip_class|escape:'html':'UTF-8'}{/if}">
|
||||
<img src="themes/default/img/icon-info.svg" />
|
||||
{if isset($tooltip_title) && $tooltip_title}
|
||||
{$tooltip_title nofilter}
|
||||
{elseif isset($tooltip_icon_class) && $tooltip_icon_class}
|
||||
<i class="{$tooltip_icon_class|escape:'html':'UTF-8'}"{if isset($tooltip_icon_style) && $tooltip_icon_style} style="{$tooltip_icon_style|escape:'html':'UTF-8'}"{/if}></i>
|
||||
{else}
|
||||
<img src="themes/default/img/icon-info.svg" alt="" />
|
||||
{/if}
|
||||
</span>
|
||||
|
||||
<div class="tooltip-content" style="display: none;">
|
||||
{if isset($tooltip_items) && $tooltip_items|@count}
|
||||
<ul class="tooltip-days">
|
||||
{foreach $tooltip_items as $item}
|
||||
<li>{$item|escape:'html':'UTF-8'}</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
{elseif isset($allow_html) && $allow_html}
|
||||
{$tooltip_content nofilter}
|
||||
{else}
|
||||
{$tooltip_content|escape:'html':'UTF-8'}
|
||||
{/if}
|
||||
{if isset($allow_html) && !$allow_html}
|
||||
{$tooltip_content|escape:'html':'UTF-8'}
|
||||
{else}
|
||||
{$tooltip_content nofilter}
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user