From 6404f952f0ccc80f20a52e2ee61357a2ce6ff623 Mon Sep 17 00:00:00 2001 From: lLefevre Date: Wed, 23 Nov 2011 21:37:18 +0000 Subject: [PATCH] // fix bug added and remove attachement in AdminProductsController --- admin-dev/themes/template/products/form.tpl | 12 ++++++------ controllers/admin/AdminProductsController.php | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/admin-dev/themes/template/products/form.tpl b/admin-dev/themes/template/products/form.tpl index da06e336a..6f0fd40b1 100644 --- a/admin-dev/themes/template/products/form.tpl +++ b/admin-dev/themes/template/products/form.tpl @@ -135,16 +135,16 @@ $(document).ready(function(){ $("#product-tab-content-wait").hide(); var languages = new Array(); - if (id == 3) + if (id == "4-Combinations") populate_attrs(); - if (id == 7) + if (id == '7-Attachments') { - $("#addAttachment").click(function() { - return !$("#selectAttachment1 option:selected").remove().appendTo("#selectAttachment2"); - }); - $("#removeAttachment").click(function() { + $("#addAttachment").live('click', function() { return !$("#selectAttachment2 option:selected").remove().appendTo("#selectAttachment1"); }); + $("#removeAttachment").live('click', function() { + return !$("#selectAttachment1 option:selected").remove().appendTo("#selectAttachment2"); + }); $("#product").submit(function() { $("#selectAttachment1 option").each(function(i) { $(this).attr("selected", "selected"); diff --git a/controllers/admin/AdminProductsController.php b/controllers/admin/AdminProductsController.php index 13c9bf082..d51fc6c69 100644 --- a/controllers/admin/AdminProductsController.php +++ b/controllers/admin/AdminProductsController.php @@ -2595,7 +2595,7 @@ class AdminProductsControllerCore extends AdminController foreach ($attach1 as $attach) $content .= ''; $content .= '

- + '.$this->l('Remove').' >> @@ -2605,7 +2605,7 @@ class AdminProductsControllerCore extends AdminController foreach ($attach2 as $attach) $content .= ''; $content .= '

- + << '.$this->l('Add').'