summaryrefslogtreecommitdiffstats
path: root/usr/local/www/index.php
diff options
context:
space:
mode:
authorVinicius Coque <vcoque@gmail.com>2011-09-20 21:25:24 -0300
committerVinicius Coque <vinicius.coque@bluepex.com>2011-09-27 19:31:19 -0300
commitb1678e2d72a59dc066eb09c24240877fe4553f58 (patch)
tree860d029c439ec3637c2d1bda22290a086b8d3879 /usr/local/www/index.php
parent9cd55a6611f117ae7330cbfdf79649ae1408f351 (diff)
downloadpfsense-b1678e2d72a59dc066eb09c24240877fe4553f58.zip
pfsense-b1678e2d72a59dc066eb09c24240877fe4553f58.tar.gz
Convert dashboard ajax code from Prototype to jQuery
Diffstat (limited to 'usr/local/www/index.php')
-rwxr-xr-xusr/local/www/index.php17
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);
}
OpenPOWER on IntegriCloud