<html>\r
<head>\r
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> \r
<title>The source code</title>\r
<link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />\r
<script type="text/javascript" src="../resources/prettify/prettify.js"></script>\r
* @constructor\r
* @param {Object} config\r
*/\r
-Ext.data.DirectStore = function(c){\r
- // each transaction upon a singe record will generatie a distinct Direct transaction since Direct queues them into one Ajax request.\r
- c.batchTransactions = false;\r
-\r
- Ext.data.DirectStore.superclass.constructor.call(this, Ext.apply(c, {\r
- proxy: (typeof(c.proxy) == 'undefined') ? new Ext.data.DirectProxy(Ext.copyTo({}, c, 'paramOrder,paramsAsHash,directFn,api')) : c.proxy,\r
- reader: (typeof(c.reader) == 'undefined' && typeof(c.fields) == 'object') ? new Ext.data.JsonReader(Ext.copyTo({}, c, 'totalProperty,root,idProperty'), c.fields) : c.reader\r
- }));\r
-};\r
-Ext.extend(Ext.data.DirectStore, Ext.data.Store, {});\r
+Ext.data.DirectStore = Ext.extend(Ext.data.Store, {\r
+ constructor : function(config){\r
+ // each transaction upon a singe record will generate a distinct Direct transaction since Direct queues them into one Ajax request.\r
+ var c = Ext.apply({}, {\r
+ batchTransactions: false\r
+ }, config);\r
+ Ext.data.DirectStore.superclass.constructor.call(this, Ext.apply(c, {\r
+ proxy: Ext.isDefined(c.proxy) ? c.proxy : new Ext.data.DirectProxy(Ext.copyTo({}, c, 'paramOrder,paramsAsHash,directFn,api')),\r
+ reader: (!Ext.isDefined(c.reader) && c.fields) ? new Ext.data.JsonReader(Ext.copyTo({}, c, 'totalProperty,root,idProperty'), c.fields) : c.reader\r
+ }));\r
+ }\r
+});\r
Ext.reg('directstore', Ext.data.DirectStore);
</pre> \r
</body>\r