Thread: [Phphtmllib-devel] SF.net SVN: phphtmllib:[3283] trunk/open2300/htdocs/js/main.js
Status: Beta
Brought to you by:
hemna
From: <he...@us...> - 2009-11-24 05:20:20
|
Revision: 3283 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3283&view=rev Author: hemna Date: 2009-11-24 05:20:11 +0000 (Tue, 24 Nov 2009) Log Message: ----------- added periodical executor for the cam image Modified Paths: -------------- trunk/open2300/htdocs/js/main.js Modified: trunk/open2300/htdocs/js/main.js =================================================================== --- trunk/open2300/htdocs/js/main.js 2009-11-24 05:19:32 UTC (rev 3282) +++ trunk/open2300/htdocs/js/main.js 2009-11-24 05:20:11 UTC (rev 3283) @@ -70,9 +70,9 @@ Effect.Appear('idWindSpeedLineGraph', {duration: 0.7}); }}); - Effect.Fade('idRadarImg', {duration: 0.3, afterFinish: function() { + Effect.Fade('idRadarImg', {duration: 0.7, afterFinish: function() { img = new Image(); - img.src = "http://radblast-mi.wunderground.com/cgi-bin/radar/WUNIDS_map?station=DAX&brand=wui&num=1&delay=15&type=N0R&frame=0&scale=0.326&noclutter=0&t=1235942643&lat=38.81977081&lon=-121.02596283&label=Pilot+Hill%2C+CA&showstorms=0&map.x=400&map.y=240¢erx=145¢ery=359&transx=-255&transy=119&showlabels=1&severe=0&rainsnow=0&lightning=0&smooth=0"; + img.src = "http://radblast-mi.wunderground.com/cgi-bin/radar/WUNIDS_map?station=DAX&brand=wui&num=1&delay=15&type=N0R&frame=0&scale=0.326&noclutter=0&t=1235942643&lat=38.81977081&lon=-121.02596283&label=Pilot+Hill%2C+CA&showstorms=0&map.x=400&map.y=240¢erx=145¢ery=359&transx=-255&transy=119&showlabels=1&severe=0&rainsnow=0&lightning=0&smooth=0&junk="+d.getTime(); img.id='idRadarImg'; img.width=480; img.height=320; @@ -114,6 +114,13 @@ } + new PeriodicalExecuter(function(pe) { + d = new Date(); + img = $('idCam'); + img.src="http://wx.hemna.com/cam/cam.jpg?junk="+d.getSeconds(); + }, + 30); + function set_orig_time(new_time) { orig_time = new_time; orig_ts =Math.round(orig_time.getTime()/1000); @@ -146,4 +153,4 @@ } return newHTML; -} \ No newline at end of file +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2009-11-24 17:21:26
|
Revision: 3293 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3293&view=rev Author: hemna Date: 2009-11-24 17:21:19 +0000 (Tue, 24 Nov 2009) Log Message: ----------- updated cam image id Modified Paths: -------------- trunk/open2300/htdocs/js/main.js Modified: trunk/open2300/htdocs/js/main.js =================================================================== --- trunk/open2300/htdocs/js/main.js 2009-11-24 15:28:03 UTC (rev 3292) +++ trunk/open2300/htdocs/js/main.js 2009-11-24 17:21:19 UTC (rev 3293) @@ -116,7 +116,7 @@ new PeriodicalExecuter(function(pe) { d = new Date(); - img = $('idCam'); + img = $('idCamImg'); img.src="http://wx.hemna.com/cam/cam.jpg?junk="+d.getSeconds(); }, 30); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2009-11-24 23:59:04
|
Revision: 3295 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3295&view=rev Author: hemna Date: 2009-11-24 23:58:51 +0000 (Tue, 24 Nov 2009) Log Message: ----------- small cleanup Modified Paths: -------------- trunk/open2300/htdocs/js/main.js Modified: trunk/open2300/htdocs/js/main.js =================================================================== --- trunk/open2300/htdocs/js/main.js 2009-11-24 17:22:54 UTC (rev 3294) +++ trunk/open2300/htdocs/js/main.js 2009-11-24 23:58:51 UTC (rev 3295) @@ -18,8 +18,7 @@ },2); new PeriodicalExecuter(function(pe) { - d = new Date(); - new Ajax.Updater('idCurrentConditions','/?ajax=1&ajaxid=idCurrentConditions&target=current-conditions&junk='+d.getSeconds() , + new Ajax.Updater('idCurrentConditions','/?ajax=1&ajaxid=idCurrentConditions&target=current-conditions&junk='+get_junk() , {method:'get',asynchronous:true,evalScripts:true, onComplete: function() { new Effect.Highlight('idcclastupdate', {duration: 5.0}); @@ -29,11 +28,11 @@ 63); new PeriodicalExecuter(function(pe) { - d = new Date(); + var junk = get_junk(); Effect.Fade('idTempDewLineGraph', {duration: 0.5, afterFinish: function() { img = new Image(); - img.src = '/?target=temp-dew-point-line-graph&junk='+d.getTime(); + img.src = '/?target=temp-dew-point-line-graph&junk='+junk; img.id='idTempDewLineGraph'; $('idTempDewLineGraphdiv').update(); $('idTempDewLineGraphdiv').appendChild(img); @@ -43,7 +42,7 @@ Effect.Fade('idPressureLineGraph', {duration: 0.6, afterFinish: function() { img = new Image(); - img.src = '/?target=pressure-line-graph&junk='+d.getTime(); + img.src = '/?target=pressure-line-graph&junk='+junk; img.id='idPressureLineGraph'; $('idPressureLineGraphdiv').update(); $('idPressureLineGraphdiv').appendChild(img); @@ -53,7 +52,7 @@ Effect.Fade('idRainLineGraph', {duration: 0.7, afterFinish: function() { img = new Image(); - img.src = '/?target=rain-line-graph&junk='+d.getTime(); + img.src = '/?target=rain-line-graph&junk='+junk; img.id='idRainLineGraph'; $('idRainLineGraphdiv').update(); $('idRainLineGraphdiv').appendChild(img); @@ -63,7 +62,7 @@ Effect.Fade('idWindSpeedLineGraph', {duration: 0.7, afterFinish: function() { img = new Image(); - img.src = '/?target=wind-speed-line-graph&junk='+d.getTime(); + img.src = '/?target=wind-speed-line-graph&junk='+junk; img.id='idWindSpeedLineGraph'; $('idWindSpeedLineGraphdiv').update(); $('idWindSpeedLineGraphdiv').appendChild(img); @@ -72,7 +71,7 @@ Effect.Fade('idRadarImg', {duration: 0.7, afterFinish: function() { img = new Image(); - img.src = "http://radblast-mi.wunderground.com/cgi-bin/radar/WUNIDS_map?station=DAX&brand=wui&num=1&delay=15&type=N0R&frame=0&scale=0.326&noclutter=0&t=1235942643&lat=38.81977081&lon=-121.02596283&label=Pilot+Hill%2C+CA&showstorms=0&map.x=400&map.y=240¢erx=145¢ery=359&transx=-255&transy=119&showlabels=1&severe=0&rainsnow=0&lightning=0&smooth=0&junk="+d.getTime(); + img.src = "http://radblast-mi.wunderground.com/cgi-bin/radar/WUNIDS_map?station=DAX&brand=wui&num=1&delay=15&type=N0R&frame=0&scale=0.326&noclutter=0&t=1235942643&lat=38.81977081&lon=-121.02596283&label=Pilot+Hill%2C+CA&showstorms=0&map.x=400&map.y=240¢erx=145¢ery=359&transx=-255&transy=119&showlabels=1&severe=0&rainsnow=0&lightning=0&smooth=0&junk="+junk; img.id='idRadarImg'; img.width=480; img.height=320; @@ -83,11 +82,17 @@ }, 65); + + //update the image + new PeriodicalExecuter(function(pe) { + var img = $('idCamImg'); + img.src="http://wx.hemna.com/cam/cam.jpg?junk="+get_junk(); + },30); + } function start_weather_dl_updates() { - set_orig_time(new Date()); var counter = new PeriodicalExecuter(function() { @@ -99,28 +104,28 @@ conds['ages'] = time.getSeconds() - orig_time.getSeconds(); $('idUpdateSeconds').update(convertTime(new_ts - orig_ts)); -},2); + },2); - new PeriodicalExecuter(function(pe) { - d = new Date(); - new Ajax.Updater('idCurrentConditions','/?ajax=1&ajaxid=idCurrentConditions&target=current-conditions&junk='+d.getSeconds() , + new PeriodicalExecuter(function(pe) { + new Ajax.Updater('idCurrentConditions','/?ajax=1&ajaxid=idCurrentConditions&target=current-conditions&junk='+get_junk() , {method:'get',asynchronous:true,evalScripts:true, onComplete: function() { new Effect.Highlight('idcclastupdate', {duration: 5.0}); set_orig_time(new Date()); }}) - }, - 63); - + }, + 63); } - new PeriodicalExecuter(function(pe) { - d = new Date(); - img = $('idCamImg'); - img.src="http://wx.hemna.com/cam/cam.jpg?junk="+d.getSeconds(); - }, - 30); + + + +function get_junk() { + var d = new Date(); + return d.getDate()+d.getHours()+d.getSeconds(); +} + function set_orig_time(new_time) { orig_time = new_time; orig_ts =Math.round(orig_time.getTime()/1000); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-02-17 02:39:27
|
Revision: 3328 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3328&view=rev Author: hemna Date: 2010-02-17 02:39:21 +0000 (Wed, 17 Feb 2010) Log Message: ----------- no effects on getting graph images. Modified Paths: -------------- trunk/open2300/htdocs/js/main.js Modified: trunk/open2300/htdocs/js/main.js =================================================================== --- trunk/open2300/htdocs/js/main.js 2010-02-17 02:28:58 UTC (rev 3327) +++ trunk/open2300/htdocs/js/main.js 2010-02-17 02:39:21 UTC (rev 3328) @@ -29,8 +29,20 @@ new PeriodicalExecuter(function(pe) { var junk = get_junk(); + + var temp_img = $('idTempDewLineGraph'); + temp_img.src= 'http://wx.hemna.com/?target=temp-dew-point-line-graph&junk='+junk; + + var press_img = $('idPressureLineGraph'); + press_img.src= 'http://wx.hemna.com/?target=pressure-line-graph&junk='+junk; + + var rain_img = $('idRainLineGraph'); + rain_img.src= 'http://wx.hemna.com/?target=rain-line-graph&junk='+junk; + + var wind_img = $('idWindSpeedLineGraph'); + wind_img.src= 'http://wx.hemna.com/?target=wind-speed-line-graph&junk='+junk; - Effect.Fade('idTempDewLineGraph', {duration: 0.5, afterFinish: function() { +/* Effect.Fade('idTempDewLineGraph', {duration: 0.5, afterFinish: function() { img = new Image(); img.src = '/?target=temp-dew-point-line-graph&junk='+junk; img.id='idTempDewLineGraph'; @@ -39,6 +51,7 @@ //$('idTempDewLineGraph').src='/?target=temp-dew-point-line-graph&junk='+d.getSeconds(); Effect.Appear('idTempDewLineGraph', {duration: 0.5}); }}); + Effect.Fade('idPressureLineGraph', {duration: 0.6, afterFinish: function() { img = new Image(); @@ -49,6 +62,7 @@ //$('idPressureLineGraph').src='/?target=pressure-line-graph&junk='+d.getSeconds(); Effect.Appear('idPressureLineGraph', {duration: 0.6}); }}); + Effect.Fade('idRainLineGraph', {duration: 0.7, afterFinish: function() { img = new Image(); @@ -68,6 +82,7 @@ $('idWindSpeedLineGraphdiv').appendChild(img); Effect.Appear('idWindSpeedLineGraph', {duration: 0.7}); }}); + */ Effect.Fade('idRadarImg', {duration: 0.7, afterFinish: function() { img = new Image(); @@ -87,7 +102,7 @@ new PeriodicalExecuter(function(pe) { var img = $('idCamImg'); img.src="http://wx.hemna.com/cam/cam.jpg?junk="+get_junk(); - },30); + },15); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-02-21 19:58:59
|
Revision: 3335 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3335&view=rev Author: hemna Date: 2010-02-21 19:58:52 +0000 (Sun, 21 Feb 2010) Log Message: ----------- added more junk and auto update the timelapse time Modified Paths: -------------- trunk/open2300/htdocs/js/main.js Modified: trunk/open2300/htdocs/js/main.js =================================================================== --- trunk/open2300/htdocs/js/main.js 2010-02-21 19:58:07 UTC (rev 3334) +++ trunk/open2300/htdocs/js/main.js 2010-02-21 19:58:52 UTC (rev 3335) @@ -4,6 +4,7 @@ function start_updates() { + //init_calendar_popup(); set_orig_time(new Date()); var counter = new PeriodicalExecuter(function() { @@ -100,10 +101,18 @@ //update the image new PeriodicalExecuter(function(pe) { - var img = $('idCamImg'); + var img = $('idWebCamImg'); img.src="http://wx.hemna.com/cam/cam.jpg?junk="+get_junk(); },15); - + + new PeriodicalExecuter(function(pe) { + new Ajax.Updater('idWebCam','/?ajax=1&ajaxid=idWebCam&target=web-cam&junk='+get_junk() , + {method:'get',asynchronous:true,evalScripts:true, + onComplete: function() { + new Effect.Pulsate('idWebCamFlasUpdate', {pulses: 5, duration: 1.5}); + }}) + }, + 300); } @@ -137,8 +146,9 @@ function get_junk() { - var d = new Date(); - return d.getDate()+d.getHours()+d.getSeconds(); + var d = new Date(); + var junk=d.getMonth()+1+''+d.getDate()+''+d.getHours()+''+d.getSeconds(); + return junk; } function set_orig_time(new_time) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-02-27 01:27:31
|
Revision: 3388 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3388&view=rev Author: hemna Date: 2010-02-27 00:55:51 +0000 (Sat, 27 Feb 2010) Log Message: ----------- fixed junk Modified Paths: -------------- trunk/open2300/htdocs/js/main.js Modified: trunk/open2300/htdocs/js/main.js =================================================================== --- trunk/open2300/htdocs/js/main.js 2010-02-26 19:33:08 UTC (rev 3387) +++ trunk/open2300/htdocs/js/main.js 2010-02-27 00:55:51 UTC (rev 3388) @@ -146,7 +146,7 @@ function get_junk() { var d = new Date(); - var junk=d.getMonth()+1+''+d.getDate()+''+d.getHours()+''+d.getSeconds(); + var junk=d.getMonth()+1+''+d.getDay()+''+d.getHours()+''+d.getMinutes()+''+d.getSeconds(); return junk; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |