Web UI for ARGUS server
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
2.8 KiB

6 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  4. <title>The source code</title>
  5. <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
  6. <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
  7. </head>
  8. <body onload="prettyPrint();">
  9. <pre class="prettyprint lang-js">/*!
  10. * Ext JS Library 3.3.1
  11. * Copyright(c) 2006-2010 Sencha Inc.
  12. * licensing@sencha.com
  13. * http://www.sencha.com/license
  14. */
  15. <div id="cls-Ext.data.DirectStore"></div>/**
  16. * @class Ext.data.DirectStore
  17. * @extends Ext.data.Store
  18. * <p>Small helper class to create an {@link Ext.data.Store} configured with an
  19. * {@link Ext.data.DirectProxy} and {@link Ext.data.JsonReader} to make interacting
  20. * with an {@link Ext.Direct} Server-side {@link Ext.direct.Provider Provider} easier.
  21. * To create a different proxy/reader combination create a basic {@link Ext.data.Store}
  22. * configured as needed.</p>
  23. *
  24. * <p><b>*Note:</b> Although they are not listed, this class inherits all of the config options of:</p>
  25. * <div><ul class="mdetail-params">
  26. * <li><b>{@link Ext.data.Store Store}</b></li>
  27. * <div class="sub-desc"><ul class="mdetail-params">
  28. *
  29. * </ul></div>
  30. * <li><b>{@link Ext.data.JsonReader JsonReader}</b></li>
  31. * <div class="sub-desc"><ul class="mdetail-params">
  32. * <li><tt><b>{@link Ext.data.JsonReader#root root}</b></tt></li>
  33. * <li><tt><b>{@link Ext.data.JsonReader#idProperty idProperty}</b></tt></li>
  34. * <li><tt><b>{@link Ext.data.JsonReader#totalProperty totalProperty}</b></tt></li>
  35. * </ul></div>
  36. *
  37. * <li><b>{@link Ext.data.DirectProxy DirectProxy}</b></li>
  38. * <div class="sub-desc"><ul class="mdetail-params">
  39. * <li><tt><b>{@link Ext.data.DirectProxy#directFn directFn}</b></tt></li>
  40. * <li><tt><b>{@link Ext.data.DirectProxy#paramOrder paramOrder}</b></tt></li>
  41. * <li><tt><b>{@link Ext.data.DirectProxy#paramsAsHash paramsAsHash}</b></tt></li>
  42. * </ul></div>
  43. * </ul></div>
  44. *
  45. * @xtype directstore
  46. *
  47. * @constructor
  48. * @param {Object} config
  49. */
  50. Ext.data.DirectStore = Ext.extend(Ext.data.Store, {
  51. constructor : function(config){
  52. // each transaction upon a singe record will generate a distinct Direct transaction since Direct queues them into one Ajax request.
  53. var c = Ext.apply({}, {
  54. batchTransactions: false
  55. }, config);
  56. Ext.data.DirectStore.superclass.constructor.call(this, Ext.apply(c, {
  57. proxy: Ext.isDefined(c.proxy) ? c.proxy : new Ext.data.DirectProxy(Ext.copyTo({}, c, 'paramOrder,paramsAsHash,directFn,api')),
  58. reader: (!Ext.isDefined(c.reader) && c.fields) ? new Ext.data.JsonReader(Ext.copyTo({}, c, 'totalProperty,root,idProperty'), c.fields) : c.reader
  59. }));
  60. }
  61. });
  62. Ext.reg('directstore', Ext.data.DirectStore);
  63. </pre>
  64. </body>
  65. </html>