Web Interface For Lite Argus Control modules
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.

78 lines
2.7 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  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.state.Manager"></div>/**
  16. * @class Ext.state.Manager
  17. * This is the global state manager. By default all components that are "state aware" check this class
  18. * for state information if you don't pass them a custom state provider. In order for this class
  19. * to be useful, it must be initialized with a provider when your application initializes. Example usage:
  20. <pre><code>
  21. // in your initialization function
  22. init : function(){
  23. Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
  24. var win = new Window(...);
  25. win.restoreState();
  26. }
  27. </code></pre>
  28. * @singleton
  29. */
  30. Ext.state.Manager = function(){
  31. var provider = new Ext.state.Provider();
  32. return {
  33. <div id="method-Ext.state.Manager-setProvider"></div>/**
  34. * Configures the default state provider for your application
  35. * @param {Provider} stateProvider The state provider to set
  36. */
  37. setProvider : function(stateProvider){
  38. provider = stateProvider;
  39. },
  40. <div id="method-Ext.state.Manager-get"></div>/**
  41. * Returns the current value for a key
  42. * @param {String} name The key name
  43. * @param {Mixed} defaultValue The default value to return if the key lookup does not match
  44. * @return {Mixed} The state data
  45. */
  46. get : function(key, defaultValue){
  47. return provider.get(key, defaultValue);
  48. },
  49. <div id="method-Ext.state.Manager-set"></div>/**
  50. * Sets the value for a key
  51. * @param {String} name The key name
  52. * @param {Mixed} value The state data
  53. */
  54. set : function(key, value){
  55. provider.set(key, value);
  56. },
  57. <div id="method-Ext.state.Manager-clear"></div>/**
  58. * Clears a value from the state
  59. * @param {String} name The key name
  60. */
  61. clear : function(key){
  62. provider.clear(key);
  63. },
  64. <div id="method-Ext.state.Manager-getProvider"></div>/**
  65. * Gets the currently configured state provider
  66. * @return {Provider} The state provider
  67. */
  68. getProvider : function(){
  69. return provider;
  70. }
  71. };
  72. }();</pre>
  73. </body>
  74. </html>