Changeset 15163
- Timestamp:
- 09/07/08 19:33:21 (3 months ago)
- Location:
- dijit/trunk
- Files:
-
- 2 modified
-
form/_FormWidget.js (modified) (2 diffs)
-
layout/BorderContainer.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
dijit/trunk/form/_FormWidget.js
r14993 r15163 181 181 // Hover - if the mouse is over the widget 182 182 183 // Get original (non state related, non baseClass related) class specified in template184 if(!("staticClass" in this)){185 this.staticClass = (this.stateNode||this.domNode).className;186 }187 188 183 // Compute new set of classes 189 var classes = this.baseClass.split(" ");184 var newStateClasses = this.baseClass.split(" "); 190 185 191 186 function multiply(modifier){ 192 classes=classes.concat(dojo.map(classes, function(c){ return c+modifier; }), "dijit"+modifier);187 newStateClasses = newStateClasses.concat(dojo.map(newStateClasses, function(c){ return c+modifier; }), "dijit"+modifier); 193 188 } 194 189 … … 218 213 } 219 214 220 (this.stateNode || this.domNode).className = this.staticClass + " " + classes.join(" "); 215 // Remove old state classes and add new ones. 216 // For performance concerns we only write into domNode.className once. 217 var tn = this.stateNode || this.domNode, 218 classHash = {}; // set of all classes (state and otherwise) for node 219 220 dojo.forEach(tn.className.split(" "), function(c){ classHash[c] = true; }); 221 222 if("_stateClasses" in this){ 223 dojo.forEach(this._stateClasses, function(c){ delete classHash[c]; }); 224 } 225 226 dojo.forEach(newStateClasses, function(c){ classHash[c] = true; }); 227 228 var newClasses = []; 229 for(var c in classHash){ 230 newClasses.push(c); 231 } 232 tn.className = newClasses.join(" "); 233 234 this._stateClasses = newStateClasses; 221 235 }, 222 236 -
dijit/trunk/layout/BorderContainer.js
r15113 r15163 309 309 // Nodes in IE don't respond to t/l/b/r, and TEXTAREA doesn't respond in any browser 310 310 var janky = dojo.isIE || dojo.some(this.getChildren(), function(child){ 311 return child.domNode.tagName == "TEXTAREA" ;311 return child.domNode.tagName == "TEXTAREA" || child.domNode.tagName == "INPUT"; 312 312 }); 313 313 if(janky){