From ab5a6bc1c526930edd020c409eee3a9b3a403185 Mon Sep 17 00:00:00 2001 From: martin Date: Mon, 28 Mar 2011 16:28:23 -0400 Subject: [PATCH 1/4] CC-1990: Widget to display schedule and "Now Playing" on any website -added third requested widget --- plugins/jquery.showinfo.js | 109 +++++++++++++++++++++++++++++++++++-- 1 file changed, 105 insertions(+), 4 deletions(-) diff --git a/plugins/jquery.showinfo.js b/plugins/jquery.showinfo.js index c31381a10..87b5c1ad8 100644 --- a/plugins/jquery.showinfo.js +++ b/plugins/jquery.showinfo.js @@ -6,6 +6,7 @@ sourceDomain: "http://localhost/", //where to get show status from }; var options = $.extend(defaults, options); + options.sourceDomain = addEndingBackslash(options.sourceDomain); return this.each(function() { var obj = $(this); @@ -58,7 +59,7 @@ $.ajax({ url: options.sourceDomain + "api/live-info/", dataType:"jsonp", success:function(data){ processData(data); }, error:function(jqXHR, textStatus, errorThrown){}}); - setTimeout(getServerData, defaults.updatePeriod*1000); + setTimeout(getServerData, options.updatePeriod*1000); } }); }; @@ -71,9 +72,10 @@ var defaults = { updatePeriod: 5, //seconds sourceDomain: "http://localhost/", //where to get show status from - audioStreamSource: "" //where to get audio stream from + audioStreamSource: "http://localhost:8000/airtime.mp3" //where to get audio stream from }; var options = $.extend(defaults, options); + options.sourceDomain = addEndingBackslash(options.sourceDomain); return this.each(function() { var obj = $(this); @@ -106,7 +108,7 @@ } obj.empty(); - obj.append("Listen WADR Live"); + obj.append("Listen WADR Live"); obj.append("

"+showStatus+" >>

"); obj.append("