Only render list checkbox in search mode
This commit is contained in:
parent
6b6f0cef3b
commit
cad1ef89de
2 changed files with 7 additions and 4 deletions
|
@ -805,7 +805,7 @@ class kolab_notes extends rcube_plugin
|
|||
unset($prop['editname']); // force full name to be displayed
|
||||
|
||||
// let the UI generate HTML and CSS representation for this calendar
|
||||
$html = $this->ui->folder_list_item($id, $prop, $jsenv);
|
||||
$html = $this->ui->folder_list_item($id, $prop, $jsenv, true);
|
||||
$prop += (array)$jsenv[$id];
|
||||
$prop['editname'] = $editname;
|
||||
$prop['html'] = $html;
|
||||
|
|
|
@ -161,7 +161,7 @@ class kolab_notes_ui
|
|||
$prop = $data[$id];
|
||||
$is_collapsed = false; // TODO: determine this somehow?
|
||||
|
||||
$content = $this->folder_list_item($id, $prop, $jsenv, $attrib['activeonly']);
|
||||
$content = $this->folder_list_item($id, $prop, $jsenv);
|
||||
|
||||
if (!empty($folder->children)) {
|
||||
$content .= html::tag('ul', array('style' => ($is_collapsed ? "display:none;" : null)),
|
||||
|
@ -183,7 +183,7 @@ class kolab_notes_ui
|
|||
/**
|
||||
* Helper method to build a tasklist item (HTML content and js data)
|
||||
*/
|
||||
public function folder_list_item($id, $prop, &$jsenv, $activeonly = false)
|
||||
public function folder_list_item($id, $prop, &$jsenv, $checkbox = false)
|
||||
{
|
||||
if (!$prop['virtual']) {
|
||||
unset($prop['user_id']);
|
||||
|
@ -212,7 +212,10 @@ class kolab_notes_ui
|
|||
return html::div(join(' ', $classes),
|
||||
html::a($attr + array('class' => 'listname', 'title' => $title, 'id' => $label_id), $prop['listname'] ?: $prop['name']) .
|
||||
($prop['virtual'] ? '' :
|
||||
html::tag('input', array('type' => 'checkbox', 'name' => '_list[]', 'value' => $id, 'checked' => $prop['active'], 'aria-labelledby' => $label_id)) .
|
||||
($checkbox ?
|
||||
html::tag('input', array('type' => 'checkbox', 'name' => '_list[]', 'value' => $id, 'checked' => $prop['active'], 'aria-labelledby' => $label_id)) :
|
||||
''
|
||||
) .
|
||||
html::span('handle', '') .
|
||||
(isset($prop['subscribed']) ?
|
||||
html::a(array('href' => '#', 'class' => 'subscribed', 'title' => $this->plugin->gettext('foldersubscribe'), 'role' => 'checkbox', 'aria-checked' => $prop['subscribed'] ? 'true' : 'false'), ' ') :
|
||||
|
|
Loading…
Add table
Reference in a new issue