summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlib <aliboba@free.fr>2010-03-18 13:36:30 +0100
committerAlib <aliboba@free.fr>2010-03-18 13:36:30 +0100
commitaf840c41f9464fa52aa9d88e3271f9df934c262a (patch)
treeb838a8c49f997f47e354d185f74d10c20342b1f9
parentbeecdfa67aa0067a69e948c6903c85b6baa03375 (diff)
downloadistreamdev-af840c41f9464fa52aa9d88e3271f9df934c262a.tar.gz
istreamdev-af840c41f9464fa52aa9d88e3271f9df934c262a.tar.bz2
added Show ALl button for channel list to prevent animation bug and slowness
-rw-r--r--js/istreamdev.js23
1 files changed, 14 insertions, 9 deletions
diff --git a/js/istreamdev.js b/js/istreamdev.js
index 2218667..11a08d4 100644
--- a/js/istreamdev.js
+++ b/js/istreamdev.js
@@ -58,12 +58,6 @@ $.getJSON("bin/backend.php",
audio_path = data.audio_path;
}
);
-//streamdev_server = "http://127.0.0.1:3000/TS/";
-//rec_path = "/video/";
-//video_path = "/mnt/media/Video/";
-//audio_path = "/mnt/media/Music/";
-
-
//Goto home
$('#home_but').tap(function(event) {
@@ -211,7 +205,7 @@ $('#categories ul#cat_menu a').tap(function(event) {
return false;
});
-$('#channels ul#chan_menu a').tap(function(event) {
+$('#channels ul#chan_menu .chan_but').tap(function(event) {
event.preventDefault();
json_start(this);
var channame = $(this).find('span[class="name"]').html();
@@ -220,6 +214,11 @@ $('#channels ul#chan_menu a').tap(function(event) {
return false;
});
+$('#channels ul#chan_menu .toggleLink').tap(function(event) {
+ event.preventDefault();
+ $('#channels ul#chan_menu li[rel="toggle"]').show();
+ $('#channels ul#chan_menu li[rel="showbut"]').remove();
+});
//Gen Categories
function gen_categories() {
$("#cat_menu").html('');
@@ -244,9 +243,15 @@ function gen_channels(category) {
dataString,
function(data){
$.each(data.channel,function(i,channel){
- $("#chan_menu").append('<li class="channellist"><a class="chan_but" href="#"><img src="logos/' + channel.name + '.png"/><small class="counter">' + channel.number + '</small><span class="name">' + channel.name + '</span><span class="comment">' + channel.now_title + '</span></a></li>');
-
+ if ( i <= 10 ) {
+ $("#chan_menu").append('<li class="channellist"><a class="chan_but" href="#"><img src="logos/' + channel.name + '.png"/><small class="counter">' + channel.number + '</small><span class="name">' + channel.name + '</span><span class="comment">' + channel.now_title + '</span></a></li>');
+ }
+ else {
+ $("#chan_menu").append('<li class="channellist" rel="toggle"><a class="chan_but" href="#"><img src="logos/' + channel.name + '.png"/><small class="counter">' + channel.number + '</small><span class="name">' + channel.name + '</span><span class="comment">' + channel.now_title + '</span></a></li>');
+ }
});
+ $('li[rel="toggle"]').hide();
+ $("#chan_menu").append('<li rel="showbut"><a href="#" class="toggleLink">Show all</a></li>');
json_complete('#channels','cube');
})
}