From 099baaef7050bed6bb5e32806c6ae6db23b1d460 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Gaillard?= Date: Wed, 21 Aug 2013 19:14:59 +0200 Subject: [PATCH] // small change on specific price rules after condition deletion --- .../specific_price_rule/helpers/form/form.tpl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/admin-dev/themes/default/template/controllers/specific_price_rule/helpers/form/form.tpl b/admin-dev/themes/default/template/controllers/specific_price_rule/helpers/form/form.tpl index 7cbc61b89..5e8d4e00d 100755 --- a/admin-dev/themes/default/template/controllers/specific_price_rule/helpers/form/form.tpl +++ b/admin-dev/themes/default/template/controllers/specific_price_rule/helpers/form/form.tpl @@ -161,6 +161,13 @@ function add_condition(id_condition_group, type, value) function delete_condition(condition) { delete conditions[condition]; + + to_delete = $('#'+condition).prev(); + if ($(to_delete).children().hasClass('btn_delete_condition')) + $(to_delete).remove(); + else + $('#'+condition).next().remove(); + $('#'+condition).remove(); return false; } @@ -178,7 +185,7 @@ function new_condition_group() function appendConditionToGroup(html) { if ($('#condition_group_'+current_id_condition_group+' table tbody tr').length > 0) - $('#condition_group_'+current_id_condition_group+' table tbody').append('{l s='AND' js=1}'); + $('#condition_group_'+current_id_condition_group+' table tbody').append('{l s='AND' js=1}'); $('#condition_group_'+current_id_condition_group+' table tbody').append(html); }