Upgrade to ExtJS 3.3.0 - Released 10/06/2010
[extjs.git] / src / direct / JsonProvider.js
index 5a37064..a2e345e 100644 (file)
@@ -1,45 +1,45 @@
 /*!
- * Ext JS Library 3.0.0
- * Copyright(c) 2006-2009 Ext JS, LLC
+ * Ext JS Library 3.3.0
+ * Copyright(c) 2006-2010 Ext JS, Inc.
  * licensing@extjs.com
  * http://www.extjs.com/license
  */
-/**\r
- * @class Ext.direct.JsonProvider\r
- * @extends Ext.direct.Provider\r
- */\r
-Ext.direct.JsonProvider = Ext.extend(Ext.direct.Provider, {\r
-    parseResponse: function(xhr){\r
-        if(!Ext.isEmpty(xhr.responseText)){\r
-            if(typeof xhr.responseText == 'object'){\r
-                return xhr.responseText;\r
-            }\r
-            return Ext.decode(xhr.responseText);\r
-        }\r
-        return null;\r
-    },\r
-\r
-    getEvents: function(xhr){\r
-        var data = null;\r
-        try{\r
-            data = this.parseResponse(xhr);\r
-        }catch(e){\r
-            var event = new Ext.Direct.ExceptionEvent({\r
-                data: e,\r
-                xhr: xhr,\r
-                code: Ext.Direct.exceptions.PARSE,\r
-                message: 'Error parsing json response: \n\n ' + data\r
-            })\r
-            return [event];\r
-        }\r
-        var events = [];\r
-        if(Ext.isArray(data)){\r
-            for(var i = 0, len = data.length; i < len; i++){\r
-                events.push(Ext.Direct.createEvent(data[i]));\r
-            }\r
-        }else{\r
-            events.push(Ext.Direct.createEvent(data));\r
-        }\r
-        return events;\r
-    }\r
+/**
+ * @class Ext.direct.JsonProvider
+ * @extends Ext.direct.Provider
+ */
+Ext.direct.JsonProvider = Ext.extend(Ext.direct.Provider, {
+    parseResponse: function(xhr){
+        if(!Ext.isEmpty(xhr.responseText)){
+            if(typeof xhr.responseText == 'object'){
+                return xhr.responseText;
+            }
+            return Ext.decode(xhr.responseText);
+        }
+        return null;
+    },
+
+    getEvents: function(xhr){
+        var data = null;
+        try{
+            data = this.parseResponse(xhr);
+        }catch(e){
+            var event = new Ext.Direct.ExceptionEvent({
+                data: e,
+                xhr: xhr,
+                code: Ext.Direct.exceptions.PARSE,
+                message: 'Error parsing json response: \n\n ' + data
+            });
+            return [event];
+        }
+        var events = [];
+        if(Ext.isArray(data)){
+            for(var i = 0, len = data.length; i < len; i++){
+                events.push(Ext.Direct.createEvent(data[i]));
+            }
+        }else{
+            events.push(Ext.Direct.createEvent(data));
+        }
+        return events;
+    }
 });
\ No newline at end of file