From c8b1c84b1adae391902960e918f659b51be13f46 Mon Sep 17 00:00:00 2001 From: Alib Date: Thu, 25 Mar 2010 10:35:17 +0100 Subject: epg works --- js/istreamdev.js | 50 ++++++++++++++++++++++++++++++++------------------ 1 file changed, 32 insertions(+), 18 deletions(-) (limited to 'js') diff --git a/js/istreamdev.js b/js/istreamdev.js index 80c51f0..ecac8b2 100644 --- a/js/istreamdev.js +++ b/js/istreamdev.js @@ -152,7 +152,7 @@ $('a[class="back"]').tap(function(event) { // show active sessions $(document).ready(function(e){ getRunningSessions(); -preloadLogos(); +//preloadLogos(); }); //reinit RunningSessions when going to Home: @@ -968,22 +968,28 @@ function showStatus( timeout, message ) { // [EPG SECTION] //buttons $('.submit_epg').tap(function(event) { - event.preventDefault(); - channel = $('#epgform #epg_chan').val(); - time = $('#epgform #epg_time').val(); - day = $('#epgform select##epg_day').val(); - if ( channel == "all" ) { - programs = 2; - } - else if ( time == "" ) { - programs = "day"; - } else { - programs = 20; - } - get_epg(channel,time,day,programs); - $(this).removeClass('active'); - }); +event.preventDefault(); +json_start(this); +channel = $('#epgform #epg_chan').val(); +time = $('#epgform #epg_time').val(); +day = $('#epgform select##epg_day').val(); + if ( channel == "all" ) { + programs = 2; + } + else if ( time == "" ) { + programs = "day"; + } else { + programs = 20; + } +get_epg(channel,time,day,programs); +$(this).removeClass('active'); +}); +$('#epg ul li a[rel="whatsnow"]').tap(function(event) { +event.preventDefault(); +json_start(this); +get_epg("all","now","0","2"); +}); //functions @@ -1033,8 +1039,15 @@ var dataString = 'action=getEpg&channel=' + channel + '&time=' + time + '&day=' function(data) { var k=1; $.each(data.channel, function(i,channel){ + if ( k > 10 ) { + togglestatus = 'toggle'; + } + else + { + togglestatus = ''; + } k++; - $('#epglist #ul_epglist').append('
  • ' + channel.name + '
  • '); + $('#epglist #ul_epglist').append('
  • ' + channel.name + '
  • '); $.each(channel.epg, function(j,epg){ if ( k > 10 ) { togglestatus = 'toggle'; @@ -1043,11 +1056,12 @@ var dataString = 'action=getEpg&channel=' + channel + '&time=' + time + '&day=' { togglestatus = ''; } - $('#epglist #ul_epglist').append('
  • ' + epg.time + '' + epg.title + '
  • '); + $('#epglist #ul_epglist').append('
  • ' + epg.time + '' + epg.title + '
  • '); k++; }); }); + $('#epglist li[rel="toggle"]').hide(); json_complete('#epglist','cube'); }); } -- cgit v1.2.3