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.

108 lines
3.2 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.form.DisplayField"></div>/**
  16. * @class Ext.form.DisplayField
  17. * @extends Ext.form.Field
  18. * A display-only text field which is not validated and not submitted.
  19. * @constructor
  20. * Creates a new DisplayField.
  21. * @param {Object} config Configuration options
  22. * @xtype displayfield
  23. */
  24. Ext.form.DisplayField = Ext.extend(Ext.form.Field, {
  25. validationEvent : false,
  26. validateOnBlur : false,
  27. defaultAutoCreate : {tag: "div"},
  28. <div id="cfg-Ext.form.DisplayField-fieldClass"></div>/**
  29. * @cfg {String} fieldClass The default CSS class for the field (defaults to <tt>"x-form-display-field"</tt>)
  30. */
  31. fieldClass : "x-form-display-field",
  32. <div id="cfg-Ext.form.DisplayField-htmlEncode"></div>/**
  33. * @cfg {Boolean} htmlEncode <tt>false</tt> to skip HTML-encoding the text when rendering it (defaults to
  34. * <tt>false</tt>). This might be useful if you want to include tags in the field's innerHTML rather than
  35. * rendering them as string literals per the default logic.
  36. */
  37. htmlEncode: false,
  38. // private
  39. initEvents : Ext.emptyFn,
  40. isValid : function(){
  41. return true;
  42. },
  43. validate : function(){
  44. return true;
  45. },
  46. getRawValue : function(){
  47. var v = this.rendered ? this.el.dom.innerHTML : Ext.value(this.value, '');
  48. if(v === this.emptyText){
  49. v = '';
  50. }
  51. if(this.htmlEncode){
  52. v = Ext.util.Format.htmlDecode(v);
  53. }
  54. return v;
  55. },
  56. getValue : function(){
  57. return this.getRawValue();
  58. },
  59. getName: function() {
  60. return this.name;
  61. },
  62. setRawValue : function(v){
  63. if(this.htmlEncode){
  64. v = Ext.util.Format.htmlEncode(v);
  65. }
  66. return this.rendered ? (this.el.dom.innerHTML = (Ext.isEmpty(v) ? '' : v)) : (this.value = v);
  67. },
  68. setValue : function(v){
  69. this.setRawValue(v);
  70. return this;
  71. }
  72. <div id="cfg-Ext.form.DisplayField-inputType"></div>/**
  73. * @cfg {String} inputType
  74. * @hide
  75. */
  76. <div id="cfg-Ext.form.DisplayField-disabled"></div>/**
  77. * @cfg {Boolean} disabled
  78. * @hide
  79. */
  80. <div id="cfg-Ext.form.DisplayField-readOnly"></div>/**
  81. * @cfg {Boolean} readOnly
  82. * @hide
  83. */
  84. <div id="cfg-Ext.form.DisplayField-validateOnBlur"></div>/**
  85. * @cfg {Boolean} validateOnBlur
  86. * @hide
  87. */
  88. <div id="cfg-Ext.form.DisplayField-validationDelay"></div>/**
  89. * @cfg {Number} validationDelay
  90. * @hide
  91. */
  92. <div id="cfg-Ext.form.DisplayField-validationEvent"></div>/**
  93. * @cfg {String/Boolean} validationEvent
  94. * @hide
  95. */
  96. });
  97. Ext.reg('displayfield', Ext.form.DisplayField);
  98. </pre>
  99. </body>
  100. </html>