CC-3091: Widget "Today's Program" doesn't show any content

It's not showing anything because I thought it's not suppose to display the currently playing show.
Fixed by retrieving the currently playing show along with next shows, and display them.

todayInfoAction is no longer needed since liveInfoAction does the same thing.
This commit is contained in:
Yuchen Wang 2011-11-23 12:00:54 -05:00
parent 37da2bf0c5
commit 161fa80d64
2 changed files with 4 additions and 28 deletions

View file

@ -16,7 +16,9 @@
getServerData();
function updateWidget(){
var shows = sd.getNextShows();
var currentShow = sd.getCurrentShow();
var nextShows = sd.getNextShows();
var shows = currentShow.length == 0 ? nextShows : currentShow.concat(nextShows);
tableString = "";
tableString += "<h3>" + options.text.onAirToday + "</h3>";
@ -50,7 +52,7 @@
}
function getServerData(){
$.ajax({ url: options.sourceDomain + "api/today-info/", dataType:"jsonp", success:function(data){
$.ajax({ url: options.sourceDomain + "api/live-info/", dataType:"jsonp", success:function(data){
processData(data);
}, error:airtimeScheduleJsonpError});
setTimeout(getServerData, options.updatePeriod*1000);