// BO product page fix js trigger order
This commit is contained in:
@@ -105,11 +105,11 @@
|
|||||||
{elseif $product->is_virtual}
|
{elseif $product->is_virtual}
|
||||||
onTabLoad('Informations', function(){
|
onTabLoad('Informations', function(){
|
||||||
$('#virtual_product').attr('checked', 'checked');
|
$('#virtual_product').attr('checked', 'checked');
|
||||||
|
$('#condition').attr('disabled', 'disabled');
|
||||||
|
$('#condition option[value=new]').attr('selected', 'selected');
|
||||||
});
|
});
|
||||||
$('li.tab-row a[id*="Pack"]').hide();
|
$('li.tab-row a[id*="Pack"]').hide();
|
||||||
$('li.tab-row a[id*="Shipping"]').hide();
|
$('li.tab-row a[id*="Shipping"]').hide();
|
||||||
$('#condition').attr('disabled', 'disabled');
|
|
||||||
$('#condition option[value=new]').attr('selected', 'selected');
|
|
||||||
{else}
|
{else}
|
||||||
onTabLoad('Informations', function(){
|
onTabLoad('Informations', function(){
|
||||||
$('#simple_product').attr('checked', 'checked');
|
$('#simple_product').attr('checked', 'checked');
|
||||||
@@ -158,24 +158,25 @@
|
|||||||
else if (product_type == {Product::PTYPE_VIRTUAL})
|
else if (product_type == {Product::PTYPE_VIRTUAL})
|
||||||
{
|
{
|
||||||
$('li.tab-row a[id*="VirtualProduct"]').show().click();
|
$('li.tab-row a[id*="VirtualProduct"]').show().click();
|
||||||
$('#is_virtual_good').attr('checked', true);
|
|
||||||
$('#virtual_good').show();
|
onTabLoad('VirtualProduct', function(){
|
||||||
$('#is_virtual').val(1);
|
$('#is_virtual_good').attr('checked', true);
|
||||||
$("#virtual_good_attributes").show();
|
|
||||||
// If the virtual product tab has not finished loaded the changes will be made when the loading event is triggered
|
|
||||||
$("#product-tab-content-VirtualProduct").bind('loaded', function(){
|
|
||||||
$('#virtual_good').show();
|
$('#virtual_good').show();
|
||||||
$('#is_virtual').val(1);
|
$('#is_virtual').val(1);
|
||||||
$("#virtual_good_attributes").show();
|
$("#virtual_good_attributes").show();
|
||||||
});
|
});
|
||||||
$("#product-tab-content-Quantities").bind('loaded', function(){
|
|
||||||
|
onTabLoad('Quantities', function(){
|
||||||
$('.stockForVirtualProduct').hide();
|
$('.stockForVirtualProduct').hide();
|
||||||
});
|
});
|
||||||
|
|
||||||
$('li.tab-row a[id*="Shipping"]').hide();
|
$('li.tab-row a[id*="Shipping"]').hide();
|
||||||
$('#condition').attr('disabled', 'disabled');
|
|
||||||
$('#condition option[value=refurbished]').removeAttr('selected');
|
onTabLoad('Informations', function(){
|
||||||
$('#condition option[value=used]').removeAttr('selected');
|
$('#condition').attr('disabled', 'disabled');
|
||||||
$('.stockForVirtualProduct').hide();
|
$('#condition option[value=refurbished]').removeAttr('selected');
|
||||||
|
$('#condition option[value=used]').removeAttr('selected');
|
||||||
|
});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -154,8 +154,8 @@
|
|||||||
<input type="hidden" id="is_virtual" name="is_virtual" value="{$product->is_virtual}" />
|
<input type="hidden" id="is_virtual" name="is_virtual" value="{$product->is_virtual}" />
|
||||||
<div>
|
<div>
|
||||||
<label>{l s='Does this product has an associated file?'}</label>
|
<label>{l s='Does this product has an associated file?'}</label>
|
||||||
<label class="radio_check" style="width:50px"><input type="radio" value="1" id="virtual_good_file_1" name="is_virtual_file" {if $product_downloaded}checked="checked"{/if} />{l s='Yes'}</label>
|
<label style="width:50px"><input type="radio" value="1" name="is_virtual_file" {if $product_downloaded}checked="checked"{/if} />{l s='Yes'}</label>
|
||||||
<label style="width:50px;"><input type="radio" value="0" id="virtual_good_file_2" name="is_virtual_file" {if !$product_downloaded}checked="checked"{/if} />{l s='No'}</label>
|
<label style="width:50px;"><input type="radio" value="0" name="is_virtual_file" {if !$product_downloaded}checked="checked"{/if} />{l s='No'}</label>
|
||||||
</div><br />
|
</div><br />
|
||||||
<div class="separation"></div>
|
<div class="separation"></div>
|
||||||
{if $download_product_file_missing}
|
{if $download_product_file_missing}
|
||||||
@@ -208,7 +208,7 @@
|
|||||||
<input type="hidden" id="virtual_product_filename" name="virtual_product_filename" value="{$product->productDownload->filename}" />
|
<input type="hidden" id="virtual_product_filename" name="virtual_product_filename" value="{$product->productDownload->filename}" />
|
||||||
<label class="t">{l s='Link to the file:'}</label>
|
<label class="t">{l s='Link to the file:'}</label>
|
||||||
</td>
|
</td>
|
||||||
<td class="col-right">
|
<td class="col-right">
|
||||||
{$product->productDownload->getHtmlLink(false, true)}
|
{$product->productDownload->getHtmlLink(false, true)}
|
||||||
<a onclick="return confirm('{l s='Delete this file'})')" href="{$currentIndex}&deleteVirtualProduct=true&token={$token}&id_product={$product->id}" class="red">
|
<a onclick="return confirm('{l s='Delete this file'})')" href="{$currentIndex}&deleteVirtualProduct=true&token={$token}&id_product={$product->id}" class="red">
|
||||||
<img src="../img/admin/delete.gif" alt="{l s='Delete this file'}"/>
|
<img src="../img/admin/delete.gif" alt="{l s='Delete this file'}"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user