-datagrid now highlights current song playing

This commit is contained in:
mkonecny 2011-01-25 15:25:24 -05:00
parent 51f77dba50
commit e8d7b59127
4 changed files with 64 additions and 19 deletions

View file

@ -9,7 +9,8 @@ class Application_Model_Nowplaying
$current = Schedule::GetCurrentlyPlaying($timeNow);
$next = Schedule::GetNextItems($timeNow, 10);
$columnHeaders = array(array("sTitle"=>"Date"),
$columnHeaders = array(array("sTitle"=>"type", "bVisible"=>false),
array("sTitle"=>"Date"),
array("sTitle"=>"Start"),
array("sTitle"=>"End"),
array("sTitle"=>"Duration"),
@ -21,19 +22,19 @@ class Application_Model_Nowplaying
$rows = array();
foreach ($previous as $item){
array_push($rows, array($item["starts"], $item["starts"], $item["ends"], $item["clip_length"], $item["track_title"], $item["artist_name"],
$item["album_title"], "x" , "y"));
array_push($rows, array("p", $item["starts"], $item["starts"], $item["ends"], $item["clip_length"], $item["track_title"], $item["artist_name"],
$item["album_title"], "x" , $item["playlistname"]));
}
foreach ($current as $item){
array_push($rows, array($item["starts"], $item["starts"], $item["ends"], $item["clip_length"], $item["track_title"], $item["artist_name"],
$item["album_title"], "x" , "y"));
array_push($rows, array("c", $item["starts"], $item["starts"], $item["ends"], $item["clip_length"], $item["track_title"], $item["artist_name"],
$item["album_title"], "x" , $item["playlistname"]));
}
foreach ($next as $item){
array_push($rows, array($item["starts"], $item["starts"], $item["ends"], $item["clip_length"], $item["track_title"], $item["artist_name"],
$item["album_title"], "x" , "y"));
array_push($rows, array("n", $item["starts"], $item["starts"], $item["ends"], $item["clip_length"], $item["track_title"], $item["artist_name"],
$item["album_title"], "x" , $item["playlistname"]));
}
return array("columnHeaders"=>$columnHeaders, "rows"=>$rows);