// Tree bugs

This commit is contained in:
Jerome Nadaud
2013-09-12 15:22:47 +02:00
parent bc221b993b
commit c105486fa3
5 changed files with 4 additions and 9 deletions
+2 -3
View File
@@ -139,7 +139,7 @@ class HelperFormCore extends Helper
case 'shop' :
$disable_shops = isset($params['disable_shared']) ? $params['disable_shared'] : false;
$params['html'] = $this->renderAssoShop($params['tree'], $disable_shops);
$params['html'] = $this->renderAssoShop($disable_shops);
if (Shop::getTotalShops(false) == 1)
unset($this->fields_form[$fieldset_key]['form']['input'][$key]);
break;
@@ -234,8 +234,7 @@ class HelperFormCore extends Helper
$nb_shop += count($value['shops']);
}*/
$tree = new HelperTreeShops($params['id'],
isset($params['title']) ? $params['title'] : null);
$tree = new HelperTreeShops('shop-tree', 'Shops');
$tree->setSelectedShops($assos);
return $tree->render();
}
+2 -2
View File
@@ -27,8 +27,8 @@
class HelperTreeShopsCore extends TreeCore
{
const DEFAULT_TEMPLATE = 'tree_shops.tpl';
const DEFAULT_NODE_FOLDER_TEMPLATE = 'tree_node_folder_checkbox.tpl';
const DEFAULT_NODE_ITEM_TEMPLATE = 'tree_node_item_checkbox.tpl';
const DEFAULT_NODE_FOLDER_TEMPLATE = 'tree_node_folder_checkbox_shops.tpl';
const DEFAULT_NODE_ITEM_TEMPLATE = 'tree_node_item_checkbox_shops.tpl';
private $_lang;
private $_selected_shops;
@@ -484,10 +484,6 @@ class AdminCategoriesControllerCore extends AdminController
if (Shop::isFeatureActive())
$this->fields_form['input'][] = array(
'type' => 'shop',
'tree' => array(
'id' => 'shops-tree',
'title' => 'Shop'
),
'label' => $this->l('Shop association:'),
'name' => 'checkBoxShopAsso',
);