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.

71 lines
1.9 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. Ext.ns('Ext.ux.form');
  16. <div id="cls-Ext.ux.form.SpinnerField"></div>/**
  17. * @class Ext.ux.form.SpinnerField
  18. * @extends Ext.form.NumberField
  19. * Creates a field utilizing Ext.ux.Spinner
  20. * @xtype spinnerfield
  21. */
  22. Ext.ux.form.SpinnerField = Ext.extend(Ext.form.NumberField, {
  23. actionMode: 'wrap',
  24. deferHeight: true,
  25. autoSize: Ext.emptyFn,
  26. onBlur: Ext.emptyFn,
  27. adjustSize: Ext.BoxComponent.prototype.adjustSize,
  28. constructor: function(config) {
  29. var spinnerConfig = Ext.copyTo({}, config, 'incrementValue,alternateIncrementValue,accelerate,defaultValue,triggerClass,splitterClass');
  30. var spl = this.spinner = new Ext.ux.Spinner(spinnerConfig);
  31. var plugins = config.plugins
  32. ? (Ext.isArray(config.plugins)
  33. ? config.plugins.push(spl)
  34. : [config.plugins, spl])
  35. : spl;
  36. Ext.ux.form.SpinnerField.superclass.constructor.call(this, Ext.apply(config, {plugins: plugins}));
  37. },
  38. // private
  39. getResizeEl: function(){
  40. return this.wrap;
  41. },
  42. // private
  43. getPositionEl: function(){
  44. return this.wrap;
  45. },
  46. // private
  47. alignErrorIcon: function(){
  48. if (this.wrap) {
  49. this.errorIcon.alignTo(this.wrap, 'tl-tr', [2, 0]);
  50. }
  51. },
  52. validateBlur: function(){
  53. return true;
  54. }
  55. });
  56. Ext.reg('spinnerfield', Ext.ux.form.SpinnerField);
  57. //backwards compat
  58. Ext.form.SpinnerField = Ext.ux.form.SpinnerField;
  59. </pre>
  60. </body>
  61. </html>