// update call loading page in AdminProductsController

This commit is contained in:
lLefevre
2012-01-02 14:25:39 +00:00
parent 051e24afe1
commit 72382926d7
3 changed files with 31 additions and 21 deletions
+1 -1
View File
@@ -136,7 +136,7 @@ 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');margin-left:140px;min-height:600px;padding:5px 10px 10px;}
#product-tab-content-wait{display:block;background:url('../img/bg_loaderSpace.png');position:absolute;width:100%;z-index:100;min-height:600px;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}
@@ -64,7 +64,7 @@
{block name="defaultForm"}
<div>
<div class="productTabs">
<div class="productTabs" style="display:none;">
<ul class="tab">
{foreach $product_tabs key=numStep item=tab}
<li class="tab-row">
@@ -76,23 +76,11 @@
</div>
<script type="text/javascript">
var toload = new Array();
var tabs_preloaded = new Array();
$('#product-tab-content-wait').show();
$(document).ready(function()
{
{foreach $tabs_preloaded as $k => $tab}
tabs_preloaded['{$k}'] = '{$tab}';
{/foreach}
$('.product-tab-content').each(function(){
var id = $(this).attr('id').substr(20);
var split_position = id.indexOf('-') + 1;
var btn_name = id.substr(split_position);
if (tabs_preloaded[btn_name])
if ($("#product-tab-content-"+id).hasClass('not-loaded'))
displayTabProductById('#link-'+id, id, false);
});
$('#product-tab-content-wait').show();
{if $is_pack}
$('#pack_product').attr('checked', 'checked');
$('li.tab-row a[id*="VirtualProduct"]').hide();
@@ -217,6 +205,27 @@
});
});
var tabs_preloaded = new Array();
$(window).bind("load", function() {
{foreach $tabs_preloaded as $k => $tab}
tabs_preloaded['{$k}'] = '{$tab}';
{/foreach}
$('.product-tab-content').each(function(){
var id = $(this).attr('id').substr(20);
var split_position = id.indexOf('-') + 1;
var btn_name = id.substr(split_position);
if (tabs_preloaded[btn_name])
if ($("#product-tab-content-"+id).hasClass('not-loaded'))
displayTabProductById('#link-'+id, id, false);
});
$('.productTabs').show();
$('#product_form').show();
$('#product-tab-content-wait').hide();
});
</script>
{***********************************************}
@@ -235,7 +244,7 @@
<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">
<form id="product_form" action="{$form_action}" method="post" enctype="multipart/form-data" name="product" style="display:none;">
<input type="hidden" name="id_product" value="{$id_product}" />
<div class="tab-pane" id="tabPane1">
{if !$product->active}
+4 -3
View File
@@ -221,8 +221,8 @@ function displayTabProductById(el, id, selected)
// 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();
if (selected)
$('#product-tab-content-wait').show();
$.ajax({
url : myurl,
@@ -241,7 +241,8 @@ function displayTabProductById(el, id, selected)
complete : function(data)
{
$("#product-tab-content-"+id).removeClass('loading');
$('#product-tab-content-wait').hide();
if (selected)
$('#product-tab-content-wait').hide();
}
});
}