From 4f4dd73b19eec0d199684f2f7e6a5be9b3554881 Mon Sep 17 00:00:00 2001 From: Alib Date: Tue, 23 Mar 2010 13:11:09 +0100 Subject: now VDR VIdeo & Audio home menu appears depending of streamdev_server,video_path & audio_path value in config file. --- index.html | 20 +++++--------------- js/istreamdev.js | 38 +++++++++++++++++++++++++++++++++++--- 2 files changed, 40 insertions(+), 18 deletions(-) diff --git a/index.html b/index.html index b93a6c7..51afd67 100644 --- a/index.html +++ b/index.html @@ -3,8 +3,8 @@ iStreamdev - - + +
@@ -16,19 +16,9 @@

HOME

- - @@ -262,4 +252,4 @@ - + \ No newline at end of file diff --git a/js/istreamdev.js b/js/istreamdev.js index c27e99c..d080bd7 100644 --- a/js/istreamdev.js +++ b/js/istreamdev.js @@ -56,8 +56,40 @@ $.getJSON("bin/backend.php", rec_path = data.rec_path; video_path = data.video_path; audio_path = data.audio_path; + if (streamdev_server != "") { + addVdr(); } - ); + if ( video_path != "" ) { + addVideofiles(); + } + if ( audio_path != "" ) { + addAudiofiles(); + } +}); + +function addVdr() { + vdrmenu = ' '; + $('#home #runningsessions').after(vdrmenu); +} +function addVideofiles() { + videomenu = '
  • Video
  • '; + if ( $('#home #filemenu').length == 0 ) { + $('#home').append(''); + } + $('#home #filemenu').append(videomenu); +} + +function addAudiofiles() { + audiomenu = '
  • Audio
  • '; + if ( $('#home #filemenu').length == 0 ) { + $('#home').append(''); + } + $('#home #filemenu').append(audiomenu); +} //Goto home $('#home_but').tap(function(event) { @@ -217,12 +249,12 @@ $('#runningsessions li a').tap(function(event) { // Get Active broadcast & encoding sessions function getRunningSessions() { var dataString = "action=getRunningSessions"; - $('#home #runningsessions').html(''); + $('#home #runningsessions').html('
  • SESSIONS
  • \n
  • Checking running session
  • '); //Json call to get category array $.getJSON("bin/backend.php", dataString, function(data){ - $('#home #runningsessions').append('
  • SESSIONS
  • '); + $('#home #runningsessions').html('
  • SESSIONS
  • '); if ( data.broadcast.length >= 1 ) { $.each(data.broadcast, function(i,broadcast){ session = broadcast.session; -- cgit v1.2.3