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>
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
15 Ext.ns('Ext.ux.form');
17 <div id="cls-Ext.ux.form.SpinnerField"></div>/**
18 * @class Ext.ux.form.SpinnerField
19 * @extends Ext.form.NumberField
20 * Creates a field utilizing Ext.ux.Spinner
23 Ext.ux.form.SpinnerField = Ext.extend(Ext.form.NumberField, {
26 autoSize: Ext.emptyFn,
28 adjustSize: Ext.BoxComponent.prototype.adjustSize,
30 constructor: function(config) {
31 var spinnerConfig = Ext.copyTo({}, config, 'incrementValue,alternateIncrementValue,accelerate,defaultValue,triggerClass,splitterClass');
33 var spl = this.spinner = new Ext.ux.Spinner(spinnerConfig);
35 var plugins = config.plugins
36 ? (Ext.isArray(config.plugins)
37 ? config.plugins.push(spl)
38 : [config.plugins, spl])
41 Ext.ux.form.SpinnerField.superclass.constructor.call(this, Ext.apply(config, {plugins: plugins}));
45 getResizeEl: function(){
50 getPositionEl: function(){
55 alignErrorIcon: function(){
57 this.errorIcon.alignTo(this.wrap, 'tl-tr', [2, 0]);
61 validateBlur: function(){
66 Ext.reg('spinnerfield', Ext.ux.form.SpinnerField);
69 Ext.form.SpinnerField = Ext.ux.form.SpinnerField;