// fix adminproducts images, layout-ajax improvements
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10591 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -25,12 +25,12 @@
|
|||||||
*}
|
*}
|
||||||
{if isset($json)}
|
{if isset($json)}
|
||||||
{
|
{
|
||||||
status:{$status},
|
"status":"{$status}",
|
||||||
conf:{$json},
|
"confirmations" : {$confirmations},
|
||||||
informations:{$informations},
|
"informations" : {$informations},
|
||||||
error:{$errors},
|
"error" : {$errors},
|
||||||
warnings:{$warnings},
|
"warnings" : {$warnings},
|
||||||
content:{$page}
|
"content" : {$page}
|
||||||
}
|
}
|
||||||
{else}
|
{else}
|
||||||
|
|
||||||
@@ -67,8 +67,8 @@
|
|||||||
|
|
||||||
{if isset($confirmations) && count($confirmations) && $confirmations}
|
{if isset($confirmations) && count($confirmations) && $confirmations}
|
||||||
<div class="conf" style="display:block;">
|
<div class="conf" style="display:block;">
|
||||||
{foreach $confirmations as $conf}
|
{foreach $confirmations as $confirm}
|
||||||
{$conf}<br />
|
{$confirm}<br />
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</div><br />
|
</div><br />
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
<ul class="tab">
|
<ul class="tab">
|
||||||
{foreach $product_tabs key=numStep item=tab}
|
{foreach $product_tabs key=numStep item=tab}
|
||||||
<li class="tab-row">
|
<li class="tab-row">
|
||||||
<a class="tab-page {if $tab.selected}selected{/if}" id="link-{$tab.id}" href="{$tab.href}">{$tab.name}</a>{*todo href when nojs*}
|
<a class="tab-page {if $tab.selected}selected{/if}" id="link-{$tab.id}" href="{$tab.href}&updateproduct">{$tab.name}</a>{*todo href when nojs*}
|
||||||
</li>
|
</li>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</ul>
|
</ul>
|
||||||
@@ -52,12 +52,18 @@
|
|||||||
function showSaveButtons()
|
function showSaveButtons()
|
||||||
{
|
{
|
||||||
$('#desc-product-save').show();
|
$('#desc-product-save').show();
|
||||||
|
$('#desc-product-cancel').show();
|
||||||
|
$('#desc-product-duplicate').show();
|
||||||
|
$('#desc-product-delete').show();
|
||||||
$('#desc-product-save-and-stay').show();
|
$('#desc-product-save-and-stay').show();
|
||||||
}
|
}
|
||||||
|
|
||||||
function hideSaveButtons()
|
function hideSaveButtons()
|
||||||
{
|
{
|
||||||
$('#desc-product-save').hide();
|
$('#desc-product-save').hide();
|
||||||
|
$('#desc-product-cancel').hide();
|
||||||
|
$('#desc-product-duplicate').hide();
|
||||||
|
$('#desc-product-delete').hide();
|
||||||
$('#desc-product-save-and-stay').hide();
|
$('#desc-product-save-and-stay').hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -230,17 +230,15 @@
|
|||||||
$(this).attr("src", $(this).attr("src").replace("enabled", "forbbiden"));
|
$(this).attr("src", $(this).attr("src").replace("enabled", "forbbiden"));
|
||||||
});
|
});
|
||||||
$(this).attr("src", $(this).attr("src").replace("forbbiden", "enabled"));
|
$(this).attr("src", $(this).attr("src").replace("forbbiden", "enabled"));
|
||||||
$.ajax(
|
doAdminAjax({
|
||||||
{
|
|
||||||
url : "ajax-tab.php",
|
|
||||||
data : {
|
|
||||||
"action":"UpdateCover",
|
"action":"UpdateCover",
|
||||||
"id_image":id,
|
"id_image":id,
|
||||||
"id_product" : {/literal}{$id_product}{literal},
|
"id_product" : {/literal}{$id_product}{literal},
|
||||||
"token" : "{/literal}{$token}{literal}",
|
"token" : "{/literal}{$token}{literal}",
|
||||||
"tab" : "AdminProducts",
|
"controller" : "AdminProducts",
|
||||||
"ajax" : 1 },
|
"ajax" : 1 }
|
||||||
});
|
);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.image_shop').die().live('click', function()
|
$('.image_shop').die().live('click', function()
|
||||||
@@ -250,32 +248,28 @@
|
|||||||
active = true;
|
active = true;
|
||||||
id = $(this).parent().parent().attr('id');
|
id = $(this).parent().parent().attr('id');
|
||||||
id_shop = $(this).attr("id").replace(id, "");
|
id_shop = $(this).attr("id").replace(id, "");
|
||||||
$.ajax(
|
doAdminAjax(
|
||||||
{
|
{
|
||||||
url : "ajax-tab.php",
|
|
||||||
data : {
|
|
||||||
"action":"UpdateProductImageShopAsso",
|
"action":"UpdateProductImageShopAsso",
|
||||||
"id_image":id,
|
"id_image":id,
|
||||||
"id_shop": id_shop,
|
"id_shop": id_shop,
|
||||||
"active":active,
|
"active":active,
|
||||||
"token" : "{/literal}{$token}{literal}",
|
"token" : "{/literal}{$token}{literal}",
|
||||||
"tab" : "AdminProducts",
|
"tab" : "AdminProducts",
|
||||||
"ajax" : 1 },
|
"ajax" : 1
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
//function
|
//function
|
||||||
function updateImagePositon(json)
|
function updateImagePositon(json)
|
||||||
{
|
{
|
||||||
$.ajax(
|
doAdminAjax(
|
||||||
{
|
{
|
||||||
url : "ajax-tab.php",
|
|
||||||
data : {
|
|
||||||
"action":"updateImagePosition",
|
"action":"updateImagePosition",
|
||||||
"json":json,
|
"json":json,
|
||||||
"token" : "{/literal}{$token}{literal}",
|
"token" : "{/literal}{$token}{literal}",
|
||||||
"tab" : "AdminProducts",
|
"tab" : "AdminProducts",
|
||||||
"ajax" : 1 },
|
"ajax" : 1
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user