X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/c930e9176a5a85509c5b0230e2bff5c22a591432..b37ceabb82336ee82757cd32efe353cfab8ec267:/docs/source/Checkbox.html diff --git a/docs/source/Checkbox.html b/docs/source/Checkbox.html index 1bb0f1b9..9c6f31f3 100644 --- a/docs/source/Checkbox.html +++ b/docs/source/Checkbox.html @@ -1,11 +1,18 @@ - - - The source code - - - - -
/** + + + + The source code + + + + +
/*!
+ * Ext JS Library 3.2.2
+ * Copyright(c) 2006-2010 Ext JS, Inc.
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+
/** * @class Ext.form.Checkbox * @extends Ext.form.Field * Single checkbox field. Can be used as a direct replacement for traditional checkbox fields. @@ -27,6 +34,10 @@ Ext.form.Checkbox = Ext.extend(Ext.form.Field, { * @cfg {Boolean} checked true if the checkbox should render initially checked (defaults to false) */ checked : false, +
/** + * @cfg {String} boxLabel The text that appears beside the checkbox + */ + boxLabel: ' ',
/** * @cfg {String/Object} autoCreate A DomHelper element spec, or true for a default element spec (defaults to * {tag: 'input', type: 'checkbox', autocomplete: 'off'}) @@ -39,7 +50,7 @@ Ext.form.Checkbox = Ext.extend(Ext.form.Field, { * @cfg {String} inputValue The value that should go into the generated input element's value attribute */
/** - * @cfg {Function} handler A function called when the {@link #checked} value changes (can be used instead of + * @cfg {Function} handler A function called when the {@link #checked} value changes (can be used instead of * handling the check event). The handler is passed the following parameters: *
    *
  • checkbox : Ext.form.Checkbox
    The Checkbox being toggled.
  • @@ -53,7 +64,7 @@ Ext.form.Checkbox = Ext.extend(Ext.form.Field, { // private actionMode : 'wrap', - + // private initComponent : function(){ Ext.form.Checkbox.superclass.initComponent.call(this); @@ -79,18 +90,11 @@ Ext.form.Checkbox = Ext.extend(Ext.form.Field, { // private initEvents : function(){ Ext.form.Checkbox.superclass.initEvents.call(this); - this.mon(this.el, 'click', this.onClick, this); - this.mon(this.el, 'change', this.onClick, this); - }, - - // private - getResizeEl : function(){ - return this.wrap; - }, - - // private - getPositionEl : function(){ - return this.wrap; + this.mon(this.el, { + scope: this, + click: this.onClick, + change: this.onClick + }); },
    /** @@ -121,6 +125,11 @@ Ext.form.Checkbox = Ext.extend(Ext.form.Field, { }else{ this.checked = this.el.dom.checked; } + // Need to repaint for IE, otherwise positioning is broken + if (Ext.isIE && !Ext.isStrict) { + this.wrap.repaint(); + } + this.resizeEl = this.positionEl = this.wrap; }, // private @@ -142,7 +151,7 @@ Ext.form.Checkbox = Ext.extend(Ext.form.Field, { if(this.rendered){ return this.el.dom.checked; } - return false; + return this.checked; }, // private @@ -176,6 +185,6 @@ Ext.form.Checkbox = Ext.extend(Ext.form.Field, { } }); Ext.reg('checkbox', Ext.form.Checkbox); -
- +
+ \ No newline at end of file