diff options
author | Alib <aliboba@free.fr> | 2010-03-26 13:09:16 +0100 |
---|---|---|
committer | Alib <aliboba@free.fr> | 2010-03-26 13:09:16 +0100 |
commit | d1f4f1e4f2b3aabebb06323b8929d42227e00139 (patch) | |
tree | 46da523a9829435018f0a53022c792292a564e45 /js | |
parent | 3a75f9b3471d6a9c7bb074ed71ec06f6159eabfd (diff) | |
download | istreamdev-d1f4f1e4f2b3aabebb06323b8929d42227e00139.tar.gz istreamdev-d1f4f1e4f2b3aabebb06323b8929d42227e00139.tar.bz2 |
added date on epg list
Diffstat (limited to 'js')
-rw-r--r-- | js/istreamdev.js | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/js/istreamdev.js b/js/istreamdev.js index bf89fbc..c9668ff 100644 --- a/js/istreamdev.js +++ b/js/istreamdev.js @@ -1063,18 +1063,26 @@ var dataString = 'action=getEpg&channel=' + channel + '&time=' + time + '&day=' $('#jqt').data("epg",data);
if ( data.category.length > 1 ) {
type = 'cat';
- parse_epg(data,0,type);
+ parse_epg(data,0,type,day);
} else {
type = 'chan';
- parse_epg(data,channel,type);
+ parse_epg(data,channel,type,day);
}
$('#epglist li[rel="toggle"]').hide();
});
}
-function parse_epg(data,selectedvalue,type){
+function parse_epg(data,selectedvalue,type,day){
$('#epglist #epg_selector').html('');
$('#epglist #ul_epglist').html('');
+ date = new Date();
+ var date_milli=date.getTime();
+ date.setTime(date_milli+(86400000*day));
+ var date_year = date.getFullYear();
+ var date_month = date.getMonth()+1;
+ var date_day = date.getDate();
+ var epgdate = date_year + "-" + date_month + "-" + date_day;
+ $('#epglist #ul_epglist').append('<li rel="epgdate" class="sep">' + epgdate + '</li>');
if ( data.category.length > 1 )
{
$('#epglist #epg_selector').append('<select id="epglist_cat"></select>');
@@ -1129,7 +1137,7 @@ function parse_epg(data,selectedvalue,type){ epgdata = $('#jqt').data("epg");
selectedvalue = $("#epglist #epg_selector select option:selected").val();
if ($("#epglist #epg_selector select").attr("id") == 'epglist_cat') {
- parse_epg(epgdata,selectedvalue,'cat');
+ parse_epg(epgdata,selectedvalue,'cat',day);
} else {
time = $('#epgform #epg_time').val();
day = $('#epgform select##epg_day').val();
|