// fixed adminproduct > combinations
[*] BO : now if you click on an AdminProduct sub tab (combinations, prices) already selected, this will reload it. git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9823 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
<a href="#" onclick="$('#add_new_combination').slideToggle();return false;"><img src="../img/admin/add.gif" alt="" />{l s='Add a new combination'}</a>
|
||||
<a href="#" onclick="$('#add_new_combination').slideToggle();return false;">
|
||||
<img src="../img/admin/add.gif" alt="" />{l s='Add a new combination'}
|
||||
</a>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$(\'#id_mvt_reason\').change(function(){
|
||||
@@ -118,8 +120,8 @@
|
||||
<p><input id="virtual_product_file_attribute" name="virtual_product_file_attribute" onchange="uploadFile2();" maxlength="'.$this->maxFileSize.'" type="file"></p>
|
||||
<div id="upload-confirmation2">
|
||||
|
||||
<p id="gethtmlink" style="display: none;">{l s='This is the link'} : {$productDownload->getHtmlLink(false, true)}
|
||||
<a id="make_downloadable_product_attribute" onclick="return confirm('.addslashes("{l s='Delete this file' slashes=1}")).')" href="index.php?tab=AdminProducts&id_product={$id_product}&id_category={$id_category}&token={$token}&deleteVirtualProductAttribute=true" class="red">{l s='Delete this file'}</a></p>
|
||||
<p id="gethtmlink" style="display: none;">{l s='This is the link'} : {$product->productDownload->getHtmlLink(false, true)}
|
||||
<a id="make_downloadable_product_attribute" onclick="return confirm('.addslashes("{l s='Delete this file' slashes=1}")).')" href="index.php?tab=AdminProducts&id_product={$product->productDownload->id_product}&id_category={$id_category}&token={$token}&deleteVirtualProductAttribute=true" class="red">{l s='Delete this file'}</a></p>
|
||||
|
||||
<a
|
||||
|
||||
@@ -286,9 +288,5 @@
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
{$content}
|
||||
|
||||
@@ -50,12 +50,22 @@ $(document).ready(function(){
|
||||
currentId = $(".productTabs a.selected").attr('id').substr(5);
|
||||
// id is the wanted producttab id
|
||||
id = $(this).attr('id').substr(5);
|
||||
$(".tab-page").removeClass('selected');
|
||||
$("#product-tab-content-"+currentId).hide();
|
||||
$("#product-tab-content-wait").show();;
|
||||
|
||||
if ($(this).attr("id") != $(".productTabs a.selected").attr('id'))
|
||||
{
|
||||
$(".tab-page").removeClass('selected');
|
||||
$("#product-tab-content-"+currentId).hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (confirm(' {l s='Do you really want to reload the current tab (all modifications will be lost)'}'))
|
||||
$("#product-tab-content-"+currentId).html();
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
if($("#product-tab-content-"+id).hasClass('not-loaded'))
|
||||
$("#product-tab-content-wait").show();
|
||||
|
||||
if ($("#product-tab-content-"+id).hasClass('not-loaded') || $(this).hasClass('selected'))
|
||||
{
|
||||
myurl = $(this).attr("href")+"&ajax=1";
|
||||
$.ajax({
|
||||
@@ -63,6 +73,7 @@ $(document).ready(function(){
|
||||
async : true,
|
||||
success :function(data)
|
||||
{
|
||||
$("#product-tab-content-wait").hide();
|
||||
$("#product-tab-content-"+id).html(data);
|
||||
$("#product-tab-content-"+id).removeClass('not-loaded');
|
||||
$("#product-tab-content-"+id).show();
|
||||
@@ -212,7 +223,7 @@ $(document).ready(function(){
|
||||
<input type="hidden" name="id_product" value="{$id_product}" />
|
||||
<input type="hidden" name="tabs" id="tabs" value="0" />
|
||||
<div class="tab-pane" id="tabPane1">
|
||||
<div id="product-tab-content-wait" style="display:none" ></div>
|
||||
<div id="product-tab-content-wait" style="display:none" >{l s='loading ...'}</div>
|
||||
{if !$newproduct}
|
||||
{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}>
|
||||
|
||||
Reference in New Issue
Block a user