* @var array
*/
protected $_allowed = array(
+ 'class',
'icon',
'special',
'url',
+ 'urlattributes',
);
/**
$output = '';
if ($node['special'] == $special) {
- $output = '<li>';
+ $output = '<li';
+ if (isset($node['class'])) {
+ $output .= ' class="' . $node['class'] . '"';
+ }
+ $output .= '>';
if (isset($node['extra'][Horde_Tree::EXTRA_LEFT])) {
$output .= implode(' ', $node['extra'][Horde_Tree::EXTRA_LEFT]);
}
if (!empty($node['url'])) {
- $output .= '<a href="#mailbox" foo="' . strval($node['url']) . '">';
+ $output .= '<a href="' . (string)$node['url'] . '"';
+ if (isset($node['urlattributes'])) {
+ foreach ($node['urlattributes'] as $attribute => $value) {
+ $output .= ' ' . $attribute . '="' . htmlspecialchars($value) . '"';
+ }
+ }
+ $output .= '>';
}
$output .= $this->_getIcon($node_id) . $node['label'];
if (!empty($node['url'])) {
$icon = $val->icon;
$params['icon'] = $icon->icon;
$params['special'] = $val->special;
+ $params['class'] = 'imp-folder';
+ $params['urlattributes'] = array('mailbox' => $val->value);
break;
}
}
if (!$val->container) {
- $params['url'] = $mailbox_url->add('mailbox', $val->value);
-
- if ($this->_showunsub && !$val->sub) {
- $params['class'] = 'folderunsub';
+ if ($opts['render_type'] == 'Jquerymobile') {
+ $params['url'] = '#';
+ } else {
+ $params['url'] = $mailbox_url->add('mailbox', $val->value);
+ if ($this->_showunsub && !$val->sub) {
+ $params['class'] = 'folderunsub';
+ }
}
}