summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorTheTroll <trolldev@gmail.com>2010-03-26 15:48:06 +0100
committerTheTroll <trolldev@gmail.com>2010-03-26 15:48:06 +0100
commit72533f73f887cb67ceae765763fd62c25ce3a6d5 (patch)
treec1e8a8a64c0233457d749043947a27b06fbff8ec /js
parent2249131e676ff868a8fecc27e07aedeefcdd3e92 (diff)
parentfa50884934964b9b74a93555a9d89d19f977ee9d (diff)
downloadistreamdev-72533f73f887cb67ceae765763fd62c25ce3a6d5.tar.gz
istreamdev-72533f73f887cb67ceae765763fd62c25ce3a6d5.tar.bz2
Merge branch 'jquery' of projects.vdr-developer.org:istreamdev into jquery
* 'jquery' of projects.vdr-developer.org:istreamdev: added epg details
Diffstat (limited to 'js')
-rw-r--r--js/istreamdev.js38
1 files changed, 36 insertions, 2 deletions
diff --git a/js/istreamdev.js b/js/istreamdev.js
index 04e59df..a144f43 100644
--- a/js/istreamdev.js
+++ b/js/istreamdev.js
@@ -999,7 +999,15 @@ json_start(this);
get_epg("all","now","0","2");
});
-
+$('#epglist #ul_epglist a').tap(function(event) {
+event.preventDefault();
+json_start(this);
+channum = $(this).find('span[rel="channum"]').text();
+epgtime = $(this).find('span[class="epgtime"]').text();
+startingtime = epgtime.substring(0,2) + '' + epgtime.substring(3);
+day = $('#epglist div[rel="dataholder"] span[rel="day"]').text();
+get_epgdetails(channum,startingtime,day);
+});
//functions
function gen_epgmenu() {
@@ -1075,6 +1083,7 @@ var dataString = 'action=getEpg&channel=' + channel + '&time=' + time + '&day='
function parse_epg(data,selectedvalue,type,day){
$('#epglist #epg_selector').html('');
$('#epglist #ul_epglist').html('');
+ $('#epglist div[rel="dataholder"] span[rel="day"]').html(day);
date = new Date();
var date_milli=date.getTime();
date.setTime(date_milli+(86400000*day));
@@ -1128,7 +1137,7 @@ function parse_epg(data,selectedvalue,type,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><span style="visibility:hidden" rel="channum">' + channel.number + '</span></a></li>');
k++;
});
@@ -1163,4 +1172,29 @@ function parse_epg(data,selectedvalue,type,day){
}
}
+function get_epgdetails(channum,startingtime,day) {
+ var dataString = 'action=getEpgInfo&channel=' + channum + '&time=' + startingtime + '&day=' + day;
+ $.getJSON("bin/backend.php",
+ dataString,
+ function(data) {
+ name = data.program.name;
+ date = data.program.date;
+ time = data.program.time;
+ title = data.program.title;
+ desc = data.program.desc;
+ stime = startingtime;
+ etime = time.substring(6,8) + epgtime.substring(9);
+ $('#epgdetails h1').html('<img class="menuicon" src="img/tv.png" />' + name);
+ $('#epgdetails ul[class="thumb"] img[class="thumbnail"]').attr('src') = 'logos/'+name+'.png';
+ $('#epgdetails ul[class="streaminfo"] li span[class="name_now"]').html(title);
+ $('#epgdetails ul[class="streaminfo"] li span[class="epgtime_now"]').html(date + ' ' + time);
+ $('#epgdetails ul[class="streaminfo"] li span[class="epgdesc_now"]').html(desc);
+ $('#epgdetails div[rel="dataholder"] span[rel="number"]').html(channum);
+ $('#epgdetails div[rel="dataholder"] span[rel="channame"]').html(name);
+ $('#epgdetails div[rel="dataholder"] span[rel="date"]').html(date);
+ $('#epgdetails div[rel="dataholder"] span[rel="stime"]').html(stime);
+ $('#epgdetails div[rel="dataholder"] span[rel="etime"]').html(etime);
+ json_complete('#epgdetails','cube');
+ });
+}
// [/EPG SECTION]