// add loading tab product
This commit is contained in:
@@ -135,6 +135,8 @@ input.button[disabled=disabled]:hover{background-color:#FFF6D3}
|
||||
.table tr.last td{border-bottom:none}
|
||||
td.col-left {vertical-align:top; padding-right:10px;}
|
||||
#tabPane1 td.col-left { width:200px;}
|
||||
#product-tab-content-wait{display:block;background:url('../img/bg_loaderSpace.png');z-index:100;margin-left:140px;min-height:404px;padding:5px 10px 10px;}
|
||||
div#loading{height:128px;width:128px;background:url('../img/ajax-loader.gif');display:block;text-indent:-9999px;margin:100px auto;}
|
||||
td.col-left label { display:block; width:100%; text-align:right;}
|
||||
.alt_row{background-color:#f8f8f8}
|
||||
.path_bar{background-color:#E2EBEE;border:1px solid #999999;font-family:Trebuchet,Arial,Helvetica,sans-serif;font-size:13px;margin-bottom:20px;padding:5px}
|
||||
|
||||
@@ -177,7 +177,6 @@
|
||||
$("#product-tab-content-"+currentId).hide();
|
||||
}
|
||||
|
||||
$("#product-tab-content-wait").show();
|
||||
if ($("#product-tab-content-"+id).hasClass('not-loaded') && !$("#product-tab-content-"+id).hasClass('loading'))
|
||||
displayTabProductById(this, id, true);
|
||||
else
|
||||
@@ -185,7 +184,6 @@
|
||||
$("#product-tab-content-"+id).show();
|
||||
$("#link-"+id).addClass('selected');
|
||||
}
|
||||
$("#product-tab-content-wait").hide();
|
||||
|
||||
var languages = new Array();
|
||||
if (btn_name == "Combinations")
|
||||
@@ -234,7 +232,9 @@
|
||||
tb_pathToImage = "../img/loadingAnimation.gif";
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
|
||||
<div id="product-tab-content-wait" style="display:none"><div id="loading">{l s='Loading...'}</div></div>
|
||||
|
||||
<form id="product_form" action="{$form_action}" method="post" enctype="multipart/form-data" name="product">
|
||||
<input type="hidden" name="id_product" value="{$id_product}" />
|
||||
<div class="tab-pane" id="tabPane1">
|
||||
@@ -250,7 +250,6 @@
|
||||
</div>
|
||||
{/if}
|
||||
{* all input are here *}
|
||||
<div id="product-tab-content-wait" style="display:none" >{l s='loading ...'}</div>
|
||||
{foreach $product_tabs key=numStep item=tab}
|
||||
<div id="product-tab-content-{$tab.id}" class="{if !$tab.selected}not-loaded{/if} product-tab-content" {if !$tab.selected}style="display:none"{/if}>
|
||||
{if $tab.selected}
|
||||
|
||||
@@ -3889,7 +3889,7 @@ class AdminProductsControllerCore extends AdminController
|
||||
$this->addJqueryUI(array(
|
||||
'ui.core',
|
||||
'ui.widget',
|
||||
'ui.accordion'
|
||||
'ui.accordion'
|
||||
));
|
||||
|
||||
$this->addJS(array(
|
||||
|
||||
@@ -220,6 +220,10 @@ function displayTabProductById(el, id, selected)
|
||||
myurl = $(el).attr("href")+"&ajax=1";
|
||||
// Used to check if the tab is already in the process of being loaded
|
||||
$("#product-tab-content-"+id).addClass('loading');
|
||||
|
||||
if (selected)
|
||||
$('#product-tab-content-wait').show();
|
||||
|
||||
$.ajax({
|
||||
url : myurl,
|
||||
async : true,
|
||||
@@ -237,6 +241,7 @@ function displayTabProductById(el, id, selected)
|
||||
complete : function(data)
|
||||
{
|
||||
$("#product-tab-content-"+id).removeClass('loading');
|
||||
$('#product-tab-content-wait').hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user