Permalink
Browse files

Latest release, updates

view svn.bluga.net for more infos.


git-svn-id: http://svn.php.net/repository/pear/packages/HTML_AJAX/trunk@200176 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
David Coallier
David Coallier committed Nov 7, 2005
1 parent ec36fca commit 975a2e14ad8e05cedd3f5566d0f328b06361b070
Showing with 1,253 additions and 1,198 deletions.
  1. +85 −71 js/Dispatcher.js
  2. +474 −456 js/HTML_AJAX.js
  3. +17 −2 js/HTML_AJAX_lite.js
  4. +199 −199 js/HttpClient.js
  5. +38 −38 js/Loading.js
  6. +101 −97 js/Request.js
  7. +290 −290 js/phpSerializer.js
  8. +49 −45 js/util.js
View
@@ -1,71 +1,85 @@
-/**
- * Class that is used by generated stubs to make actual AJAX calls
- *
- * @category HTML
- * @package AJAX
- * @author Joshua Eichorn <josh@bluga.net>
- * @copyright 2005 Joshua Eichorn
- * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
- */
-function HTML_AJAX_Dispatcher(className,mode,callback,serverUrl,serializerType)
-{
- this.className = className;
- this.mode = mode;
- this.callback = callback;
- this.serializerType = serializerType;
-
- if (serverUrl) {
- this.serverUrl = serverUrl
- }
- else {
- this.serverUrl = window.location;
- }
-}
-
-HTML_AJAX_Dispatcher.prototype = {
- /**
- * Queue to use when making a request
- */
- queue: 'default',
-
- /**
- * Timeout for async calls
- */
- timeout: 20000,
-
- /**
- * Make an ajax call
- *
- * @param string callName
- * @param Array args arguments to the report method
- */
- doCall: function(callName,args)
- {
- var request = new HTML_AJAX_Request();
- request.requestUrl = this.serverUrl;
- request.className = this.className;
- request.methodName = callName;
- request.timeout = this.timeout;
- request.contentType = this.contentType;
- request.serializer = eval('new HTML_AJAX_Serialize_'+this.serializerType);
- request.queue = this.queue;
-
- for(var i=0; i < args.length; i++) {
- request.addArg(i,args[i]);
- };
-
- if ( this.mode == "async" ) {
- request.isAsync = true;
- if (this.callback[callName]) {
- var self = this;
- request.callback = function(result) { self.callback[callName](result); }
- }
-
- } else {
- request.isAsync = false;
- }
-
- return HTML_AJAX.makeRequest(request);
- }
-};
-/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
+/**
+ * Class that is used by generated stubs to make actual AJAX calls
+ *
+ * @category HTML
+ * @package AJAX
+ * @author Joshua Eichorn <josh@bluga.net>
+ * @copyright 2005 Joshua Eichorn
+ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
+ */
+function HTML_AJAX_Dispatcher(className,mode,callback,serverUrl,serializerType)
+{
+ this.className = className;
+ this.mode = mode;
+ this.callback = callback;
+ this.serializerType = serializerType;
+
+ if (serverUrl) {
+ this.serverUrl = serverUrl
+ }
+ else {
+ this.serverUrl = window.location;
+ }
+}
+
+HTML_AJAX_Dispatcher.prototype = {
+ /**
+ * Queue to use when making a request
+ */
+ queue: 'default',
+
+ /**
+ * Timeout for async calls
+ */
+ timeout: 20000,
+
+ /**
+ * Make an ajax call
+ *
+ * @param string callName
+ * @param Array args arguments to the report method
+ */
+ doCall: function(callName,args)
+ {
+ var request = new HTML_AJAX_Request();
+ request.requestUrl = this.serverUrl;
+ request.className = this.className;
+ request.methodName = callName;
+ request.timeout = this.timeout;
+ request.contentType = this.contentType;
+ request.serializer = eval('new HTML_AJAX_Serialize_'+this.serializerType);
+ request.queue = this.queue;
+
+ for(var i=0; i < args.length; i++) {
+ request.addArg(i,args[i]);
+ };
+
+ if ( this.mode == "async" ) {
+ request.isAsync = true;
+ if (this.callback[callName]) {
+ var self = this;
+ request.callback = function(result) { self.callback[callName](result); }
+ }
+
+ } else {
+ request.isAsync = false;
+ }
+
+ return HTML_AJAX.makeRequest(request);
+ },
+
+ Sync: function()
+ {
+ this.mode = 'sync';
+ },
+
+ Async: function(callback)
+ {
+ this.mode = 'async';
+ if (callback) {
+ this.callback = callback;
+ }
+ }
+
+};
+/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
Oops, something went wrong.

0 comments on commit 975a2e1

Please sign in to comment.