CC-4100: Make number of shows displayed in widget customizable

-fixed
This commit is contained in:
Martin Konecny 2012-07-11 19:31:24 -04:00
parent b782b9a9b6
commit bd51b4db02
6 changed files with 23 additions and 21 deletions

View file

@ -1,4 +1,4 @@
var AIRTIME_API_VERSION = "1.0";
var AIRTIME_API_VERSION = "1.1";
(function($){
$.fn.airtimeShowSchedule = function(options) {
@ -6,7 +6,8 @@
var defaults = {
updatePeriod: 20, //seconds
sourceDomain: "http://localhost/", //where to get show status from
text: {onAirToday:"On air today"}
text: {onAirToday:"On air today"},
showLimit: 5
};
options = $.extend(true, defaults, options);
options.sourceDomain = addEndingBackslash(options.sourceDomain);
@ -56,7 +57,7 @@
function getServerData(){
$.ajax({url: options.sourceDomain + "api/live-info/",
data: {type:"endofday",limit:"5"},
data: {type:"endofday",limit: options.showLimit},
dataType: "jsonp",
success:function(data) {
processData(data);