Widget Buttons Change History
3.18.1
- No changes.
3.18.0
- No changes.
3.17.2
- No changes.
3.17.1
- No changes.
3.17.0
- No changes.
3.16.0
- No changes.
3.15.0
- No changes.
3.14.1
- No changes.
3.14.0
- No changes.
3.13.0
- No changes.
3.12.0
- No changes.
3.11.0
-
Moved implementation code from the Constructor to the
initializerto account for Base order of operation changes in this release.This is one of the older extensions which needed to be upgraded after
initializersupport was added for extensions.This has no end user impact.
3.10.3
- No changes.
3.10.2
- No changes.
3.10.1
- No changes.
3.10.0
- No changes.
3.9.1
- No changes.
3.9.0
- No changes.
3.8.1
- No changes.
3.8.0
- No changes.
3.7.3
- Fixed bug with a widget’s
defaultButtonchanging by binding to thedefaultButtonChangeevent in WidgetButtons’initializer().
3.7.2
- No changes.
3.7.1
- No changes.
3.7.0
- No changes.
3.6.0
- No changes.
3.5.1
-
Fixed issue with
addButton()receiving anindexargument which was too large or negative, both of which are okay because this value is passed to the Arraysplice()method. Theindexproperty on thebuttonsChangeevent facade is now always the actual index at which the new button exists. [Ticket #253219] -
Fixed issue with properly handling
Y.Nodeinstances from other YUI sandboxes. [Ticket #2532207]
3.5.0
-
[!] WidgetButtons has been completely rewritten, back-compat for common usage has been maintained. The new version is much more robust. [Tickets #2531366, #2531624, #2531043]
-
[!] The
buttonsattribute is handled in an extremely flexible manner. It supports being a single Array, or an Object of Arrays keyed to a particular section.The
buttonscollection will be normalized into an Object which contains an Array ofY.Nodes for everyWidgetStdModsection (header, body, footer) which has one or more buttons. The structure will end up looking like this:{ header: [...], footer: [...] }A button can be specified as a Y.Node, config Object, or String name for a predefined button on the
BUTTONSprototype property. When a config Object is provided, it will be merged with any defaults provided by a button with the samenamedefined on theBUTTONSproperty. [Ticket #2531365] -
[!] All button nodes have the
Y.Plugin.Buttonplugin applied. -
[!] The HTML structure for buttons has been optimized to:
<span class="yui3-widget-butons> <button class="yui3-button">Foo</button> </span>The above structure will appear in each
WidgetStdModsection (header/body/footer) which contains buttons. [Ticket #2531367] -
Fixed issue with multiplying subscriptions to
buttonsChangeevent. The event handler was itself subscripting again to the event causing an ever-increasing number of subscriptions all doing the same work. Now WidgetButtons will always clean up its event subscriptions. [Ticket #2531449] -
Added support for predefining
BUTTONSon the prototype.BUTTONSis Collection of predefined buttons mapped by name -> config. These button configurations will serve as defaults for any button added to a widget’s buttons which have the samename. [Ticket #2531680] -
Added an
HTML_PARSERimplementation for thebuttonsattribute. This allows the initial value for a widget’sbuttonsto be seeded from its DOM. -
A widget’s
buttonsnow persist after header/body/footer content updates. Option 2 of the follow scenario has been implemented: http://jsfiddle.net/ericf/EXR52/ -
A button can be configured with a
contextobject (which defaults to the widget instance), which will be used as thethisobject when calling a button’sactionoreventshandlers. [Ticket #2531166] -
Buttons now support multiple
eventswhich can be specified in place of anaction. The follow are equivalent:var buttonConfigWithEvents = { label: 'Foo', events: { click: function (e) { this.hide(); } } }; var buttonConfigWithAction = { label : 'Foo', action: 'hide' };A button’s
actioncan now be specified as the String name of a function which is hosted on thecontextobject. [Ticket #2531363] -
Added the notion of a default button. A widget’s
defaultButtonwill have the “yui3-button-primary” CSS class added to it, and will be focused when the widget is shown. -
Updated the
addButton()method and added other accessor/mutator methods:getButton()andremoveButton(). -
Buttons can now be added to a widget’s body, not just the header and footer.
3.4.1
-
Added support for
classNamesproperty for button configurations which will add the CSS class names to the button Node. The default “close” button uses this, adding ayui3-button-closeCSS class to itself. [Ticket #2531091] -
Fixed the default template for the “close” button to not contain malformed HTML by replacing the
<div>element inside of a<span>with a<span>. The in-lined CSS in the style attribute on the button was moved into an external CSS file which provides the basic styling for the default “close” button for both the Sam and Night skins. The CSS classyui3-widget-buttonsis now applied to theboundingBoxof Widgets which use WidgetButtons. [Ticket #2530952] -
Fixed a bug where instance-level properties were not being initialized causing references to bubble-up the chain to the prototype incorrectly. [Ticket #2530998]
3.4.0
- Initial release.
