Annotate folder subscribe toggle icons as checkboxes
This commit is contained in:
parent
f1550e5f71
commit
0c8bd05ac1
2 changed files with 3 additions and 1 deletions
|
@ -308,7 +308,7 @@ class calendar_ui
|
|||
html::span(array('class' => 'calname', 'id' => $label_id, 'title' => $title), $prop['editname'] ? Q($prop['editname']) : $prop['listname']) .
|
||||
($prop['virtual'] ? '' :
|
||||
html::tag('input', array('type' => 'checkbox', 'name' => '_cal[]', 'value' => $id, 'checked' => $prop['active'], 'aria-labelledby' => $label_id), '') .
|
||||
(isset($prop['subscribed']) ? html::a(array('href' => '#', 'class' => 'subscribed', 'title' => $this->cal->gettext('calendarsubscribe')), ' ') : '') .
|
||||
(isset($prop['subscribed']) ? html::a(array('href' => '#', 'class' => 'subscribed', 'title' => $this->cal->gettext('calendarsubscribe'), 'role' => 'checkbox', 'aria-checked' => $prop['subscribed'] ? 'true' : 'false'), ' ') : '') .
|
||||
html::span(array('class' => 'handle', 'style' => "background-color: #" . ($prop['color'] ?: 'f00')), ' ')
|
||||
)
|
||||
);
|
||||
|
|
|
@ -70,6 +70,7 @@ function kolab_folderlist(node, p)
|
|||
// activate + subscribe
|
||||
if ($(e.target).hasClass('subscribed')) {
|
||||
search_results[id].subscribed = true;
|
||||
$(e.target).attr('aria-checked', 'true');
|
||||
li.children().first()
|
||||
.toggleClass('subscribed')
|
||||
.find('input[type=checkbox]').get(0).checked = true;
|
||||
|
@ -222,6 +223,7 @@ function kolab_folderlist(node, p)
|
|||
div = li.children().first();
|
||||
|
||||
div.toggleClass('subscribed');
|
||||
$(this).attr('aria-checked', div.hasClass('subscribed') ? 'true' : 'false');
|
||||
me.triggerEvent('subscribe', { id: id, subscribed: div.hasClass('subscribed'), item: li });
|
||||
|
||||
e.stopPropagation();
|
||||
|
|
Loading…
Add table
Reference in a new issue