diff --git a/admin-dev/themes/template/layout-ajax.tpl b/admin-dev/themes/template/layout-ajax.tpl
index 629b6a4f2..19937d0ab 100644
--- a/admin-dev/themes/template/layout-ajax.tpl
+++ b/admin-dev/themes/template/layout-ajax.tpl
@@ -25,12 +25,12 @@
*}
{if isset($json)}
{
- status:{$status},
- conf:{$json},
- informations:{$informations},
- error:{$errors},
- warnings:{$warnings},
- content:{$page}
+ "status":"{$status}",
+ "confirmations" : {$confirmations},
+ "informations" : {$informations},
+ "error" : {$errors},
+ "warnings" : {$warnings},
+ "content" : {$page}
}
{else}
@@ -67,8 +67,8 @@
{if isset($confirmations) && count($confirmations) && $confirmations}
- {foreach $confirmations as $conf}
- {$conf}
+ {foreach $confirmations as $confirm}
+ {$confirm}
{/foreach}
{/if}
diff --git a/admin-dev/themes/template/products/form.tpl b/admin-dev/themes/template/products/form.tpl
index a00281ba4..bffcdc767 100644
--- a/admin-dev/themes/template/products/form.tpl
+++ b/admin-dev/themes/template/products/form.tpl
@@ -41,7 +41,7 @@
{foreach $product_tabs key=numStep item=tab}
-
- {$tab.name}{*todo href when nojs*}
+ {$tab.name}{*todo href when nojs*}
{/foreach}
@@ -52,12 +52,18 @@
function showSaveButtons()
{
$('#desc-product-save').show();
+ $('#desc-product-cancel').show();
+ $('#desc-product-duplicate').show();
+ $('#desc-product-delete').show();
$('#desc-product-save-and-stay').show();
}
function hideSaveButtons()
{
$('#desc-product-save').hide();
+ $('#desc-product-cancel').hide();
+ $('#desc-product-duplicate').hide();
+ $('#desc-product-delete').hide();
$('#desc-product-save-and-stay').hide();
}
diff --git a/admin-dev/themes/template/products/images.tpl b/admin-dev/themes/template/products/images.tpl
index 35a174f2d..af37281f5 100644
--- a/admin-dev/themes/template/products/images.tpl
+++ b/admin-dev/themes/template/products/images.tpl
@@ -230,17 +230,15 @@
$(this).attr("src", $(this).attr("src").replace("enabled", "forbbiden"));
});
$(this).attr("src", $(this).attr("src").replace("forbbiden", "enabled"));
- $.ajax(
- {
- url : "ajax-tab.php",
- data : {
+ doAdminAjax({
"action":"UpdateCover",
"id_image":id,
"id_product" : {/literal}{$id_product}{literal},
"token" : "{/literal}{$token}{literal}",
- "tab" : "AdminProducts",
- "ajax" : 1 },
- });
+ "controller" : "AdminProducts",
+ "ajax" : 1 }
+ );
+
});
$('.image_shop').die().live('click', function()
@@ -250,32 +248,28 @@
active = true;
id = $(this).parent().parent().attr('id');
id_shop = $(this).attr("id").replace(id, "");
- $.ajax(
+ doAdminAjax(
{
- url : "ajax-tab.php",
- data : {
"action":"UpdateProductImageShopAsso",
"id_image":id,
"id_shop": id_shop,
"active":active,
"token" : "{/literal}{$token}{literal}",
"tab" : "AdminProducts",
- "ajax" : 1 },
+ "ajax" : 1
});
});
//function
function updateImagePositon(json)
{
- $.ajax(
- {
- url : "ajax-tab.php",
- data : {
+ doAdminAjax(
+ {
"action":"updateImagePosition",
"json":json,
"token" : "{/literal}{$token}{literal}",
"tab" : "AdminProducts",
- "ajax" : 1 },
+ "ajax" : 1
});
}