Changeset 8671
- Timestamp:
- 05/21/07 07:17:18 (20 months ago)
- Location:
- dijit/trunk
- Files:
-
- 4 modified
-
base/FormElement.js (modified) (1 diff)
-
form/Button.js (modified) (3 diffs)
-
form/Checkbox.js (modified) (4 diffs)
-
form/_DropDownTextBox.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
dijit/trunk/base/FormElement.js
r8660 r8671 88 88 } 89 89 this.domNode.disabled = this.disabled = disabled; 90 if(this.focusNode){ 91 this.focusNode.disabled = disabled; 92 } 90 93 dijit.util.wai.setAttr(this.focusNode || this.domNode, "waiState", "disabled", disabled); 91 94 }, -
dijit/trunk/form/Button.js
r8668 r8671 48 48 // summary: reset the caption (text) of the button; takes an HTML string 49 49 this.containerNode.innerHTML = this.caption = content; 50 if (dojo.isMozilla){ // Firefox has re-render issues with tables50 if(dojo.isMozilla){ // Firefox has re-render issues with tables 51 51 var oldDisplay = dojo.getComputedStyle(this.domNode).display; 52 52 this.domNode.style.display="none"; … … 54 54 setTimeout(function(){_this.domNode.style.display=oldDisplay;},1); 55 55 } 56 },57 58 _setDisabled: function(/*Boolean*/ disable){59 dojo.forEach(this.domNode.getElementsByTagName('BUTTON'),60 function(button){61 button.disabled = (disable != false);62 }63 );64 dijit.form.Button.superclass._setDisabled.apply(this, arguments);65 56 } 66 57 }); … … 104 95 if(this.disabled){ return; } 105 96 if(e.keyCode == dojo.keys.DOWN_ARROW || (e.currentTarget == this.popupStateNode && (e.keyCode == dojo.keys.SPACE || e.keyCode == dojo.keys.ENTER))){ 106 if (!this._menu || this._menu.domNode.style.display=="none"){97 if(!this._menu || this._menu.domNode.style.display=="none"){ 107 98 this.arrowClick(e); 108 99 } -
dijit/trunk/form/Checkbox.js
r8660 r8671 110 110 111 111 // carve some space in the flow for this dom node 112 if (dojo.isSafari){112 if(dojo.isSafari){ 113 113 // use this hack sparingly (see ticket:2942) 114 114 domNodeStyle.fontFamily = "monospace"; 115 115 var spacer = document.createTextNode("\u00a0\u00a0"); 116 116 this.domNode.appendChild(spacer); 117 } 118 else { 117 }else{ 119 118 domNodeStyle.paddingRight = this.width + "px"; 120 119 } … … 139 138 _setDisabled: function(/*Boolean*/ disabled){ 140 139 // summary: set disabled state of widget. 141 this.domNode.disabled = this.inputNode.disabled = this.disabled = disabled;140 dijit.form.Checkbox.superclass._setDisabled.apply(this,arguments); 142 141 this._updateView(); 143 142 }, … … 161 160 162 161 setValue: function(value){ 163 if (value == null){ value = ""; }162 if(value == null){ value = ""; } 164 163 this.inputNode.value = value; 165 164 dijit.form.Checkbox.superclass.setValue.call(this,value); … … 194 193 var w = awidget || this; 195 194 196 if (w.checked != w.inputNode.checked){195 if(w.checked != w.inputNode.checked){ 197 196 w.checked = w.inputNode.checked; 198 197 w.onChecked(w.checked); -
dijit/trunk/form/_DropDownTextBox.js
r8660 r8671 36 36 }, 37 37 38 enable:function(){39 this.parentClass.enable.apply(this, arguments);40 // not enabled by FormElement41 this.textbox.removeAttribute("disabled");42 },43 44 disable: function(){45 this.parentClass.disable.apply(this, arguments);46 // not disabled by FormElement47 this.textbox.setAttribute("disabled",true);48 },49 50 38 arrowClicked: function(){ 51 39 // summary: callback when arrow is clicked … … 143 131 if(this.id && this.id != ""){ 144 132 var labels = document.getElementsByTagName("label"); 145 if (labels != null && labels.length > 0){133 if(labels != null && labels.length > 0){ 146 134 for(var i=0; i<labels.length; i++){ 147 if (labels[i].htmlFor == this.id){148 if (!this.textbox.id){135 if(labels[i].htmlFor == this.id){ 136 if(!this.textbox.id){ 149 137 this.textbox.id = (this.id + "input"); 150 138 } … … 188 176 this.isShowingNow=true; 189 177 document.body.appendChild(this.domNode); 190 setTimeout( dojo.hitch(this, function(){dijit.util.PopupManager.openAround(widget.textbox, this,{'BL':'TL', 'TL':'BL'}, [0,0]);}), 1);178 setTimeout(dojo.hitch(this, function(){dijit.util.PopupManager.openAround(widget.textbox, this,{'BL':'TL', 'TL':'BL'}, [0,0]);}), 1); 191 179 }, 192 180