CC-3104: Timezone issues in the widget

For a previous ticket, I changed the code so that both "Today's Program" widget
and "Now Playing" widget both use the liveInfoAction, but forgot that for "Now Playing" widget, it retrieves
the shows within next 48 hours instead of within end of day today...

Fixed by passing GET parameters to liveInfoAction, specify whether we want to retrieve shows within an
interval or end of day. Also added a GET parameter for specifying the number of shows to display.
This commit is contained in:
Yuchen Wang 2011-11-24 13:54:58 -05:00
parent 288fa86782
commit 276607c302
4 changed files with 45 additions and 9 deletions

View file

@ -52,9 +52,13 @@
}
function getServerData(){
$.ajax({ url: options.sourceDomain + "api/live-info/", dataType:"jsonp", success:function(data){
$.ajax({url: options.sourceDomain + "api/live-info/",
data: {type:"endofday",limit:"5"},
dataType: "jsonp",
success:function(data) {
processData(data);
}, error:airtimeScheduleJsonpError});
},
error: airtimeScheduleJsonpError});
setTimeout(getServerData, options.updatePeriod*1000);
}
});
@ -130,9 +134,13 @@
}
function getServerData(){
$.ajax({ url: options.sourceDomain + "api/live-info/", dataType:"jsonp", success:function(data){
$.ajax({url: options.sourceDomain + "api/live-info/",
data: {type:"interval",limit:"5"},
dataType: "jsonp",
success: function(data) {
processData(data);
}, error:airtimeScheduleJsonpError});
},
error: airtimeScheduleJsonpError});
setTimeout(getServerData, options.updatePeriod*1000);
}
});