diff options
author | Paul 'flowerysong' Arthur <flowerysong00@yahoo.com> | 2010-06-24 02:52:01 +0000 |
---|---|---|
committer | Paul 'flowerysong' Arthur <flowerysong00@yahoo.com> | 2010-06-24 02:52:01 +0000 |
commit | 62774923211c2e391534d83e6c7d97acae086766 (patch) | |
tree | a43d0ce9345df18b0f67b61e044636114ce56aba /templates/javascript_refresh.inc.php | |
parent | 7549180515107d924610a22c5acf1a0e44b4b9f5 (diff) | |
download | ampache-62774923211c2e391534d83e6c7d97acae086766.tar.gz ampache-62774923211c2e391534d83e6c7d97acae086766.tar.bz2 ampache-62774923211c2e391534d83e6c7d97acae086766.zip |
JavaScript cleanup. Consistently use camelCase for naming JS functions. Use
Prototype functionality where possible (particularly for Ajax). Move our JS
into lib/javascript (I dropped kajax as an external module since the new
ajax.js is completely different apart from function headers.) Remove unused
JS functions from base.js.
Diffstat (limited to 'templates/javascript_refresh.inc.php')
-rw-r--r-- | templates/javascript_refresh.inc.php | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/templates/javascript_refresh.inc.php b/templates/javascript_refresh.inc.php index 5f0a07ed..b0c8d9f5 100644 --- a/templates/javascript_refresh.inc.php +++ b/templates/javascript_refresh.inc.php @@ -22,27 +22,13 @@ ?> <script type="text/javascript" language="javascript"> -<!-- Begin // Set refresh interval (in seconds) -var refreshinterval=<?php echo $refresh_limit ?>; - -function doLoad() -{ - // the timeout value should be the same as in the "refresh" meta-tag - setTimeout( "refresh()", refreshinterval*1000 ); -} +var refreshInterval=<?php echo $refresh_limit ?>; function refresh() { - // This version of the refresh function will cause a new - // entry in the visitor's history. It is provided for - // those browsers that only support JavaScript 1.0. - // ajaxPut('<?php echo $ajax_url; ?>'); - doLoad(); } -// start with page-load -doLoad(); -// End --> +new PeriodicalExecuter(refresh, refreshInterval); </script> |