// list icon backward compat

This commit is contained in:
Kevin Granger
2013-10-02 17:38:53 +02:00
parent 791481e149
commit f168dd7c50
4 changed files with 28 additions and 13 deletions
+1
View File
@@ -1846,6 +1846,7 @@ class AdminControllerCore extends Controller
$helper->position_identifier = $this->position_identifier;
$helper->controller_name = $this->controller_name;
$helper->list_id = isset($this->list_id) ? $this->list_id : $this->table;
$helper->bootstrap = $this->bootstrap;
// For each action, try to add the corresponding skip elements list
$helper->list_skip_actions = $this->list_skip_actions;
+1
View File
@@ -36,6 +36,7 @@ class HelperCore
public $show_toolbar = true;
public $context;
public $toolbar_scroll = false;
public $bootstrap = false;
/**
* @var Module
+17 -9
View File
@@ -266,16 +266,24 @@ class HelperListCore extends Helper
}
elseif (isset($params['icon']) && isset($tr[$key]) && (isset($params['icon'][$tr[$key]]) || isset($params['icon']['default'])))
{
if (isset($params['icon'][$tr[$key]]) && is_array($params['icon'][$tr[$key]]))
$this->_list[$index][$key] = array(
'src' => $params['icon'][$tr[$key]]['src'],
'alt' => $params['icon'][$tr[$key]]['alt'],
);
if (!$this->bootstrap)
{
if (isset($params['icon'][$tr[$key]]) && is_array($params['icon'][$tr[$key]]))
$this->_list[$index][$key] = array(
'src' => $params['icon'][$tr[$key]]['src'],
'alt' => $params['icon'][$tr[$key]]['alt'],
);
else
$this->_list[$index][$key] = array(
'src' => isset($params['icon'][$tr[$key]]) ? $params['icon'][$tr[$key]] : $params['icon']['default'],
'alt' => isset($params['icon'][$tr[$key]]) ? $params['icon'][$tr[$key]] : $params['icon']['default'],
);
}
else
$this->_list[$index][$key] = array(
'src' => isset($params['icon'][$tr[$key]]) ? $params['icon'][$tr[$key]] : $params['icon']['default'],
'alt' => isset($params['icon'][$tr[$key]]) ? $params['icon'][$tr[$key]] : $params['icon']['default'],
);
if (isset($params['icon'][$tr[$key]]))
$this->_list[$index][$key] = array(
'class' => $params['icon'][$tr[$key]],
);
}
elseif (isset($params['type']) && $params['type'] == 'float')
$this->_list[$index][$key] = rtrim(rtrim($tr[$key], '0'), '.');