diff options
author | Vinicius Coque <vcoque@gmail.com> | 2011-11-15 16:09:31 -0200 |
---|---|---|
committer | Vinicius Coque <vcoque@gmail.com> | 2011-11-15 16:09:31 -0200 |
commit | a02ecc943fbda1c47fc25a19cad2b12c297bd346 (patch) | |
tree | 014169cac7020c748b82a34f5489f36c2b5ac975 /usr/local/www/widgets/widgets | |
parent | 6134cc8fe04957d1337e3d94c8ebe66ca3e61946 (diff) | |
download | pfsense-a02ecc943fbda1c47fc25a19cad2b12c297bd346.zip pfsense-a02ecc943fbda1c47fc25a19cad2b12c297bd346.tar.gz |
Converting javascript code from scriptaculous to jQuery
Diffstat (limited to 'usr/local/www/widgets/widgets')
-rw-r--r-- | usr/local/www/widgets/widgets/openvpn.widget.php | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/usr/local/www/widgets/widgets/openvpn.widget.php b/usr/local/www/widgets/widgets/openvpn.widget.php index 9b5df89..3c460b2 100644 --- a/usr/local/www/widgets/widgets/openvpn.widget.php +++ b/usr/local/www/widgets/widgets/openvpn.widget.php @@ -63,18 +63,18 @@ $clients = openvpn_get_active_clients(); <br/> <script type="text/javascript"> function killClient(mport, remipp) { - var busy = function(icon) { - icon.onclick = ""; - icon.src = icon.src.replace("\.gif", "_d.gif"); - icon.style.cursor = "wait"; + var busy = function(index,icon) { + jQuery(icon).bind("onclick",""); + jQuery(icon).attr('src',jQuery(icon).attr('src').replace("\.gif", "_d.gif")); + jQuery(icon).css("cursor","wait"); } - $A(document.getElementsByName("i:" + mport + ":" + remipp)).each(busy); + jQuery('img[name="i:' + mport + ":" + remipp + '"]').each(busy); - new Ajax.Request( + jQuery.ajax( "<?=$_SERVER['SCRIPT_NAME'];?>" + "?action=kill&port=" + mport + "&remipp=" + remipp, - { method: "get", onComplete: killComplete } + { type: "get", complete: killComplete } ); } @@ -85,8 +85,8 @@ $clients = openvpn_get_active_clients(); return; } - $A(document.getElementsByName("r:" + values[1] + ":" + values[2])).each( - function(row) { Effect.Fade(row, { duration: 1.0 }); } + jQuery('tr[name="r:' + values[1] + ":" + values[2] + '"]').each( + function(index,row) { jQuery(row).fadeOut(1000); } ); } </script> @@ -249,4 +249,4 @@ if ($DisplayNote) { if ((empty($clients)) && (empty($servers))) { echo "No OpenVPN instance defined"; } -?>
\ No newline at end of file +?> |