summaryrefslogtreecommitdiff
path: root/framework/Web
diff options
context:
space:
mode:
authorFabio Bas <ctrlaltca@gmail.com>2013-11-23 14:52:06 +0100
committerFabio Bas <ctrlaltca@gmail.com>2013-11-26 11:42:52 +0100
commit808badb68dd02b0fb3977fdcb4f069735e442e50 (patch)
tree15101fe9972a184c0e1f4a8dba20d7c735923288 /framework/Web
parent9dc6db70c6c59c9b5cd01492cd6ca25e639c1d64 (diff)
Re-added Prado.Callback helper function
Diffstat (limited to 'framework/Web')
-rw-r--r--framework/Web/Javascripts/source/prado/activecontrols/ajax3.js45
1 files changed, 22 insertions, 23 deletions
diff --git a/framework/Web/Javascripts/source/prado/activecontrols/ajax3.js b/framework/Web/Javascripts/source/prado/activecontrols/ajax3.js
index e4f4a7fd..8839c1ae 100644
--- a/framework/Web/Javascripts/source/prado/activecontrols/ajax3.js
+++ b/framework/Web/Javascripts/source/prado/activecontrols/ajax3.js
@@ -75,7 +75,7 @@ Prado.CallbackRequest = jQuery.klass(Prado.PostBack,
options : {},
data : '',
- initialize: function(target, options)
+ initialize: function(id, options)
{
this.options = {
RequestTimeOut : 30000, // 30 second timeout.
@@ -811,30 +811,29 @@ jQuery(function()
// }
// });
-// /**
-// * Create a new callback request using default settings.
-// * @param string callback handler unique ID.
-// * @param mixed parameter to pass to callback handler on the server side.
-// * @param function client side onSuccess event handler.
-// * @param object additional request options.
-// * @return boolean always false.
-// */
-// Prado.Callback = function(UniqueID, parameter, onSuccess, options)
-// {
-// var callback =
-// {
-// 'CallbackParameter' : parameter || '',
-// 'onSuccess' : onSuccess || Prototype.emptyFunction
-// };
-
-// Object.extend(callback, options || {});
-
-// var request = new Prado.CallbackRequest(UniqueID, callback);
-// request.dispatch();
-// return false;
-// };
+/**
+ * Create a new callback request using default settings.
+ * @param string callback handler unique ID.
+ * @param mixed parameter to pass to callback handler on the server side.
+ * @param function client side onSuccess event handler.
+ * @param object additional request options.
+ * @return boolean always false.
+ */
+Prado.Callback = function(UniqueID, parameter, onSuccess, options)
+{
+ var callback =
+ {
+ 'EventTarget' : UniqueID || '',
+ 'CallbackParameter' : parameter || '',
+ 'onSuccess' : onSuccess || jQuery.noop()
+ };
+ jQuery.extend(callback, options || {});
+ var request = new Prado.CallbackRequest(UniqueID, callback);
+ request.dispatch();
+ return false;
+};
/**
* Asset manager classes for lazy loading of scripts and stylesheets