From 30979108a328c2bded30f1f539299331e37c7301 Mon Sep 17 00:00:00 2001 From: lLefevre Date: Wed, 21 Dec 2011 14:34:26 +0000 Subject: [PATCH] [-] FO : #PSTEST-95 : change default combination in AdminProductsController --- .../template/products/combinaison/list_action_edit.tpl | 2 +- js/admin-products.js | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/admin-dev/themes/template/products/combinaison/list_action_edit.tpl b/admin-dev/themes/template/products/combinaison/list_action_edit.tpl index a055f68bd..f03aa0c91 100644 --- a/admin-dev/themes/template/products/combinaison/list_action_edit.tpl +++ b/admin-dev/themes/template/products/combinaison/list_action_edit.tpl @@ -23,6 +23,6 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} - + {l s='Modify this combination'} \ No newline at end of file diff --git a/js/admin-products.js b/js/admin-products.js index 6bcc45e56..d50295932 100644 --- a/js/admin-products.js +++ b/js/admin-products.js @@ -107,8 +107,14 @@ function defaultProductAttribute(ids, token, parent) if (data.status == 'ok') { showSuccessMessage(data.message); - $('table.table').find('tr').each(function(){ - $(this).attr('style', ''); + $('table.table').find('tr').attr('style', function() { + var style = $(this).attr('style'); + if (style) + { + $(this).attr('style', ''); + var ids = $(this).find('a.edit').attr('ids'); + $(this).find('a.edit').after("\"Default\""); + } }); parent.find('a.default').hide(); parent.css('background','#BDE5F8');