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/diag_dump_states.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/diag_dump_states.php')
-rwxr-xr-x | usr/local/www/diag_dump_states.php | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/usr/local/www/diag_dump_states.php b/usr/local/www/diag_dump_states.php index a8671c1..56d527f 100755 --- a/usr/local/www/diag_dump_states.php +++ b/usr/local/www/diag_dump_states.php @@ -74,18 +74,18 @@ include("head.inc"); <script type="text/javascript"> function removeState(srcip, dstip) { - 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:" + srcip + ":" + dstip)).each(busy); + jQuery('img[name="i:' + srcip + ":" + dstip + '"]').each(busy); - new Ajax.Request( + jQuery.ajax( "<?=$_SERVER['SCRIPT_NAME'];?>" + "?action=remove&srcip=" + srcip + "&dstip=" + dstip, - { method: "get", onComplete: removeComplete } + { type: "get", complete: removeComplete } ); } @@ -96,8 +96,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> |