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.

81 lines
2.7 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.StoreMgr"></div>/**
  16. * @class Ext.StoreMgr
  17. * @extends Ext.util.MixedCollection
  18. * The default global group of stores.
  19. * @singleton
  20. */
  21. Ext.StoreMgr = Ext.apply(new Ext.util.MixedCollection(), {
  22. <div id="cfg-Ext.StoreMgr-listeners"></div>/**
  23. * @cfg {Object} listeners @hide
  24. */
  25. <div id="method-Ext.StoreMgr-register"></div>/**
  26. * Registers one or more Stores with the StoreMgr. You do not normally need to register stores
  27. * manually. Any store initialized with a {@link Ext.data.Store#storeId} will be auto-registered.
  28. * @param {Ext.data.Store} store1 A Store instance
  29. * @param {Ext.data.Store} store2 (optional)
  30. * @param {Ext.data.Store} etc... (optional)
  31. */
  32. register : function(){
  33. for(var i = 0, s; (s = arguments[i]); i++){
  34. this.add(s);
  35. }
  36. },
  37. <div id="method-Ext.StoreMgr-unregister"></div>/**
  38. * Unregisters one or more Stores with the StoreMgr
  39. * @param {String/Object} id1 The id of the Store, or a Store instance
  40. * @param {String/Object} id2 (optional)
  41. * @param {String/Object} etc... (optional)
  42. */
  43. unregister : function(){
  44. for(var i = 0, s; (s = arguments[i]); i++){
  45. this.remove(this.lookup(s));
  46. }
  47. },
  48. <div id="method-Ext.StoreMgr-lookup"></div>/**
  49. * Gets a registered Store by id
  50. * @param {String/Object} id The id of the Store, or a Store instance
  51. * @return {Ext.data.Store}
  52. */
  53. lookup : function(id){
  54. if(Ext.isArray(id)){
  55. var fields = ['field1'], expand = !Ext.isArray(id[0]);
  56. if(!expand){
  57. for(var i = 2, len = id[0].length; i <= len; ++i){
  58. fields.push('field' + i);
  59. }
  60. }
  61. return new Ext.data.ArrayStore({
  62. fields: fields,
  63. data: id,
  64. expandData: expand,
  65. autoDestroy: true,
  66. autoCreated: true
  67. });
  68. }
  69. return Ext.isObject(id) ? (id.events ? id : Ext.create(id, 'store')) : this.get(id);
  70. },
  71. // getKey implementation for MixedCollection
  72. getKey : function(o){
  73. return o.storeId;
  74. }
  75. });</pre>
  76. </body>
  77. </html>