diff options
author | Alib <aliboba@free.fr> | 2010-03-25 10:35:17 +0100 |
---|---|---|
committer | Alib <aliboba@free.fr> | 2010-03-25 10:35:17 +0100 |
commit | c8b1c84b1adae391902960e918f659b51be13f46 (patch) | |
tree | 686f5761473efca9fcf6d54d8b0a7cbadfe58d28 /js | |
parent | e3b61fcf61d809dfecdf54ae6664e71ee1c65b47 (diff) | |
download | istreamdev-c8b1c84b1adae391902960e918f659b51be13f46.tar.gz istreamdev-c8b1c84b1adae391902960e918f659b51be13f46.tar.bz2 |
epg works
Diffstat (limited to 'js')
-rw-r--r-- | js/istreamdev.js | 50 |
1 files changed, 32 insertions, 18 deletions
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('<li class="sep">' + channel.name + '</li>');
+ $('#epglist #ul_epglist').append('<li rel="' + togglestatus + '" class="sep">' + channel.name + '</li>');
$.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('<li rel="' + togglestatus + '><a href="#"><span class="epgtime">' + epg.time + '</span><span class="epgname">' + epg.title + '</span></a></li>');
+ $('#epglist #ul_epglist').append('<li rel="' + togglestatus + '"><a href="#"><span class="epgtime">' + epg.time + '</span><span class="epgname">' + epg.title + '</span></a></li>');
k++;
});
});
+ $('#epglist li[rel="toggle"]').hide();
json_complete('#epglist','cube');
});
}
|