-fixed menu
This commit is contained in:
parent
1183b69149
commit
4441001eca
4 changed files with 108 additions and 105 deletions
|
@ -54,6 +54,7 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
||||||
$view->headScript()->appendFile('/js/libs/jquery-1.4.4.min.js','text/javascript');
|
$view->headScript()->appendFile('/js/libs/jquery-1.4.4.min.js','text/javascript');
|
||||||
$view->headScript()->appendFile('/js/libs/jquery-ui-1.8.8.custom.min.js','text/javascript');
|
$view->headScript()->appendFile('/js/libs/jquery-ui-1.8.8.custom.min.js','text/javascript');
|
||||||
$view->headScript()->appendFile('/js/libs/stuHover.js','text/javascript');
|
$view->headScript()->appendFile('/js/libs/stuHover.js','text/javascript');
|
||||||
|
$view->headScript()->appendFile('/js/playlist/helperfunctions.js','text/javascript');
|
||||||
$view->headScript()->appendFile('/js/playlist/playlist.js','text/javascript');
|
$view->headScript()->appendFile('/js/playlist/playlist.js','text/javascript');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,11 +17,15 @@ $pages = array(
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'label' => 'Schedule',
|
'label' => 'Schedule',
|
||||||
'module' => 'default',
|
'uri' => 'javascript:void(null)',
|
||||||
'controller' => 'Schedule',
|
|
||||||
'action' => 'index',
|
|
||||||
'resource' => 'schedule',
|
|
||||||
'pages' => array(
|
'pages' => array(
|
||||||
|
array(
|
||||||
|
'label' => 'View',
|
||||||
|
'module' => 'default',
|
||||||
|
'controller' => 'Schedule',
|
||||||
|
'action' => 'index',
|
||||||
|
'resource' => 'schedule'
|
||||||
|
),
|
||||||
array(
|
array(
|
||||||
'label' => 'Add Show',
|
'label' => 'Add Show',
|
||||||
'module' => 'default',
|
'module' => 'default',
|
||||||
|
@ -55,8 +59,7 @@ $pages = array(
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'label' => 'Configure',
|
'label' => 'Configure',
|
||||||
'module' => 'default',
|
'uri' => 'javascript:void(null)',
|
||||||
'controller' => 'Nowplaying',
|
|
||||||
'pages' => array(
|
'pages' => array(
|
||||||
array(
|
array(
|
||||||
'label' => 'Preferences',
|
'label' => 'Preferences',
|
||||||
|
|
98
public/js/playlist/helperfunctions.js
Normal file
98
public/js/playlist/helperfunctions.js
Normal file
|
@ -0,0 +1,98 @@
|
||||||
|
/* Takes an input parameter of milliseconds and converts these into
|
||||||
|
* the format HH:MM:SS */
|
||||||
|
function convertToHHMMSS(timeInMS){
|
||||||
|
var time = parseInt(timeInMS);
|
||||||
|
|
||||||
|
var hours = parseInt(time / 3600000);
|
||||||
|
time -= 3600000*hours;
|
||||||
|
|
||||||
|
var minutes = parseInt(time / 60000);
|
||||||
|
time -= 60000*minutes;
|
||||||
|
|
||||||
|
var seconds = parseInt(time / 1000);
|
||||||
|
|
||||||
|
hours = hours.toString();
|
||||||
|
minutes = minutes.toString();
|
||||||
|
seconds = seconds.toString();
|
||||||
|
|
||||||
|
if (hours.length == 1)
|
||||||
|
hours = "0" + hours;
|
||||||
|
if (minutes.length == 1)
|
||||||
|
minutes = "0" + minutes;
|
||||||
|
if (seconds.length == 1)
|
||||||
|
seconds = "0" + seconds;
|
||||||
|
if (hours == "00")
|
||||||
|
return minutes + ":" + seconds;
|
||||||
|
else
|
||||||
|
return "" + hours + ":" + minutes + ":" + seconds;
|
||||||
|
}
|
||||||
|
|
||||||
|
function convertToHHMMSSmm(timeInMS){
|
||||||
|
var time = parseInt(timeInMS);
|
||||||
|
|
||||||
|
var hours = parseInt(time / 3600000);
|
||||||
|
time -= 3600000*hours;
|
||||||
|
|
||||||
|
var minutes = parseInt(time / 60000);
|
||||||
|
time -= 60000*minutes;
|
||||||
|
|
||||||
|
var seconds = parseInt(time / 1000);
|
||||||
|
time -= 1000*seconds;
|
||||||
|
|
||||||
|
var ms = parseInt(time);
|
||||||
|
|
||||||
|
hours = hours.toString();
|
||||||
|
minutes = minutes.toString();
|
||||||
|
seconds = seconds.toString();
|
||||||
|
ms = ms.toString();
|
||||||
|
|
||||||
|
if (hours.length == 1)
|
||||||
|
hours = "0" + hours;
|
||||||
|
if (minutes.length == 1)
|
||||||
|
minutes = "0" + minutes;
|
||||||
|
if (seconds.length == 1)
|
||||||
|
seconds = "0" + seconds;
|
||||||
|
|
||||||
|
if (ms.length == 3)
|
||||||
|
ms = ms.substring(0, 2);
|
||||||
|
else if (ms.length == 2)
|
||||||
|
ms = "0" + ms.substring(0,1);
|
||||||
|
else if (ms.length == 1)
|
||||||
|
ms = "00";
|
||||||
|
|
||||||
|
if (hours == "00")
|
||||||
|
return minutes + ":" + seconds + "." + ms;
|
||||||
|
else
|
||||||
|
return "" + hours + ":" + minutes + ":" + seconds+ "." + ms;
|
||||||
|
}
|
||||||
|
|
||||||
|
function convertDateToHHMMSS(epochTime){
|
||||||
|
var d = new Date(epochTime);
|
||||||
|
|
||||||
|
var hours = d.getUTCHours().toString();
|
||||||
|
var minutes = d.getUTCMinutes().toString();
|
||||||
|
var seconds = d.getUTCSeconds().toString();
|
||||||
|
|
||||||
|
if (hours.length == 1)
|
||||||
|
hours = "0" + hours;
|
||||||
|
if (minutes.length == 1)
|
||||||
|
minutes = "0" + minutes;
|
||||||
|
if (seconds.length == 1)
|
||||||
|
seconds = "0" + seconds;
|
||||||
|
return "" + hours + ":" + minutes + ":" + seconds;
|
||||||
|
}
|
||||||
|
|
||||||
|
function convertDateToPosixTime(s){
|
||||||
|
var year = s.substring(0, 4);
|
||||||
|
var month = s.substring(5, 7);
|
||||||
|
var day = s.substring(8, 10);
|
||||||
|
var hour = s.substring(11, 13);
|
||||||
|
var minute = s.substring(14, 16);
|
||||||
|
var sec = s.substring(17, 19);
|
||||||
|
var msec = 0;
|
||||||
|
if (s.length >= 20){
|
||||||
|
msec = s.substring(20);
|
||||||
|
}
|
||||||
|
|
||||||
|
return Date.UTC(year, month, day, hour, minute, sec, msec);
|
||||||
|
}
|
|
@ -33,105 +33,6 @@ function notifySongEndListener(){
|
||||||
songEndFunc();
|
songEndFunc();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Takes an input parameter of milliseconds and converts these into
|
|
||||||
* the format HH:MM:SS */
|
|
||||||
function convertToHHMMSS(timeInMS){
|
|
||||||
var time = parseInt(timeInMS);
|
|
||||||
|
|
||||||
var hours = parseInt(time / 3600000);
|
|
||||||
time -= 3600000*hours;
|
|
||||||
|
|
||||||
var minutes = parseInt(time / 60000);
|
|
||||||
time -= 60000*minutes;
|
|
||||||
|
|
||||||
var seconds = parseInt(time / 1000);
|
|
||||||
|
|
||||||
hours = hours.toString();
|
|
||||||
minutes = minutes.toString();
|
|
||||||
seconds = seconds.toString();
|
|
||||||
|
|
||||||
if (hours.length == 1)
|
|
||||||
hours = "0" + hours;
|
|
||||||
if (minutes.length == 1)
|
|
||||||
minutes = "0" + minutes;
|
|
||||||
if (seconds.length == 1)
|
|
||||||
seconds = "0" + seconds;
|
|
||||||
if (hours == "00")
|
|
||||||
return minutes + ":" + seconds;
|
|
||||||
else
|
|
||||||
return "" + hours + ":" + minutes + ":" + seconds;
|
|
||||||
}
|
|
||||||
|
|
||||||
function convertToHHMMSSmm(timeInMS){
|
|
||||||
var time = parseInt(timeInMS);
|
|
||||||
|
|
||||||
var hours = parseInt(time / 3600000);
|
|
||||||
time -= 3600000*hours;
|
|
||||||
|
|
||||||
var minutes = parseInt(time / 60000);
|
|
||||||
time -= 60000*minutes;
|
|
||||||
|
|
||||||
var seconds = parseInt(time / 1000);
|
|
||||||
time -= 1000*seconds;
|
|
||||||
|
|
||||||
var ms = parseInt(time);
|
|
||||||
|
|
||||||
hours = hours.toString();
|
|
||||||
minutes = minutes.toString();
|
|
||||||
seconds = seconds.toString();
|
|
||||||
ms = ms.toString();
|
|
||||||
|
|
||||||
if (hours.length == 1)
|
|
||||||
hours = "0" + hours;
|
|
||||||
if (minutes.length == 1)
|
|
||||||
minutes = "0" + minutes;
|
|
||||||
if (seconds.length == 1)
|
|
||||||
seconds = "0" + seconds;
|
|
||||||
|
|
||||||
if (ms.length == 3)
|
|
||||||
ms = ms.substring(0, 2);
|
|
||||||
else if (ms.length == 2)
|
|
||||||
ms = "0" + ms.substring(0,1);
|
|
||||||
else if (ms.length == 1)
|
|
||||||
ms = "00";
|
|
||||||
|
|
||||||
if (hours == "00")
|
|
||||||
return minutes + ":" + seconds + "." + ms;
|
|
||||||
else
|
|
||||||
return "" + hours + ":" + minutes + ":" + seconds+ "." + ms;
|
|
||||||
}
|
|
||||||
|
|
||||||
function convertDateToHHMMSS(epochTime){
|
|
||||||
var d = new Date(epochTime);
|
|
||||||
|
|
||||||
var hours = d.getUTCHours().toString();
|
|
||||||
var minutes = d.getUTCMinutes().toString();
|
|
||||||
var seconds = d.getUTCSeconds().toString();
|
|
||||||
|
|
||||||
if (hours.length == 1)
|
|
||||||
hours = "0" + hours;
|
|
||||||
if (minutes.length == 1)
|
|
||||||
minutes = "0" + minutes;
|
|
||||||
if (seconds.length == 1)
|
|
||||||
seconds = "0" + seconds;
|
|
||||||
return "" + hours + ":" + minutes + ":" + seconds;
|
|
||||||
}
|
|
||||||
|
|
||||||
function convertDateToPosixTime(s){
|
|
||||||
var year = s.substring(0, 4);
|
|
||||||
var month = s.substring(5, 7);
|
|
||||||
var day = s.substring(8, 10);
|
|
||||||
var hour = s.substring(11, 13);
|
|
||||||
var minute = s.substring(14, 16);
|
|
||||||
var sec = s.substring(17, 19);
|
|
||||||
var msec = 0;
|
|
||||||
if (s.length >= 20){
|
|
||||||
msec = s.substring(20);
|
|
||||||
}
|
|
||||||
|
|
||||||
return Date.UTC(year, month, day, hour, minute, sec, msec);
|
|
||||||
}
|
|
||||||
|
|
||||||
function getTrackInfo(song){
|
function getTrackInfo(song){
|
||||||
var str = "";
|
var str = "";
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue