- = $this->partial('partialviews/header.phtml', array("user" => $this->loggedInAs())) ?>
+ partial('partialviews/header.phtml', array("user" => $this->loggedInAs())) ?>
navigation()->menu()->setPartial($partial); ?>
diff --git a/application/layouts/scripts/library.phtml b/application/layouts/scripts/library.phtml
index 9af9fdc21..b5dd4d6da 100644
--- a/application/layouts/scripts/library.phtml
+++ b/application/layouts/scripts/library.phtml
@@ -11,7 +11,7 @@
- = $this->partial('partialviews/header.phtml', array("user" => $this->loggedInAs())) ?>
+ partial('partialviews/header.phtml', array("user" => $this->loggedInAs())) ?>
navigation()->menu()->setPartial($partial); ?>
diff --git a/application/layouts/scripts/search.phtml b/application/layouts/scripts/search.phtml
index 8704c615a..9dab1be78 100644
--- a/application/layouts/scripts/search.phtml
+++ b/application/layouts/scripts/search.phtml
@@ -8,7 +8,7 @@
headLink() ?>
-
= $this->partial('partialviews/header.phtml', array("user" => $this->loggedInAs())) ?>
+
partial('partialviews/header.phtml', array("user" => $this->loggedInAs())) ?>
navigation()->menu()->setRenderInvisible(true) ?>
diff --git a/application/models/Schedule.php b/application/models/Schedule.php
index d1f9830be..21bfda6d9 100644
--- a/application/models/Schedule.php
+++ b/application/models/Schedule.php
@@ -482,10 +482,10 @@ class Schedule {
." ORDER BY st.starts DESC"
." LIMIT $count";
} else if ($timePeriod == 0){
- $sql .= " AND st.starts < TIMESTAMP '$timeNow'"
+ $sql .= " AND st.starts <= TIMESTAMP '$timeNow'"
." AND st.ends > TIMESTAMP '$timeNow'";
} else if ($timePeriod > 0){
- $sql .= " AND st.starts > TIMESTAMP '$timeNow'"
+ $sql .= " AND st.starts >= TIMESTAMP '$timeNow'"
." AND st.starts < (TIMESTAMP '$timeNow' + INTERVAL '$interval')"
." ORDER BY st.starts"
." LIMIT $count";
diff --git a/application/models/Shows.php b/application/models/Shows.php
index 41ea62c43..27ab6b101 100644
--- a/application/models/Shows.php
+++ b/application/models/Shows.php
@@ -749,7 +749,7 @@ class Show_DAL{
$sql = "SELECT *, si.starts as start_timestamp, si.ends as end_timestamp FROM "
." $CC_CONFIG[showInstances] si, $CC_CONFIG[showTable] s"
." WHERE si.show_id = s.id"
- ." AND si.starts > TIMESTAMP '$timeNow'"
+ ." AND si.starts >= TIMESTAMP '$timeNow'"
." AND si.starts < TIMESTAMP '$timeNow' + INTERVAL '48 hours'"
." ORDER BY si.starts"
." LIMIT 1";
diff --git a/public/js/playlist/playlist.js b/public/js/playlist/playlist.js
index b48f25a65..697707bd5 100644
--- a/public/js/playlist/playlist.js
+++ b/public/js/playlist/playlist.js
@@ -33,7 +33,7 @@ function registerSongEndListener(func){
function notifySongEndListener(){
if (typeof songEndFunc == "function"){
- //create a slight pause in execution to allow the browser
+ //create a slight delay in execution to allow the browser
//to update the display.
setTimeout(songEndFunc, 50);
}
@@ -57,6 +57,7 @@ function secondsTimer(){
var date = new Date();
estimatedSchedulePosixTime = date.getTime() - localRemoteTimeOffset;
updateProgressBarValue();
+ updatePlaybar();
}
setTimeout(secondsTimer, uiUpdateInterval);
}
@@ -64,7 +65,6 @@ function secondsTimer(){
function newSongStart(){
nextSongPrepare = true;
currentSong[0] = nextSongs.shift();
- updatePlaybar();
notifySongEndListener();
}
@@ -72,7 +72,6 @@ function newSongStart(){
function nextShowStart(){
nextShowPrepare = true;
currentShow[0] = nextShow.shift();
- updatePlaybar();
}
/* Called every "uiUpdateInterval" mseconds. */
@@ -129,8 +128,6 @@ function updateProgressBarValue(){
setTimeout(nextShowStart, diff);
}
}
-
- updatePlaybar();
}
function updatePlaybar(){
@@ -230,7 +227,7 @@ function parseItems(obj){
function getScheduleFromServer(){
$.ajax({ url: "/Schedule/get-current-playlist/format/json", dataType:"json", success:function(data){
parseItems(data.entries);
- }});
+ }, error:function(jqXHR, textStatus, errorThrown){}});
setTimeout(getScheduleFromServer, serverUpdateInterval);
}
@@ -241,27 +238,31 @@ function init() {
//begin consumer "thread"
secondsTimer();
-
- $('#about-link').qtip({
- content: $('#about-txt').html(),
- show: 'mouseover',
- hide: { when: 'mouseout', fixed: true },
- position: {
- corner: {
- target: 'center',
- tooltip: 'topRight'
- }
- },
- style: {
- border: {
- width: 0,
- radius: 4
+
+ var qtipElem = $('#about-link');
+
+ if (qtipElem.length > 0)
+ qtipElem.qtip({
+ content: $('#about-txt').html(),
+ show: 'mouseover',
+ hide: { when: 'mouseout', fixed: true },
+ position: {
+ corner: {
+ target: 'center',
+ tooltip: 'topRight'
+ }
},
- name: 'light', // Use the default light style
- }
- });
+ style: {
+ border: {
+ width: 0,
+ radius: 4
+ },
+ name: 'light', // Use the default light style
+ }
+ });
}
$(document).ready(function() {
- init();
+ if ($('#master-panel').length > 0)
+ init();
});