mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-12 00:45:34 +00:00
set className of items in timeline
This commit is contained in:
parent
2d9d2b7113
commit
06691a7d6f
|
@ -2017,7 +2017,7 @@ mayscript>
|
|||
*
|
||||
* @param object $document document
|
||||
*/
|
||||
protected function printTimeline($timeline, $height=300, $start='', $end='') { /* {{{ */
|
||||
protected function printTimeline($timeline, $height=300, $start='', $end='', $skip=array()) { /* {{{ */
|
||||
if(!$timeline)
|
||||
return;
|
||||
?>
|
||||
|
@ -2028,7 +2028,12 @@ mayscript>
|
|||
data = [
|
||||
<?php
|
||||
foreach($timeline as $item) {
|
||||
echo "{'start': new Date('".$item['date']."'), 'content': '".$item['msg']."'},\n";
|
||||
if($item['type'] == 'status_change')
|
||||
$classname = $item['type']."_".$item['status'];
|
||||
else
|
||||
$classname = $item['type'];
|
||||
if(!$skip || !in_array($classname, $skip))
|
||||
echo "{'start': new Date('".$item['date']."'), 'content': '".$item['msg']."', 'className': '".$classname."'},\n";
|
||||
}
|
||||
?>
|
||||
/* {
|
||||
|
|
Loading…
Reference in New Issue
Block a user