//carrier wizard range table auto size
This commit is contained in:
+7
-7
@@ -1,7 +1,7 @@
|
||||
<script>var zones_nbr = {$zones|count +3} ; /*corresponds to the third input text (max, min and all)*/</script>
|
||||
<div id="zone_ranges" style="overflow:auto">
|
||||
<h4>{l s='Tranches'}</h4>
|
||||
<table id="zones_table" class="table" style="width:100%">
|
||||
<table id="zones_table" class="table" style="max-width:100%">
|
||||
<tbody>
|
||||
<tr class="range_inf">
|
||||
<td class="range_type"></td>
|
||||
@@ -29,7 +29,7 @@
|
||||
<td class="border_left range_sign"><</td>
|
||||
{foreach from=$ranges key=r item=range}
|
||||
<td class="range_data">
|
||||
<div class="input-group">
|
||||
<div class="input-group fixed-width-md">
|
||||
<span class="input-group-addon weight_unit">{$PS_WEIGHT_UNIT}</span>
|
||||
<span class="input-group-addon price_unit">{$currency_sign}</span>
|
||||
<input class="form-control" name="range_sup[{$range.id_range|intval}]" type="text" {if isset($form_id) && !$form_id} value="" {else} value="{if isset($change_ranges) && $range.id_range == 0} {else}{$range.delimiter2|string_format:"%.6f"}{/if}" {/if}/>
|
||||
@@ -37,7 +37,7 @@
|
||||
</td>
|
||||
{foreachelse}
|
||||
<td class="range_data_new">
|
||||
<div class="input-group">
|
||||
<div class="input-group fixed-width-md">
|
||||
<span class="input-group-addon weight_unit">{$PS_WEIGHT_UNIT}</span>
|
||||
<span class="input-group-addon price_unit">{$currency_sign}</span>
|
||||
<input class="form-control" name="range_sup[{$range.id_range|intval}]" type="text" />
|
||||
@@ -49,19 +49,19 @@
|
||||
<td class="border_top border_bottom border_bold">
|
||||
<span class="fees_all" {if $ranges|count == 0}style="display:none" {/if}>All</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="">
|
||||
<input type="checkbox" onclick="checkAllZones(this);" class="form-control">
|
||||
</td>
|
||||
{foreach from=$ranges key=r item=range}
|
||||
<td class="border_top border_bottom {if $range.id_range != 0} validated {/if}" >
|
||||
<div class="input-group">
|
||||
<div class="input-group fixed-width-md">
|
||||
<span class="input-group-addon currency_sign" {if $range.id_range == 0} style="display:none" {/if}>{$currency_sign}</span>
|
||||
<input class="form-control" type="text" {if isset($form_id) && !$form_id} disabled="disabled"{/if} {if $range.id_range == 0} style="display:none"{/if} />
|
||||
</div>
|
||||
</td>
|
||||
{foreachelse}
|
||||
<td class="border_top border_bottom">
|
||||
<div class="input-group">
|
||||
<div class="input-group fixed-width-md">
|
||||
<span class="input-group-addon currency_sign" style="display:none">{$currency_sign}</span>
|
||||
<input class="form-control" style="display:none" type="text" />
|
||||
</div>
|
||||
@@ -78,7 +78,7 @@
|
||||
</td>
|
||||
{foreach from=$ranges key=r item=range}
|
||||
<td>
|
||||
<div class="input-group">
|
||||
<div class="input-group fixed-width-md">
|
||||
<span class="input-group-addon">{$currency_sign}</span>
|
||||
<input class="form-control" name="fees[{$zone.id_zone|intval}][{$range.id_range|intval}]" type="text"
|
||||
{if !isset($fields_value['zones'][$zone.id_zone]) || (isset($fields_value['zones'][$zone.id_zone]) && !$fields_value['zones'][$zone.id_zone])} disabled="disabled"{/if}
|
||||
|
||||
@@ -547,13 +547,13 @@ function add_new_range()
|
||||
|
||||
last_sup_val = $('tr.range_sup td:last input').val();
|
||||
//add new rand sup input
|
||||
$('tr.range_sup td:last').after('<td class="range_data"><div class="input-group"><span class="input-group-addon weight_unit" style="display: none;">'+PS_WEIGHT_UNIT+'</span><span class="input-group-addon price_unit" style="display: none;">'+currency_sign+'</span><input class="form-control" name="range_sup[]" type="text" /></div></td>');
|
||||
$('tr.range_sup td:last').after('<td class="range_data"><div class="input-group fixed-width-md"><span class="input-group-addon weight_unit" style="display: none;">'+PS_WEIGHT_UNIT+'</span><span class="input-group-addon price_unit" style="display: none;">'+currency_sign+'</span><input class="form-control" name="range_sup[]" type="text" /></div></td>');
|
||||
//add new rand inf input
|
||||
$('tr.range_inf td:last').after('<td class="border_bottom"><div class="input-group"><span class="input-group-addon weight_unit" style="display: none;">'+PS_WEIGHT_UNIT+'</span><span class="input-group-addon price_unit" style="display: none;">'+currency_sign+'</span><input class="form-control" name="range_inf[]" type="text" value="'+last_sup_val+'" /></div></td>');
|
||||
$('tr.fees_all td:last').after('<td class="border_top border_bottom"><div class="input-group"><span class="input-group-addon currency_sign" style="display:none" >'+currency_sign+'</span><input class="form-control" style="display:none" type="text" /></div></td>');
|
||||
$('tr.range_inf td:last').after('<td class="border_bottom"><div class="input-group fixed-width-md"><span class="input-group-addon weight_unit" style="display: none;">'+PS_WEIGHT_UNIT+'</span><span class="input-group-addon price_unit" style="display: none;">'+currency_sign+'</span><input class="form-control" name="range_inf[]" type="text" value="'+last_sup_val+'" /></div></td>');
|
||||
$('tr.fees_all td:last').after('<td class="border_top border_bottom"><div class="input-group fixed-width-md"><span class="input-group-addon currency_sign" style="display:none" >'+currency_sign+'</span><input class="form-control" style="display:none" type="text" /></div></td>');
|
||||
|
||||
$('tr.fees').each(function () {
|
||||
$(this).find('td:last').after('<td><div class="input-group"><span class="input-group-addon currency_sign">'+currency_sign+'</span><input class="form-control" disabled="disabled" name="fees['+$(this).data('zoneid')+'][]" type="text" /></div></td>');
|
||||
$(this).find('td:last').after('<td><div class="input-group fixed-width-md"><span class="input-group-addon currency_sign">'+currency_sign+'</span><input class="form-control" disabled="disabled" name="fees['+$(this).data('zoneid')+'][]" type="text" /></div></td>');
|
||||
});
|
||||
$('tr.delete_range td:last').after('<td><button class="btn btn-default">'+labelDelete+'</button</td>');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user