diff options
-rwxr-xr-x | bin/session.php | 31 | ||||
-rw-r--r-- | extensions/jqt.offline.js | 192 | ||||
-rw-r--r-- | index.html | 4 | ||||
-rw-r--r-- | istreamdev.manifest | 37 | ||||
-rw-r--r-- | js/istreamdev.js | 6 |
5 files changed, 117 insertions, 153 deletions
diff --git a/bin/session.php b/bin/session.php index 2a149d3..fee5b58 100755 --- a/bin/session.php +++ b/bin/session.php @@ -33,6 +33,21 @@ function sessioncreate($type, $url, $mode) // Create session exec('mkdir ../ram/' .$session); + // Extract $channame if needed + switch ($type) + { + case 'tv': + $urlarray = explode("/", $url); + $channum = $urlarray[count($urlarray)-1]; + $channame = vdrgetchanname($channum); + break; + case 'rec': + list($channame, $title, $desc, $recorded) = vdrgetrecinfo($url); + break; + default: + $channame = ""; + break; + } // Create logo if ($type == 'vid') generatelogo($type, $url, '../ram/' .$session .'/thumb.png'); @@ -57,22 +72,6 @@ function sessioncreate($type, $url, $mode) $cmd = str_replace('%', '%%', $cmd); exec ($cmd); - - // Extract $channame if needed - switch ($type) - { - case 'tv': - $urlarray = explode("/", $url); - $channum = $urlarray[count($urlarray)-1]; - $channame = vdrgetchanname($channum); - break; - case 'rec': - list($channame, $title, $desc, $recorded) = vdrgetrecinfo($url); - break; - default: - $channame = ""; - break; - } // Write streaminfo writeinfostream($session, $type, $mode, $url, $channame); diff --git a/extensions/jqt.offline.js b/extensions/jqt.offline.js index 6145727..b333a16 100644 --- a/extensions/jqt.offline.js +++ b/extensions/jqt.offline.js @@ -1,97 +1,97 @@ -/*
-
- _/ _/_/ _/_/_/_/_/ _/
- _/ _/ _/ _/_/ _/ _/ _/_/_/ _/_/_/
- _/ _/ _/_/ _/ _/ _/ _/ _/ _/ _/ _/
- _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/
- _/ _/_/ _/ _/ _/_/ _/_/_/ _/_/_/ _/ _/
- _/
- _/
-
- Created by David Kaneda <http://www.davidkaneda.com>
- Documentation and issue tracking on Google Code <http://code.google.com/p/jqtouch/>
-
- Special thanks to Jonathan Stark <http://jonathanstark.com/>
-
- Lots of this code is specifically derived from Jonathan's book,
- "Building iPhone Apps with HTML, CSS, and JavaScript"
-
- (c) 2009 by jQTouch project members.
- See LICENSE.txt for license.
-
-*/
-
-(function($) {
- if ($.jQTouch)
- {
- $.jQTouch.addExtension(function Offline(){
-
- // Convenience array of status values
- var cacheStatusValues = [];
- cacheStatusValues[0] = 'uncached';
- cacheStatusValues[1] = 'idle';
- cacheStatusValues[2] = 'checking';
- cacheStatusValues[3] = 'downloading';
- cacheStatusValues[4] = 'updateready';
- cacheStatusValues[5] = 'obsolete';
-
- // Listeners for all possible events
- var cache = window.applicationCache;
- cache.addEventListener('cached', logEvent, false);
- cache.addEventListener('checking', logEvent, false);
- cache.addEventListener('downloading', logEvent, false);
- cache.addEventListener('error', logEvent, false);
- cache.addEventListener('noupdate', logEvent, false);
- cache.addEventListener('obsolete', logEvent, false);
- cache.addEventListener('progress', logEvent, false);
- cache.addEventListener('updateready', logEvent, false);
-
- // Log every event to the console
- function logEvent(e) {
- var online, status, type, message;
- online = (isOnline()) ? 'yes' : 'no';
- status = cacheStatusValues[cache.status];
- type = e.type;
- message = 'online: ' + online;
- message+= ', event: ' + type;
- message+= ', status: ' + status;
- if (type == 'error' && navigator.onLine) {
- message+= ' There was an unknown error, check your Cache Manifest.';
- }
- console.log(message);
- }
-
- function isOnline() {
- return navigator.onLine;
- }
-
- if (!$('html').attr('manifest')) {
- console.log('No Cache Manifest listed on the <html> tag.')
- }
-
- // Swap in newly download files when update is ready
- cache.addEventListener('updateready', function(e){
- // Don't perform "swap" if this is the first cache
- if (cacheStatusValues[cache.status] != 'idle') {
- cache.swapCache();
- console.log('Swapped/updated the Cache Manifest.');
- }
- }
- , false);
-
- // These two functions check for updates to the manifest file
- function checkForUpdates(){
- cache.update();
- }
- function autoCheckForUpdates(){
- setInterval(function(){cache.update()}, 10000);
- }
-
- return {
- isOnline: isOnline,
- checkForUpdates: checkForUpdates,
- autoCheckForUpdates: autoCheckForUpdates
- }
- });
- }
+/* + + _/ _/_/ _/_/_/_/_/ _/ + _/ _/ _/ _/_/ _/ _/ _/_/_/ _/_/_/ + _/ _/ _/_/ _/ _/ _/ _/ _/ _/ _/ _/ + _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ + _/ _/_/ _/ _/ _/_/ _/_/_/ _/_/_/ _/ _/ + _/ + _/ + + Created by David Kaneda <http://www.davidkaneda.com> + Documentation and issue tracking on Google Code <http://code.google.com/p/jqtouch/> + + Special thanks to Jonathan Stark <http://jonathanstark.com/> + + Lots of this code is specifically derived from Jonathan's book, + "Building iPhone Apps with HTML, CSS, and JavaScript" + + (c) 2009 by jQTouch project members. + See LICENSE.txt for license. + +*/ + +(function($) { + if ($.jQTouch) + { + $.jQTouch.addExtension(function Offline(){ + + // Convenience array of status values + var cacheStatusValues = []; + cacheStatusValues[0] = 'uncached'; + cacheStatusValues[1] = 'idle'; + cacheStatusValues[2] = 'checking'; + cacheStatusValues[3] = 'downloading'; + cacheStatusValues[4] = 'updateready'; + cacheStatusValues[5] = 'obsolete'; + + // Listeners for all possible events + var cache = window.applicationCache; + cache.addEventListener('cached', logEvent, false); + cache.addEventListener('checking', logEvent, false); + cache.addEventListener('downloading', logEvent, false); + cache.addEventListener('error', logEvent, false); + cache.addEventListener('noupdate', logEvent, false); + cache.addEventListener('obsolete', logEvent, false); + cache.addEventListener('progress', logEvent, false); + cache.addEventListener('updateready', logEvent, false); + + // Log every event to the console + function logEvent(e) { + var online, status, type, message; + online = (isOnline()) ? 'yes' : 'no'; + status = cacheStatusValues[cache.status]; + type = e.type; + message = 'online: ' + online; + message+= ', event: ' + type; + message+= ', status: ' + status; + if (type == 'error' && navigator.onLine) { + message+= ' There was an unknown error, check your Cache Manifest.'; + } + console.log(message); + } + + function isOnline() { + return navigator.onLine; + } + + if (!$('html').attr('manifest')) { + console.log('No Cache Manifest listed on the <html> tag.') + } + + // Swap in newly download files when update is ready + cache.addEventListener('updateready', function(e){ + // Don't perform "swap" if this is the first cache + if (cacheStatusValues[cache.status] != 'idle') { + cache.swapCache(); + console.log('Swapped/updated the Cache Manifest.'); + } + } + , false); + + // These two functions check for updates to the manifest file + function checkForUpdates(){ + cache.update(); + } + function autoCheckForUpdates(){ + setInterval(function(){cache.update()}, 10000); + } + + return { + isOnline: isOnline, + checkForUpdates: checkForUpdates, + autoCheckForUpdates: autoCheckForUpdates + } + }); + } })(jQuery);
\ No newline at end of file @@ -9,8 +9,8 @@ <script src="jqtouch/jquery.1.3.2.min.js" type="text/javascript" charset="utf-8"></script> <script src="jqtouch/jqtouch.js" type="application/x-javascript" charset="utf-8"></script> <script src="jqtouch/jqtouch.transitions.js" type="application/x-javascript" charset="utf-8"></script> - <script src="extensions/jquery.scrollTo-min.js" type="application/x-javascript" charset="utf-8"></script> - <script src="js/spinningwheel.js" type="application/x-javascript" charset="utf-8"></script> + <script src="extensions/jqt.offline.js" type="application/x-javascript" charset="utf-8"></script> + <script src="js/spinningwheel-min.js" type="application/x-javascript" charset="utf-8"></script> <script src="js/functions.js" type="application/x-javascript" charset="utf-8"></script> <script src="js/istreamdev.js" type="application/x-javascript" charset="utf-8"></script> <style type="text/css" media="screen">@import "css/spinningwheel.css";</style> diff --git a/istreamdev.manifest b/istreamdev.manifest index d8a60fd..e69de29 100644 --- a/istreamdev.manifest +++ b/istreamdev.manifest @@ -1,37 +0,0 @@ -CACHE MANIFEST -themes/jqt/img/chevron.png -themes/jqt/img/back_button.png -themes/jqt/img/back_button_clicked.png -themes/jqt/img/button_clicked.png -themes/jqt/img/button.png -themes/jqt/img/button_clicked.png -themes/jqt/img/loading.gif -themes/jqt/img/toolbar.png -themes/jqt/img/on_off.png -img/loading.gif -img/audio.png -img/epg.png -img/media.png -img/record.png -img/timers.png -img/timeron.png -img/timeroff.png -img/timerrec.png -img/tv.png -img/video.png -img/stream.png -img/stream_clicked.png -img/istreamdev.png -img/mask.png -img/nologoTV.png -img/nologoREC.png -img/nologoMEDIA.png -img/rec.png -img/rec_clicked.png -img/sw-alpha.png -img/sw-button-cancel.png -img/sw-button-done.png -img/sw-header.png -img/sw-slot-border.png -img/nologoTV-mini.jpg -logos/*
\ No newline at end of file diff --git a/js/istreamdev.js b/js/istreamdev.js index 3b87b6b..eef6357 100644 --- a/js/istreamdev.js +++ b/js/istreamdev.js @@ -48,6 +48,7 @@ jQT = new $.jQTouch({ // [GENERIC STUFF]
// Global variable
+//window.applicationCache;
dataString = "action=getGlobals";
$.getJSON("bin/backend.php",
@@ -63,6 +64,7 @@ $.getJSON("bin/backend.php", //Goto home
$('#home_but').tap(function(event) {
event.preventDefault();
+ $(this).parents('div').find('a').unbind("tap");
jQT.goTo('#home','flip');
});
@@ -90,6 +92,7 @@ function reinitDivs() { // Binds
+//hide "toggle" elements to lighten animation
$(document).ready(function(e){
$('div').bind('pageAnimationEnd', function(event, info){
if (info.direction == 'in') {
@@ -103,7 +106,7 @@ $('div').bind('pageAnimationStart', function(event, info){ }
})
});
-
+//disable links of page while animation
$('a[class="back"]').tap(function(event) {
event.preventDefault();
$(this).parents('div').find('a').unbind("tap");
@@ -540,7 +543,6 @@ $('ul[rel="filelist"] li[class="arrow"] a').tap(function(event) { $('div[rel="browser"] a[class="back"]').tap(function(event) {
event.preventDefault();
- $(this).parents('div[rel="browser"]').find('ul[rel="filelist"] li[class="arrow"] a').unbind("tap");
$(this).parents('div[rel="browser"]').remove();
});
|