[-] FO : #PSTEST-95 : change default combination in AdminProductsController

This commit is contained in:
lLefevre
2011-12-21 14:34:26 +00:00
parent 96dfc30869
commit c4d13cba31
2 changed files with 9 additions and 3 deletions
@@ -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
*}
<a class="pointer edit" onclick="javascript:editProductAttribute('{$id}', '{getAdminToken tab='AdminProducts'}');" title="{l s='Modify this combination'}">
<a class="pointer edit" onclick="javascript:editProductAttribute('{$id}', '{getAdminToken tab='AdminProducts'}');" title="{l s='Modify this combination'}" ids="'{$id}'">
<img src="../img/admin/edit.gif" alt="{l s='Modify this combination'}" />
</a>
+8 -2
View File
@@ -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("<a title=\"Default\" onclick=\"javascript:defaultProductAttribute("+ids+", 'b3a62213044bad81d091b225780ba544', $(this).parent('td').parent('tr'));\" class=\"pointer default\"><img alt=\"Default\" src=\"../img/admin/asterisk.gif\"></a>");
}
});
parent.find('a.default').hide();
parent.css('background','#BDE5F8');