-UI changes.
-Blank row now displays start and end time -Changed default playlist name
This commit is contained in:
parent
a43da4e887
commit
a447839745
|
@ -88,7 +88,7 @@ class PlaylistController extends Zend_Controller_Action
|
||||||
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
|
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
|
||||||
|
|
||||||
$pl = new Playlist();
|
$pl = new Playlist();
|
||||||
$pl_id = $pl->create("Test Zend Auth");
|
$pl_id = $pl->create("Untitled Playlist");
|
||||||
$pl->setPLMetaData('dc:creator', $userInfo->login);
|
$pl->setPLMetaData('dc:creator', $userInfo->login);
|
||||||
|
|
||||||
$this->changePlaylist($pl_id);
|
$this->changePlaylist($pl_id);
|
||||||
|
|
|
@ -4,8 +4,11 @@ class Application_Model_Nowplaying
|
||||||
{
|
{
|
||||||
|
|
||||||
public static function InsertBlankRow($i, $rows){
|
public static function InsertBlankRow($i, $rows){
|
||||||
$startDate = explode(".", $rows[$i-1][3]);
|
$startDateFull = $rows[$i-1][3];
|
||||||
$endDate = explode(".", $rows[$i][2]);
|
$endDateFull = $rows[$i][2];
|
||||||
|
|
||||||
|
$startDate = explode(".", $startDateFull);
|
||||||
|
$endDate = explode(".", $endDateFull);
|
||||||
|
|
||||||
$epochStartMS = strtotime($startDate[0])*1000;
|
$epochStartMS = strtotime($startDate[0])*1000;
|
||||||
$epochEndMS = strtotime($endDate[0])*1000;
|
$epochEndMS = strtotime($endDate[0])*1000;
|
||||||
|
@ -15,7 +18,7 @@ class Application_Model_Nowplaying
|
||||||
if (count($endDate) > 1)
|
if (count($endDate) > 1)
|
||||||
$epochEndMS += $endDate[1];
|
$epochEndMS += $endDate[1];
|
||||||
|
|
||||||
$blankRow = array(array("b", "-", "-", "-", Application_Model_DateHelper::ConvertMSToHHMMSSmm($epochEndMS - $epochStartMS), "-", "-", "-", "-" , "-", "", ""));
|
$blankRow = array(array("b", $startDateFull, $startDateFull, $endDate, Application_Model_DateHelper::ConvertMSToHHMMSSmm($epochEndMS - $epochStartMS), "-", "-", "-", "-" , "-", "", ""));
|
||||||
array_splice($rows, $i, 0, $blankRow);
|
array_splice($rows, $i, 0, $blankRow);
|
||||||
return $rows;
|
return $rows;
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,13 +6,11 @@
|
||||||
<div class="user-list-wrapper">
|
<div class="user-list-wrapper">
|
||||||
<div id="users_wrapper" class="dataTables_wrapper">
|
<div id="users_wrapper" class="dataTables_wrapper">
|
||||||
|
|
||||||
<div class="fg-toolbar ui-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix">
|
<div class="button-holder">
|
||||||
<div class="button-holder">
|
<button type="button" id="add_user_button" name=
|
||||||
<button type="button" id="add_user_button" name=
|
"search_add_group" class="ui-button ui-widget ui-state-default ui-button-text-icon-primary">
|
||||||
"search_add_group" class="ui-button ui-widget ui-state-default ui-button-text-icon-primary">
|
<span class="ui-button-text">Add user</span></button>
|
||||||
<span class="ui-button-text">Add user</span></button>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<table cellspacing="0" cellpadding="0" style="" id="users_datatable" class="datatable">
|
<table cellspacing="0" cellpadding="0" style="" id="users_datatable" class="datatable">
|
||||||
<thead>
|
<thead>
|
||||||
|
|
|
@ -1082,7 +1082,7 @@ button, input {
|
||||||
|
|
||||||
.user-management {
|
.user-management {
|
||||||
width:810px;
|
width:810px;
|
||||||
width:380px;
|
/*width:380px;*/
|
||||||
}
|
}
|
||||||
.user-management-expanded {
|
.user-management-expanded {
|
||||||
width:810px;
|
width:810px;
|
||||||
|
@ -1091,7 +1091,7 @@ button, input {
|
||||||
float:left;
|
float:left;
|
||||||
width:420px;
|
width:420px;
|
||||||
margin-left:10px;
|
margin-left:10px;
|
||||||
display:none;
|
/* display:block;*/
|
||||||
}
|
}
|
||||||
.user-list-wrapper {
|
.user-list-wrapper {
|
||||||
float:left;
|
float:left;
|
||||||
|
@ -1183,4 +1183,4 @@ button, input {
|
||||||
}
|
}
|
||||||
.end-button {
|
.end-button {
|
||||||
border-width:1px;
|
border-width:1px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,23 +104,24 @@ function updateProgressBarValue(){
|
||||||
//calculate how much time left to next song if there is any
|
//calculate how much time left to next song if there is any
|
||||||
if (nextSongs.length > 0 && nextSongPrepare){
|
if (nextSongs.length > 0 && nextSongPrepare){
|
||||||
var diff = nextSongs[0].songStartPosixTime - estimatedSchedulePosixTime;
|
var diff = nextSongs[0].songStartPosixTime - estimatedSchedulePosixTime;
|
||||||
if (diff < serverUpdateInterval && diff >= 0){
|
if (diff < serverUpdateInterval){
|
||||||
|
if (diff < 0)
|
||||||
|
diff=0;
|
||||||
|
|
||||||
nextSongPrepare = false;
|
nextSongPrepare = false;
|
||||||
setTimeout(newSongStart, diff);
|
setTimeout(newSongStart, diff);
|
||||||
} else if (diff < 0 && APPLICATION_ENV == "development"){
|
|
||||||
alert ("Warning: estimatedSchedulePosixTime > songStartPosixTime");
|
|
||||||
alert (estimatedSchedulePosixTime + " " + nextSongs[0].songStartPosixTime);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//calculate how much time left to next show if there is any
|
//calculate how much time left to next show if there is any
|
||||||
if (nextShow.length > 0 && nextShowPrepare){
|
if (nextShow.length > 0 && nextShowPrepare){
|
||||||
var diff = nextShow[0].showStartPosixTime - estimatedSchedulePosixTime;
|
var diff = nextShow[0].showStartPosixTime - estimatedSchedulePosixTime;
|
||||||
if (diff < serverUpdateInterval && diff >= 0){
|
if (diff < serverUpdateInterval){
|
||||||
|
if (diff < 0)
|
||||||
|
diff=0;
|
||||||
|
|
||||||
nextShowPrepare = false;
|
nextShowPrepare = false;
|
||||||
setTimeout(nextShowStart, diff);
|
setTimeout(nextShowStart, diff);
|
||||||
} else if (diff < 0 && APPLICATION_ENV == "development"){
|
|
||||||
alert ("Warning: estimatedSchedulePosixTime > showStartPosixTime");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue