3 Added the following features:
4 -----------------------------
6 + Added a "focusmenu" configuration attribute that controls whether or not a
7 Button instance's menu will automatically be focused when made visible.
9 + Added a "lazyloadmenu" configuration attribute that controls the value of
10 the "lazyload" configuration property of a Button's menu.
12 + Added "menuclassname" configuration attribute that defines a CSS class name
13 to be applied to the root HTML element of a button's menu.
16 Fixed the following bugs:
17 -------------------------
19 + Setting the "label" attribute of a Button of type "link" to a string with
20 a "www." prefix will no longer result in the value of the "href" property
21 being used for the "label" in IE.
23 + Disabling a Button when its menu is visible will now result in the menu
26 + Hidden field(s) created by a Button instance are now removed if the
27 submission of its parent form is cancelled.
29 + If a Button instance is preceeded by another enabled HTML submit button
30 (<input type="submit" ...> or <button type="submit" ...>), it will no longer
31 create a hidden field representing its name and value when its parent form
34 + If an HTML form contains a mix of YUI Buttons of type "submit" and standard
35 HTML submit buttons (<input type="submit" ...> or <button type="submit" ...>)
36 its "submit" event will no longer fire twice when it is submitted by the user
37 pressing the enter key while focus inside another HTML form control.
39 + If all Button instances in a form are disabled, the form will no longer be
40 submitted when the user presses the enter key while focused inside another
43 + The first enabled Button instance in a form now correctly adds its name and
44 value to the form's data set when the form is submitted by the user pressing
45 the enter key while focused inside another form control.
47 + Fixed typo in the source file for the ButtonGroup class that was causing the
48 private variable "m_oButtons" to be declared as a global.
50 + Switched to use of the CSS display type "-moz-inline-box" from
51 "-moz-inline-stack" for Gecko-based browsers so that the entire area of a
52 Button instance is clickable when it is rendered inside another inline
55 + Added "yui-button" and "yui-[button type]-button" prefix to CSS classes to
56 sandbox Button styles.
62 + Default value of "type" configuration attribute now "push" (was "button").
64 + Type "menubutton" now "menu."
66 + Type "splitbuton" now "split."
68 + Added "addStateCSSClasses" method.
70 + Added "removeStateCSSClasses" method.
72 + Renamed protected property "_hiddenField" to "_hiddenFields."
74 + Removed protected "submit" event handler named "_onFormSubmit."
76 + Renamed public method "createHiddenField" to "createHiddenFields."
78 + Added new "removeHiddenFields" method.
80 + Renamed static method "YAHOO.widget.Button.onFormKeyDown"
81 to "YAHOO.widget.Button.onFormKeyPress."
83 + Renamed "TAG_NAME" constant (YAHOO.widget.Button.prototype.TAG_NAME and
84 YAHOO.widget.ButtonGroup.prototype.TAG_NAME) to
85 "NODE_NAME" (YAHOO.widget.Button.prototype.NODE_NAME and
86 YAHOO.widget.ButtonGroup.prototype.NODE_NAME).
88 + The "selectedMenuItem" configuration attribute now correctly gets/sets the
89 index of the selected MenuItem instance of the button's menu, rather than a
92 + The "container" configuration attribute is now writeonce
94 + The "menu" configuration attribute is now writeonce
96 + The root element of each button's menu now will have two CSS classes
98 - The CSS class name specified by the "menuclassname" configuration
99 attribute (by default is "yui-button-menu")
100 - A type-specific class name (either "yui-split-button-menu"
101 or "yui-menu-button-menu")
103 + "menu" configuration attribute now supports creation or use of
104 YAHOO.widget.Overlay in addition to previously supported
107 - To create a menu from existing markup using YAHOO.widget.Overlay, pass the
108 id or node reference of the HTML element to be used to create the Overlay
109 as the value of the "menu" configuration attribute.
111 - YAHOO.widget.Overlay instances passed as a value for the "menu"
112 configuration attribute need to be fully rendered.
114 - To create a menu from existing markup using YAHOO.widget.Menu, pass the
115 id or node reference of the HTML element to be used to create the menu
116 as the value of the "menu" configuration attribute and give the
117 HTML element the same class name as specified by
118 YAHOO.widget.Menu.prototype.CSS_CLASS_NAME.
120 - YAHOO.widget.Overlay instances used as a menu are by default not rendered
121 until they are are made visible for the first time. This behavior
122 can be changed so that they are rendered immediately by setting the value
123 of the "lazyloadmenu" configuration attribute to "false."
125 + If you pass an element id for the value of the "menu" configuration
126 attribute, that node is now accessed immediately via the "get" method of the
127 Dom utility (YAHOO.util.Dom) as opposed to the "onContentReady" method of the
128 Event utility (YAHOO.util.Event).
130 + Modified code to support a more generic markup format. Now any number of
131 HTML elements can exist between a Button's root HTML element and its button
132 node (be it an <A> or <BUTTON> element):
134 <ROOT_NODE> ... <BUTTON_NODE /> ... </ROOT_NODE>
136 + A Button can now be initialized using any of the following six HTML patterns:
139 - <BUTTON> TEXT/HTML </BUTTON>
141 - <ROOT_NODE> ... <A> TEXT/HTML </A> ... </ROOT_NODE>
142 - <ROOT_NODE> ... <BUTTON> TEXT/HTML </BUTTON> ... </ROOT_NODE>
143 - <ROOT_NODE> ... <INPUT /> ... </ROOT_NODE>
145 + The id of a Button instance can now match that of its source element.
149 1) All Buttons have a "yui-" prefix as opposed to "yui":
152 -------------------------
153 .yuibutton | .yui-button
156 2) Each Button type has its own class name with a "yui-" prefix and
157 "-button" suffix IN ADDITION TO the default "yui-button" class name:
160 ------------------------------------------
161 .yuibutton.splitbutton | .yui-split-button
162 .yuibutton.menubutton | .yui-menu-button
164 * Allows for the definition of generic styles that apply to all buttons,
165 while providing a means for uniquely styling buttons of a specific type.
168 3) For states that are common to all Buttons, two classes are applied: a
169 generic class name (i.e. yui-button-[state]) and a type-specific state class
170 name (yui-[type]-button-[state]):
173 -------------------------------------------
174 .yuibutton.focus | .yui-button-focus
175 .yuibutton.radio.focus | .yui-radio-button-focus
177 * States common to all Button types are:
183 ** Allows for the definition of generic styles that apply to all states of
184 all buttons, while providing a means for uniquely styling states for
185 buttons of a specific type.
188 4) Buttons of type "radio" and "checkbox" have two classes applied to
189 represent their "checked" state: a generic class name
190 (i.e. yui-button-checked) and a type-specific class
191 name (yui-[type]-button-checked):
194 -------------------------------------------
195 .yuibutton.checked | .yui-button-checked
196 .yuibutton.radio.checked | .yui-radio-button-checked
197 .yuibutton.checkbox.checked | .yui-checkbox-button-checked
199 ** This allows for the definition of a universal style for all Buttons that
200 have a "checked" state or the ability to define a type-specific style for
204 5) States that are specific to a particular type only get a type-specific
205 state class name. Currently this only applies to the "splitbutton" type:
208 -------------------------------------------
209 .yuibutton.activeoption | .yui-split-button-activeoption
212 6) The "ie6" class name is removed.
215 *** Version 2.2.2 ***
220 *** Version 2.2.1 ***
222 Added the following features:
223 -----------------------------
225 + Added "getHiddenField" method to YAHOO.widget.Button.
228 Fixed the following bugs:
229 -------------------------
231 + Removed built-in use of the Event utility's "onAvailable" method from the
232 constructor of Button and ButtonGroup as it was preventing the addition of
233 event listeners on instances created from existing markup. Going forward
234 Button and ButtonGroup instances created from existing markup can only be
235 instantiated once their source HTML element is available in the DOM. The
236 Button examples illustrate how this can be accomplished.
238 + Modified code so that disabled Button instances no longer fire DOM events.
240 + Pressing the enter key while focused on a form field whose parent form
241 contains a Button instance of type "submit" will now automatically submit
242 the form using the first Button instance of type "submit".
244 + Clicking a Button instance of type="submit" will now cause the Button's
245 parent form's "submit" event to fire.
247 + Modified Button CSS so that the filter used to apply alpha transparency to
248 a Button's background PNG is only used by IE 6. The previous code was
249 enabling IE's Alpha image loader for IE 7 in Quirks mode.
251 + Fixed documentation error for "getForm" method.
257 + Made the "submitForm" method of YAHOO.widget.Button public (was
258 previously protected).
260 + Removed "init" event and corresponding "oninit" configuration attribute
261 from YAHOO.widget.Button and YAHOO.widget.ButtonGroup.
263 + Added the CSS class "ie6" to button.css. This classname is append to root
264 DOM element of Button instances created with IE 6. By default this class
265 is used to apply a filter that gives alpha transparency to a Button's
270 *** Version 2.2.0 ***
272 * Button Control introduced