diff options
author | TheTroll <trolldev@gmail.com> | 2010-03-28 18:17:48 +0200 |
---|---|---|
committer | TheTroll <trolldev@gmail.com> | 2010-03-28 18:17:48 +0200 |
commit | bb0c755c9e803b1a767aff8ddc638477aa22d22d (patch) | |
tree | 668a9177e5b3f44303302a178397177277a09830 /js | |
parent | 4cd3207e6e6b4bd988c2dba20cb99ff99f6dec5b (diff) | |
parent | 697edb97f1ecbe66e718e2a6bf5a777aa341981f (diff) | |
download | istreamdev-bb0c755c9e803b1a767aff8ddc638477aa22d22d.tar.gz istreamdev-bb0c755c9e803b1a767aff8ddc638477aa22d22d.tar.bz2 |
Merge branch 'jquery' of projects.vdr-developer.org:istreamdev into jquery
* 'jquery' of projects.vdr-developer.org:istreamdev:
added istreamdev.js in min
starting optimisation
fix date format
fix date
Diffstat (limited to 'js')
-rw-r--r-- | js/functions.js | 15 | ||||
-rw-r--r-- | js/istreamdev.js | 29 |
2 files changed, 13 insertions, 31 deletions
diff --git a/js/functions.js b/js/functions.js index 9621612..f628142 100644 --- a/js/functions.js +++ b/js/functions.js @@ -120,18 +120,3 @@ function str_pad (input, pad_length, pad_string, pad_type) { return input;
}
-
-function addslashes(str) {
-str=str.replace(/\\/g,'\\\\');
-str=str.replace(/\'/g,'\\\'');
-str=str.replace(/\"/g,'\\"');
-str=str.replace(/\0/g,'\\0');
-return str;
-}
-function stripslashes(str) {
-str=str.replace(/\\'/g,'\'');
-str=str.replace(/\\"/g,'"');
-str=str.replace(/\\0/g,'\0');
-str=str.replace(/\\\\/g,'\\');
-return str;
-}
diff --git a/js/istreamdev.js b/js/istreamdev.js index 40f380e..04d3eff 100644 --- a/js/istreamdev.js +++ b/js/istreamdev.js @@ -57,6 +57,7 @@ $.getJSON("bin/backend.php", rec_path = data.rec_path;
video_path = data.video_path;
audio_path = data.audio_path;
+ epg_maxdays = data.epg_maxdays;
if (streamdev_server != "" && streamdev_server != "null") {
addVdr();
gen_formchanlist();
@@ -69,6 +70,16 @@ $.getJSON("bin/backend.php", }
});
+function showStatus( timeout, message ) {
+ if( timeout == 0 ) {
+ $('#status_box').html(message);
+ $('#status_box').show();
+ setTimeout( function() { showStatus( 1, message ); }, 3000 );
+ } else if( timeout == 1 ) {
+ $('#status_box').hide();
+ }
+}
+
function addVdr() {
vdrmenu = ' <ul class="rounded">\n<li><span class="menutitle">VDR</span></li>\n';
vdrmenu += ' <li class="arrow"><a id="categories_but" href="#"><img class="menuicon" src="img/tv.png" /><span class="menuname">Watch TV</span></a></li>';
@@ -398,7 +409,7 @@ $('#streamchannel span.recButton a').tap(function(event) { rec_month = str_pad(rec_month,2,'0','STR_PAD_LEFT');
var rec_day = date.getDate();
rec_day = str_pad(rec_day,2,'0','STR_PAD_LEFT');
- var rec_date = rec_year + "-" + rec_month + "-" + rec_day;
+ var rec_date = rec_year + "/" + rec_month + "/" + rec_day;
var epgtime = $("#streamchannel").find('span[class="epgtime_now"]').text();
var starttime = epgtime.substr(0,2) + epgtime.substr(3,2);
var endtime = epgtime.substr(6,2) + epgtime.substr(9,2);
@@ -962,15 +973,6 @@ function checktimerform() { return false;
};
-function showStatus( timeout, message ) {
- if( timeout == 0 ) {
- $('#status_box').html(message);
- $('#status_box').show();
- setTimeout( function() { showStatus( 1, message ); }, 5000 );
- } else if( timeout == 1 ) {
- $('#status_box').hide();
- }
-}
// [/TIMER SECTION]
// [EPG SECTION]
@@ -1069,18 +1071,13 @@ function gen_epgchanlist() { }
function gen_epgdatelist() {
-var daymax = 8;
var date = new Date();
var date_year = date.getFullYear();
var date_month = date.getMonth()+1;
var date_day = date.getDate();
-//var date_hour = str_pad(date.getHours(),2,'0','STR_PAD_LEFT');
-//var date_min = str_pad(date.getMinutes(),2,'0','STR_PAD_LEFT');
-//$('#epg #epg_time').val(date_hour + '' + date_min);
-//var date_fulldate = date_year + '-' + str_pad(date_month,2,'0','STR_PAD_LEFT') + '-' + str_pad(date_day,2,'0','STR_PAD_LEFT');
$('#epg #epg_day').html('<option value="0">Today</option>');
var dayname = new Array( "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" );
- for ( i=1;i<daymax;i++ ) {
+ for ( i=1;i<epg_maxdays;i++ ) {
date_milli=date.getTime();
date.setTime(date_milli+86400000);
$('#epg #epg_day').append('<option value="' + i + '">' + dayname[date.getDay()] + ' ' + date.getDate() + '/' + (date.getMonth()+1) + '</option>');
|