diff options
author | Vinicius Coque <vcoque@gmail.com> | 2011-10-22 20:13:06 -0200 |
---|---|---|
committer | Vinicius Coque <vcoque@gmail.com> | 2011-10-22 20:13:06 -0200 |
commit | e03ef9a02cb3b3e328be1eab5230114483082853 (patch) | |
tree | e5c7dc1f4011fc6e6bbc9ceb8f79b64f319d7a04 /usr/local/www/status_openvpn.php | |
parent | 78d84a88e0f87ad2b44aa8f3c6b5d37fee2135e7 (diff) | |
download | pfsense-e03ef9a02cb3b3e328be1eab5230114483082853.zip pfsense-e03ef9a02cb3b3e328be1eab5230114483082853.tar.gz |
Converting ajax code from prototype to jQuery
Diffstat (limited to 'usr/local/www/status_openvpn.php')
-rw-r--r-- | usr/local/www/status_openvpn.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/usr/local/www/status_openvpn.php b/usr/local/www/status_openvpn.php index fd45b3b..a5ff598 100644 --- a/usr/local/www/status_openvpn.php +++ b/usr/local/www/status_openvpn.php @@ -110,17 +110,17 @@ include("head.inc"); ?> <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"; + 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 } ); } @@ -131,8 +131,8 @@ include("head.inc"); ?> 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> |