Skip to content

Commit b5134ca

Browse files
authored
Merge pull request #1174 from shreesh-webkul/tree-update
Updated: Helper tree | Created a new helper tree class for generating tree
2 parents 65c06ea + b827ee7 commit b5134ca

27 files changed

+714
-985
lines changed

admin/themes/default/sass/partials/_tree.sass

+9
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
font-size: $icon-size-base
88
.tree
99
list-style: none
10+
overflow: auto
1011
@include padding(0, 0, 0, 20px)
1112
input
1213
vertical-align: baseline
@@ -42,6 +43,14 @@
4243
&:hover
4344
color: #ccc
4445
background-color: none
46+
.node-hint
47+
font-style: italic
48+
color: #959595
49+
margin-left: 30px
50+
margin-top: -4px
51+
margin-bottom: 4px
52+
.badge
53+
margin-left: 5px
4554
.tree-actions
4655
display: inline-block
4756

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{*
2+
* Since 2010 Webkul.
3+
*
4+
* NOTICE OF LICENSE
5+
*
6+
* All right is reserved,
7+
* Please go through this link for complete license : https://store.webkul.com/license.html
8+
*
9+
* DISCLAIMER
10+
*
11+
* Do not edit or add to this file if you wish to upgrade this module to newer
12+
* versions in the future. If you wish to customize this module for your
13+
* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information.
14+
*
15+
* @author Webkul IN <support@webkul.com>
16+
* @copyright Since 2010 Webkul IN
17+
* @license https://store.webkul.com/license.html
18+
*}
19+
{extends file="helpers/tree/tree.tpl"}
20+
<script>
21+
{block name="script" append}
22+
$(document).ready(function () {
23+
$('#{$id|escape:'html':'UTF-8'}').find('[name="hotel_box[]"]').on('click', function(){
24+
if ($(this).is(":checked")) {
25+
$(this).closest('.tree-folder').find(':input[type=checkbox]').each(function(){
26+
$(this).prop('checked', true);
27+
$(this).parent().addClass('tree-selected');
28+
});
29+
} else {
30+
$(this).closest('.tree-folder').find(':input[type=checkbox]').each(function(){
31+
$(this).prop('checked', false);
32+
$(this).parent().removeClass('tree-selected');
33+
});
34+
}
35+
});
36+
});
37+
38+
{/block}
39+
</script>

admin/themes/default/template/controllers/normal_products/helpers/tree/tree_associated_hotels.tpl

-200
This file was deleted.

admin/themes/default/template/controllers/normal_products/helpers/tree/tree_toolbar.tpl

-31
This file was deleted.

admin/themes/default/template/controllers/normal_products/informations.tpl

+2-2
Original file line numberDiff line numberDiff line change
@@ -234,13 +234,13 @@
234234
</div>
235235
<div class="form-group" id="associated_hotel_rooms_tree" {if $product->service_product_type == Product::SERVICE_PRODUCT_WITHOUT_ROOMTYPE}style="display:none;"{/if}>
236236
<div class="col-lg-1"><span class="pull-right">{include file="controllers/products/multishop/checkbox.tpl" field="category_box" type="category_box"}</span></div>
237-
<label class="control-label col-lg-2" for="category_block">
237+
<label class="control-label col-lg-2" for="hotel_block">
238238
<span class="label-tooltip" data-toggle="tooltip" title="{l s='Select room type and hotels for which this service will be available.'}">
239239
{l s='Associated Hotels and Room Types'}
240240
</span>
241241
</label>
242242
<div class="col-lg-9">
243-
<div id="category_block">
243+
<div id="hotel_block">
244244
{$hotel_tree}
245245
</div>
246246
</div>

0 commit comments

Comments
 (0)