📄 readme
字号:
Container Release Notes*** version 2.3.0 ***Fixed the following bugs:-------------------------+ Improved creation of the <iframe> element used to monitor changes to the browser's font size so that: - Safari's status bar no longer displays a "Loading..." message after the page has loaded. - Firefox no longer reports duplicate cookie information. - The browser scrollbars no longer flash on and off in Firefox.+ It is now possible to set the "button" configuration property of a YAHOO.widget.Dialog instance after it has be rendered.+ Form elements appended to a YAHOO.widget.Dialog instance via the "setBody" method are now automatically registered using the "registerForm" method.+ The "focusFirst" method of YAHOO.widget.Dialog will no longer result in a JavaScript error in IE if the first element in the Dialog instance's form is a radio button.+ YAHOO.widget.Panel instances whose "draggable" property is set to "true" and "width" property is set to "auto" are now able to be dragged in IE 6 (Quirks and Strict Mode) and IE 7 Quirks Mode.+ Updated focus methods of YAHOO.widget.Dialog to prevent JavaScript errors that result from trying to set focus to elements that hidden or disabled.+ Pressing the enter key will no longer result in a YAHOO.widget.Dialog instance's "validate" method being called twice.+ Pressing the enter key while focused on a form field inside a Dialog will no longer trigger the "click" event handler defined by the Dialog's default button in IE and Firefox.+ Pressing the enter key when focused on a form field inside a YAHOO.widget.Dialog instance with no buttons created via its "buttons" configuration property will no longer result in a JavaScript error.+ Aqua scrollbars will no longer bleed through Container widgets in Firefox for Mac OS X.+ The "width" and "height" configuration properties of YAHOO.widget.Overlay now supersede the "fixedcenter" and "context" configuration properties to ensure correct positioning of Overlay instances using the "fixedcenter" and "context" configuration properties.+ Calling the "destroy" method on a YAHOO.widget.Overlay instance no longer results in a JavaScript error on the subsequent focus of another Overlay instance.+ YAHOO.widget.Tooltip instances without a value specified for the "width" configuration property will be rendered at a width equal to the offsetWidth of their root <DIV/> element to prevent their width from being clipped or constrained by their parent HTML element.Changes:--------+ Rendering of YAHOO.widget.Tooltip instances is now deferred using the "onDOMReady" event handler of YAHOO.util.Event rather than waiting until the "load" event of the Tooltip's parent window fires.+ Deprecated "browser" property of YAHOO.widget.Module in favor of YAHOO.env.ua.+ The "moveEvent" of a YAHOO.widget.Panel instance now also fires with the "endDrag" event of the its YAHOO.util.DD instance.+ Updated modal functionality of YAHOO.widget.Panel: - The creation of a Panel instance's modality mask is now deferred until it is initially made visible. - Showing a modal Panel instance will now result in the Panel and its associated modality mask element having a higher z-index than all other YAHOO.widget.Overlay instances and Overlay subclasses.+ Updated the "underlay" configuration property of YAHOO.widget.Panel: - The creation of the underlay element is deferred until the Panel instance is initially made visible. - For Gecko-based browsers on Mac OS X the underlay elment is always created as it is used as a shim to prevent Aqua scrollbars below a Panel instance from poking through it. - For IE 7 (Quirks Mode) and IE 6 (Quirks Mode and Standard Mode) the underlay element is resized in response to a change to a Panel instance's "width" or "height" configuration properties, a change to the browser's font size or the firing of the contentChangedEvent (triggered by use of the "setHeader," "appendToHeader," "setBody," "appendToBody," "setFooter," or "appendToFooter" methods). + Updated the "iframe" configuration property of YAHOO.widget.Overlay: - The creation of the <iframe> shim element is deferred until the Overlay instance is initially made visible. - The <iframe> shim element is resized when a change to an Overlay instance's content is made at runtime via the "setHeader," "appendToHeader," "setBody," "appendToBody," "setFooter," or "appendToFooter" methods.+ Updated the "buttons" configuration property of YAHOO.widget.Dialog: - YAHOO.widget.Button is now an optional dependancy, and if included, each button in a Dialog will be an instance of Button. - The "text" property of each button now accepts HTML - The "handler" property of each button can now be set to: + A reference to a function that should fire when the button is clicked. (In this case scope of this function is always its Dialog instance.) + An object literal representing the code to be executed when the button is clicked. The format is: { fn: Function (The handler to call when the event fires.), obj: Object (An object to pass back to the handler.), scope: Object (The object to use for the scope of the handler.) } Added the following features:-----------------------------+ Added ability for YAHOO.widget.Tooltip instances to have shadow: - The shadow for a Tooltip is implemented by appending a new element as the last child of its root <DIV/> element: <DIV class="yui-tt"> <DIV class="bd"> ... </DIV> <DIV class="yui-tt-shadow"/> </DIV> - The code that creates the shadow element resides inside the Tooltip's public "onRender" prototype method. To disable the creation of a Tooltip's shadow override the prototype of the "onRender" method: YAHOO.widget.Tooltip.prototype.onRender = function () {}; - The actual creation of the shadow element is deferred until the Tooltip is made visible for the first time. - A Tooltip's shadow element can be styled via two CSS classes: + "yui-tt-shadow" - Applied to the shadow element when it is created. + "yui-tt-shadow-visible" - Applied to the shadow element when the Tooltip is visible; it is removed the Tooltip is hidden. - The shadow element is only styled when using the new "Sam" skin, for the previous default skin its "display" property is set to "none."+ Prototype of all classes (Module, Overlay, Panel, Dialog, SimpleDialog, Tooltip, Config, and ContainerEffect) are augmented with YAHOO.util.EventProvider, facilitating subscribing to an instance's Custom Events by name via a "subscribe" method that is a direct member of the class. For example: var oOverlay = new YAHOO.widget.Overlay("myoverlay"); oOverlay.subscribe("show", onShow);+ Added a new "bringToTop" method to YAHOO.widget.Overlay that places the Overlay on top of all other Overlay instances.+ Added a new "bringToTop" method to YAHOO.widget.OverlayManager that places the specified Overlay instance on top of all other Overlay instances. This method is called on each Overlay instance that is registered with an OverlayManager instance.+ Dialog instances are now able to upload files should the Dialog instance's form contain <input type="file"/> elements. PLEASE NOTE: If a Dialog instance will be handling asyncronous file uploads, its "callback" property will need to be setup with an "upload" handler rather than the standard "success" and, or "failure" handlers. For more information, see the Connection Manager documenation on file uploads: http://developer.yahoo.com/yui/connection/#file+ Added a new "getButtons" method to YAHOO.widget.Dialog that returns an array containing each of the Dialog's buttons; by default an array of HTML <BUTTON> elements. If the Dialog's buttons were created using the YAHOO.widget.Button class (via the inclusion of the optional Button dependancy on the page), an array of YAHOO.widget.Button instances is returned.+ Added a "destroy" method to YAHOO.util.Config that sets all properties to null, unsubscribes all listeners from each property's change event and all listeners from the configChangedEvent. The "destroy" method of YAHOO.widget.Module now automatically calls the "destroy" method of its configuation object.+ Added a "IFRAME_OFFSET" constant to YAHOO.widget.Overlay that controls how much the <iframe> shim should be offset from each side of an Overlay instance.+ Added a new "syncIframe" method to YAHOO.widget.Overlay that syncronizes the size and position of the <iframe> shim to that of the Overlay.+ Added a "ICON_CSS_CLASSNAME" constant to YAHOO.widget.SimpleDialog that represents the name of the CSS class applied to the element created by the "icon" configuration property. Known Issues------------+ "Sam" skin Panel missing left and right borders when declared with a height --------------------------------------------------------------------------- If the height of a Panel instance exceeds the total height of its header, body and footer elements, the space not filled with content will lack a left and right border. Therefore, to set a Panel instance to a fixed height when using the "Sam" skin, apply the desired height to the body element, taking into account the height of the header and footer elements. To set the height of a Panel instance's body via CSS: #mypanel .bd { height: 100px; } Or via JavaScript: oMyPanel.body.style.height = "100px";+ Elements with scrollbars poke through Overlay instances floating above them --------------------------------------------------------------------------- There is a bug in Gecko-based browsers for Mac OS X where an element's scrollbars will poke through absolutely positioned elements floating above them. To fix this problem the "overflow" property of an Overlay instance's root element is toggled between "hidden" and "auto" (through the application and removal of the "hide-scrollbars" and "show-scrollbars" CSS classes) as its "visibility" configuration property is toggled between "false" and "true." PLEASE NOTE: 1) The "hide-scrollbars" and "show-scrollbars" CSS classes classes are applied only for Gecko on Mac OS X and are added/removed to/from the Overlay's root HTML element (DIV) via the "hideMacGeckoScrollbars" and "showMacGeckoScrollbars" methods of YAHOO.widget.Overlay. 2) For Panel (and its subclasses) it is the underlay element, not the root element, whose "overflow" property is toggled between "hidden" and "auto." The underlay element therefore acts as a shim to correct the scrollbar problem. 3) For Tooltip instances using the "Sam" skin it is the shadow element, not the root element, whose "overflow" property is toggled between "hidden" and "auto." The shadow element therefore acts as a shim to correct the scrollbar problem. 4) Once the fix is applied the bug will reappear if the window loses focus. This can be remedied via Javascript by hiding and showing the Overlay instance when the window receives focus: YAHOO.util.Event.on(window, "focus", function () { oMyOverlay.hide(); oMyOverlay.show(); }); ** For more information see https://bugzilla.mozilla.org/show_bug.cgi?id=187435+ Scrollbars remain visible after an Overlay is hidden ---------------------------------------------------- There is a bug in Gecko-based browsers for Mac OS X where an element's scrollbars and the scrollbars of its child nodes remain visible when its "visibility" property property is set to "hidden." To fix this problem, the "overflow" property of an Overlay instance's root element and child nodes is toggled between "hidden" and "auto" (through the application and removal of the "hide-scrollbars" and "show-scrollbars" CSS classes) as its "visibility" configuration property is toggled between "false" and "true." PLEASE NOTE: 1) The "hide-scrollbars" and "show-scrollbars" CSS classes classes are applied only for Gecko on Mac OS X and are added/removed to/from the Overlay's root HTML element (DIV) via the "hideMacGeckoScrollbars" and "showMacGeckoScrollbars" methods of YAHOO.widget.Overlay. 2) There may be instances where the CSS for a web page or application contains style rules whose specificity override the rules implemented by the Container CSS files to fix this bug. In such cases, is necessary to leverage the provided "hide-scrollbars" and "show-scrollbars" classes to write custom style rules to guard against this bug. For example: To fix the scrollbars issue for an Overlay instance with an id of "myoverlay" whose body element has scrollbars applied by default: #myoverlay .bd { height: 100px; /* Apply scrollbars for all browsers. */ overflow: auto; } #myoverlay.hide-scrollbars .bd { /* Hide scrollbars by default for Gecko on OS X */ overflow: hidden; } #myoverlay.show-scrollbars .bd { /* Show scrollbars for Gecko on OS X when the Overlay is visible */ overflow: auto; } To fix the scrollbars issue for a Panel instance with an id of "mypanel" whose body element has scrollbars applied by default: #mypanel .bd { height: 100px; /* Apply scrollbars for all browsers. */ overflow: auto; } .yui-panel-container.hide-scrollbars #mypanel .bd { /* Hide scrollbars by default for Gecko on OS X */ overflow: hidden; } .yui-panel-container.show-scrollbars #mypanel .bd { /* Show scrollbars for Gecko on OS X when the Panel is visible */ overflow: auto; }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -