dojo.provide("dijit.form.Select"); dojo.require("dijit.form._FormSelectWidget"); dojo.require("dijit._HasDropDown"); dojo.require("dijit.Menu"); dojo.require("dijit.Tooltip"); dojo.requireLocalization("dijit.form", "validate"); dojo.declare("dijit.form._SelectMenu", dijit.Menu, { // summary: // An internally-used menu for dropdown that allows us a vertical scrollbar buildRendering: function(){ // summary: // Stub in our own changes, so that our domNode is not a table // otherwise, we won't respond correctly to heights/overflows this.inherited(arguments); var o = (this.menuTableNode = this.domNode); var n = (this.domNode = dojo.create("div", {style: {overflowX: "hidden", overflowY: "scroll"}})); if(o.parentNode){ o.parentNode.replaceChild(n, o); } dojo.removeClass(o, "dijitMenuTable"); n.className = o.className + " dijitSelectMenu"; o.className = "dijitReset dijitMenuTable"; dijit.setWaiRole(o,"listbox"); dijit.setWaiRole(n,"presentation"); n.appendChild(o); }, resize: function(/*Object*/ mb){ // summary: // Overridden so that we are able to handle resizing our // internal widget. Note that this is not a "full" resize // implementation - it only works correctly if you pass it a // marginBox. // // mb: Object // The margin box to set this dropdown to. if(mb){ dojo.marginBox(this.domNode, mb); if("w" in mb){ // We've explicitly set the wrapper
's width, so set width to match. // 100% is safer than a pixel value because there may be a scroll bar with // browser/OS specific width. this.menuTableNode.style.width = "100%"; } } } }); dojo.declare("dijit.form.Select", [dijit.form._FormSelectWidget, dijit._HasDropDown], { // summary: // This is a "styleable" select box - it is basically a DropDownButton which // can take a