diff --git a/blocktopmenu.php b/blocktopmenu.php index a7015a3..cc31055 100644 --- a/blocktopmenu.php +++ b/blocktopmenu.php @@ -579,7 +579,7 @@ protected function generateCategoriesOption($categories, $items_to_skip = null) foreach ($categories as $key => $category) { if (isset($items_to_skip) /*&& !in_array('CAT'.(int)$category['id_category'], $items_to_skip)*/) { $shop = (object) Shop::getShop((int)$category['id_shop']); - $html .= ''; } diff --git a/views/templates/admin/_configure/helpers/form/form.tpl b/views/templates/admin/_configure/helpers/form/form.tpl index 80f23a5..f9b66f5 100644 --- a/views/templates/admin/_configure/helpers/form/form.tpl +++ b/views/templates/admin/_configure/helpers/form/form.tpl @@ -39,7 +39,7 @@ $("#items").closest('form').on('submit', function(e) { $("#items option").prop('selected', true); }); $("#addItem").click(add); -$("#availableItems").dblclick(add); +$("#availableItems option:not([disabled])").dblclick(add); $("#removeItem").click(remove); $("#items").dblclick(remove); function add() @@ -56,6 +56,9 @@ function add() text = '{l s="Product ID #" mod='blocktopmenu' js=1}'+val; val = "PRD"+val; } + if($("#items option[value="+val+"]").length != 0){ + return false; + } $("#items").append(''); }); serialize();