Set classes on calendar list items according to data from driver
This commit is contained in:
parent
264ccd3ac2
commit
6eeca4efc2
1 changed files with 10 additions and 3 deletions
|
@ -142,7 +142,14 @@ class calendar_ui
|
||||||
$jsenv[$id] = $prop;
|
$jsenv[$id] = $prop;
|
||||||
|
|
||||||
$html_id = html_identifier($id);
|
$html_id = html_identifier($id);
|
||||||
$li .= html::tag('li', array('id' => 'rcmlical' . $html_id, 'class' =>'cal-' . asciiwords($id, true)),
|
$class = 'cal-' . asciiwords($id, true);
|
||||||
|
|
||||||
|
if ($prop['readonly'])
|
||||||
|
$class .= ' readonly';
|
||||||
|
if ($prop['class_name'])
|
||||||
|
$class .= ' '.$prop['class_name'];
|
||||||
|
|
||||||
|
$li .= html::tag('li', array('id' => 'rcmlical' . $html_id, 'class' => $class),
|
||||||
html::tag('input', array('type' => 'checkbox', 'name' => '_cal[]', 'value' => $id, 'checked' => !in_array($id, $hidden)), '') . html::span(null, Q($prop['name'])));
|
html::tag('input', array('type' => 'checkbox', 'name' => '_cal[]', 'value' => $id, 'checked' => !in_array($id, $hidden)), '') . html::span(null, Q($prop['name'])));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue