// adding the dynamic loading of tabs in products
This commit is contained in:
@@ -74,21 +74,8 @@
|
|||||||
|
|
||||||
$("#product-tab-content-wait").show();
|
$("#product-tab-content-wait").show();
|
||||||
|
|
||||||
if ($("#product-tab-content-"+id).hasClass('not-loaded') || $(this).hasClass('selected'))
|
if ($("#product-tab-content-"+id).hasClass('not-loaded'))
|
||||||
{
|
displayTabProductById(this, id, true);
|
||||||
myurl = $(this).attr("href")+"&ajax=1";
|
|
||||||
$.ajax({
|
|
||||||
url : myurl,
|
|
||||||
async : true,
|
|
||||||
success :function(data)
|
|
||||||
{
|
|
||||||
$("#product-tab-content-"+id).html(data);
|
|
||||||
$("#product-tab-content-"+id).removeClass('not-loaded');
|
|
||||||
$("#product-tab-content-"+id).show();
|
|
||||||
$("#link-"+id).addClass('selected');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$("#product-tab-content-"+id).show();
|
$("#product-tab-content-"+id).show();
|
||||||
|
|||||||
@@ -37,6 +37,14 @@
|
|||||||
updateMvtStatus($(this).val());
|
updateMvtStatus($(this).val());
|
||||||
});
|
});
|
||||||
updateMvtStatus($(this).val());
|
updateMvtStatus($(this).val());
|
||||||
|
|
||||||
|
$('.product-tab-content').each(function(){
|
||||||
|
var id = $(this).attr('id').substr(20);
|
||||||
|
|
||||||
|
if ($("#product-tab-content-"+id).hasClass('not-loaded'))
|
||||||
|
displayTabProductById('#link-'+id, id, false);
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
function updateMvtStatus(id_mvt_reason)
|
function updateMvtStatus(id_mvt_reason)
|
||||||
{
|
{
|
||||||
@@ -621,8 +629,8 @@ var accessories = new Array();
|
|||||||
</table>
|
</table>
|
||||||
<br />
|
<br />
|
||||||
</div>
|
</div>
|
||||||
|
{*
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
toggleVirtualProduct(getE('is_virtual_good'));
|
toggleVirtualProduct(getE('is_virtual_good'));
|
||||||
</script>
|
</script>*}
|
||||||
|
|||||||
@@ -204,6 +204,26 @@ function editProductAttribute(ids, token)
|
|||||||
}
|
}
|
||||||
/* END Combination */
|
/* END Combination */
|
||||||
|
|
||||||
|
function displayTabProductById(el, id, selected)
|
||||||
|
{
|
||||||
|
myurl = $(el).attr("href")+"&ajax=1";
|
||||||
|
$.ajax({
|
||||||
|
url : myurl,
|
||||||
|
async : true,
|
||||||
|
success :function(data)
|
||||||
|
{
|
||||||
|
$("#product-tab-content-"+id).html(data);
|
||||||
|
$("#product-tab-content-"+id).removeClass('not-loaded');
|
||||||
|
|
||||||
|
if (selected)
|
||||||
|
{
|
||||||
|
$("#link-"+id).addClass('selected');
|
||||||
|
$("#product-tab-content-"+id).show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function addPackItem()
|
function addPackItem()
|
||||||
{
|
{
|
||||||
if ($('#curPackItemId').val() == '' || $('#curPackItemName').val() == '')
|
if ($('#curPackItemId').val() == '' || $('#curPackItemName').val() == '')
|
||||||
|
|||||||
Reference in New Issue
Block a user