CC-2162: WADR Widget "There is an error in current show timing"

This commit is contained in:
martin 2011-04-05 16:42:23 -04:00
parent 12a0e34024
commit eed8c95343
1 changed files with 9 additions and 5 deletions

View File

@ -89,10 +89,18 @@
return this.each(function() {
var obj = $(this);
var sd;
var sd = null;
getServerData();
//refresh the UI to update the elapsed/remaining time
setInterval(updateWidget, 1000);
function updateWidget(){
if (sd == null){
return;
}
var currentShow = sd.getCurrentShow();
var nextShows = sd.getNextShows();
@ -126,14 +134,10 @@
"</li>" +
"<li class='next'>"+options.text.next+": "+nextShowName+"<span>"+nextShowRange+"</span></li>" +
"</ul>");
//refresh the UI to update the elapsed/remaining time
setTimeout(updateWidget, 1000);
}
function processData(data){
sd = new ScheduleData(data);
updateWidget();
}
function airtimeScheduleJsonpError(jqXHR, textStatus, errorThrown){