diff options
author | Vinicius Coque <vcoque@gmail.com> | 2011-09-20 21:25:24 -0300 |
---|---|---|
committer | Vinicius Coque <vinicius.coque@bluepex.com> | 2011-09-27 19:31:19 -0300 |
commit | b1678e2d72a59dc066eb09c24240877fe4553f58 (patch) | |
tree | 860d029c439ec3637c2d1bda22290a086b8d3879 /usr/local/www/index.php | |
parent | 9cd55a6611f117ae7330cbfdf79649ae1408f351 (diff) | |
download | pfsense-b1678e2d72a59dc066eb09c24240877fe4553f58.zip pfsense-b1678e2d72a59dc066eb09c24240877fe4553f58.tar.gz |
Convert dashboard ajax code from Prototype to jQuery
Diffstat (limited to 'usr/local/www/index.php')
-rwxr-xr-x | usr/local/www/index.php | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/usr/local/www/index.php b/usr/local/www/index.php index 1638196..d763230 100755 --- a/usr/local/www/index.php +++ b/usr/local/www/index.php @@ -261,24 +261,27 @@ function widgetAjax(widget) { uri = "widgets/widgets/" + widget + ".widget.php"; var opt = { // Use GET - method: 'get', + type: 'get', evalScripts: 'true', - asynchronous: true, + async: true, // Handle 404 - on404: function(t) { - alert('Error 404: location "' + t.statusText + '" was not found.'); + statusCode: { + 404: function(t) { + alert('Error 404: location "' + t.statusText + '" was not found.'); + } }, // Handle other errors - onFailure: function(t) { + error: function(t) { alert('Error ' + t.status + ' -- ' + t.statusText); }, - onSuccess: function(t) { + success: function(data) { widget2 = widget + "-loader"; Effect.Fade(widget2, {queue:'front'}); Effect.Appear(widget, {queue:'end'}); + jQuery('#' + widget).html(data); } } - new Ajax.Updater(widget, uri, opt); + jQuery.ajax(uri, opt); } |