[*] BO : #PSTEST-784 - selected attribute is now visible
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@13434 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
+17
-9
@@ -124,24 +124,24 @@ function defaultProductAttribute(ids, token, parent)
|
||||
});
|
||||
}
|
||||
|
||||
function editProductAttribute(ids, token)
|
||||
function editProductAttribute(url, parent)
|
||||
{
|
||||
var id = ids.split('||');
|
||||
$.ajax({
|
||||
url: 'index.php',
|
||||
url: url,
|
||||
data: {
|
||||
id_product: id[0],
|
||||
id_product_attribute: id[1],
|
||||
controller: 'AdminProducts',
|
||||
token: token,
|
||||
action: 'editProductAttribute',
|
||||
ajax: true
|
||||
id_product: id_product,
|
||||
ajax: true,
|
||||
action: 'editProductAttribute'
|
||||
},
|
||||
context: document.body,
|
||||
dataType: 'json',
|
||||
context: this,
|
||||
async: false,
|
||||
success: function(data) {
|
||||
// color the selected line
|
||||
parent.siblings().removeClass('selected-line');
|
||||
parent.addClass('selected-line');
|
||||
|
||||
$('#add_new_combination').show();
|
||||
$('#attribute_quantity').show();
|
||||
$('#product_att_list').html('');
|
||||
@@ -442,4 +442,12 @@ $(document).ready(function() {
|
||||
return false;
|
||||
})
|
||||
});
|
||||
|
||||
// Bind action edition on attribute list
|
||||
onTabLoad('Combinations', function(){
|
||||
$('table[name=list_table]').delegate('a.edit', 'click', function(e){
|
||||
e.preventDefault();
|
||||
editProductAttribute(this.href, $(this).closest('tr'));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user