diff options
-rw-r--r-- | index.php | 2 | ||||
-rw-r--r-- | js/istreamdev.js | 19 |
2 files changed, 17 insertions, 4 deletions
@@ -232,7 +232,7 @@ include ('bin/auth.php'); <li><span class="timertitle">Select Time:</span></li> <li class="arrow"><a href="javascript:openSelectTime('layer_epgtime')" class="abutton" id="a_starttime"><span id="layer_epgtime" class="menuname"></span></a></li> </ul> - <input name="epg_time" type="hidden" id="epg_time" value="all" /> + <input name="epg_time" type="hidden" id="epg_time" value="" /> <ul class="rounded" ref="submitbut"><li><center><a href="#" class="submit_epg">Get Programs</a></center></li></ul> </form> </div> diff --git a/js/istreamdev.js b/js/istreamdev.js index 315ebff..80c51f0 100644 --- a/js/istreamdev.js +++ b/js/istreamdev.js @@ -975,8 +975,10 @@ $('.submit_epg').tap(function(event) { if ( channel == "all" ) {
programs = 2;
}
- else {
- programs = 10;
+ else if ( time == "" ) {
+ programs = "day";
+ } else {
+ programs = 20;
}
get_epg(channel,time,day,programs);
$(this).removeClass('active');
@@ -1029,10 +1031,21 @@ var dataString = 'action=getEpg&channel=' + channel + '&time=' + time + '&day=' $.getJSON("bin/backend.php",
dataString,
function(data) {
+ var k=1;
$.each(data.channel, function(i,channel){
+ k++;
$('#epglist #ul_epglist').append('<li class="sep">' + channel.name + '</li>');
$.each(channel.epg, function(j,epg){
- $('#epglist #ul_epglist').append('<li><a href="#"><span class="epgtime">' + epg.time + '</span><span class="epgname">' + epg.title + '</span></a></li>');
+ if ( k > 10 ) {
+ togglestatus = 'toggle';
+ }
+ else
+ {
+ togglestatus = '';
+ }
+ $('#epglist #ul_epglist').append('<li rel="' + togglestatus + '><a href="#"><span class="epgtime">' + epg.time + '</span><span class="epgname">' + epg.title + '</span></a></li>');
+
+ k++;
});
});
json_complete('#epglist','cube');
|