CommunityID/webdir/javascript/yui/button
2019-07-17 22:08:50 +02:00
..
assets import v1.0.0-RC4 | 2009-05-20 2019-07-17 22:08:50 +02:00
button-debug.js import v1.0.0-RC4 | 2009-05-20 2019-07-17 22:08:50 +02:00
button-min.js import v1.0.0-RC4 | 2009-05-20 2019-07-17 22:08:50 +02:00
button.js import v1.0.0-RC4 | 2009-05-20 2019-07-17 22:08:50 +02:00
README import v1.0.0-RC4 | 2009-05-20 2019-07-17 22:08:50 +02:00

*** version 2.6.0 ***

Fixed the following bugs:
-------------------------

+ Clicking on the option region of a Button of "type" split will fire the "option" event, but not
  "mousedown," "mouseup," "click," or "dblclick".

+ Buttons of type "radio" and "checkbox" will not override a value provided for the title attribute.

+ Returning false in an inline "submit" event handler for a form will now prevent the form
  from being submitted when the form contains Button instances.
  
+ Pressing the enter key to submit a form containing Button instances will no longer 
  trigger a beep sound in Internet Explorer.

+ The Button widget no longer logs errors when strict error reporting is enabled in FireFox.

+ Button instances are now automatically clicked when their corresponding <label> is clicked.

+ The name and value of selected MenuItems in submenus of a Button's Menu are now part of their
  parent form's data when the form is submitted.

+ For Button's of type "menu" and "split" created using an existing <SELECT> element: The name and 
  value of the pre-selected MenuItem in a Button's Menu are now part of their parent form's data 
  when the form is submitted.
	
+ The "appendTo" event now correctly fires when the "container" attribute is set to a 
  node reference.

+ Simple forms with two fields: a Button of type "submit" and a text field will no longer 
  be submitted twice when the enter key is pressed.

+ Submitting a form by pressing the enter key will now result in a Button's "click" event 
  handlers getting called.

+ Buttons of type "menu" and "split" now consistently display their Menus in Opera.

+ Button no longer logs a warning when a Button is created without an id.
  

Added the following features:
-----------------------------

+ Added a new "menumaxheight" attribute used to set the "maxheight" configuration property of a 
  Button's Menu.

+ Added a new "menuminscrollheight" attribute used to set the "minscrollheight" configuration 
  property of a Button's Menu.

+ Added a "menualignment" attribute attribute used to control how a Menu is aligned to its 
  corresponding Button.

+ Added a "yui-split-button-hoveroption" CSS class that is applied when the user hovers the mouse 
  over the "option" section of a split button.


Changes:
--------

+ Removed the rounded corners for IE 6 Quirks Mode and Strict Mode and IE 7 Quirks Mode.

+ Changed the keyboard shortcut used to display the Menu for Button's of type "split" to the down
  arrow key.

+ Passing a DOM element reference to the "container" attribute will no longer result in the Button 
  being appended to the container immediately.  Use the "appendTo" event to listen for when 
  the Button will be appended to the element specified as its container.  To append a Button to
  an element in the DOM immediately, use the "appendTo" method rather than the "container" 
  attribute.


*** Version 2.5.2 ***

Fixed the following bugs:
-------------------------

+ Button instances no longer flicker in Firefox 3 when their "label" attributed is updated.

+ Scrolled Menus of Buttons whose type attribute is set to "menu" or "split" no longer appear 
  on top of their corresponding Button instance.

+ The keyboard shortcut responsible for triggering the display of the Menu for Button instances of
  type "split" will no longer trigger the display of the browser's default context menu in Opera.



*** Version 2.5.1 ***

+ No changes.



*** Version 2.5.0 ***

+ Fixed issue where returning false inside the scope of a listener for attribute "before" 
  events (i.e "beforeCheckedChange") would not cancel the attribute's default setter.



*** Version 2.4.1 ***

+ No changes.



*** Version 2.4.0 ***

Added the following features:
-----------------------------

+ Added a static method "YAHOO.widget.Button.getButton" that returns a Button 
  instance with the specified HTML element id.


Fixed the following bugs:
-------------------------

+ Removed the ".yui-skin-sam" CSS class name from style rules in the core 
  stylesheet so that it is now truly skin agnostic.

+ Updated the default text for tooltips for Buttons of type "radio" so that 
  they offer the correct instructional text.

+ Menus with grouped YAHOO.widget.MenuItem instances will now highlight 
  correctly when used with Button.

+ Buttons of type "link" now have the same default height as other Button
  types in Internet Explorer.

+ Buttons of various types now line up correctly on the same line.

+ Menu is now truly an optional dependancy of Button.

+ Menus now render with the correct width when the "yui-skin-sam" CSS class 
  name is applied to an element other than the <BODY>.



*** Version 2.3.1 ***

Fixed the following bugs:
-------------------------
+ Purged the old 2.2.2 Button stylesheet and related image assets that was 
  mistakenly included in the 2.3.0 build.

+ Fixed an issue in Gecko where changing a Button instance's "label" attribute
  after the Button had been created would not result in the Button redrawing at
  a width to fit its content.
  
+ Fixed an issue where the singleton keypress event handler
  (YAHOO.widget.Button.onFormKeyPress) registered for forms containing
  Button instances of type "submit" was not removed from the form once all of 
  its child Button instances are destroyed.

+ Submitting a form by clicking on a MenuItem of a SplitButton's or MenuButton's
  Menu will no longer result in a JavaScript error.
  
+ Modified how element tag names are compared to support XHTML applications.

+ Added code to remove the CSS class names representing the "hover," "focus," 
  and "active" states when a Button instance is disabled.


*** Version 2.3 ***

Added the following features:
-----------------------------

+ Added a "focusmenu" configuration attribute that controls whether or not a 
  Button instance's menu will automatically be focused when made visible. 

+ Added a "lazyloadmenu" configuration attribute that controls the value of 
  the "lazyload" configuration property of a Button's menu.

+ Added "menuclassname" configuration attribute that defines a CSS class name
  to be applied to the root HTML element of a button's menu.


Fixed the following bugs:
-------------------------

+ Setting the "label" attribute of a Button of type "link" to a string with 
  a "www." prefix will no longer result in the value of the "href" property 
  being used for the "label" in IE.

+ Disabling a Button when its menu is visible will now result in the menu 
  being hidden.

+ Hidden field(s) created by a Button instance are now removed if the 
  submission of its parent form is cancelled.

+ If a Button instance is preceeded by another enabled HTML submit button 
  (<input type="submit" ...> or <button type="submit" ...>), it will no longer 
  create a hidden field representing its name and value when its parent form 
  is submitted.

+ If an HTML form contains a mix of YUI Buttons of type "submit" and standard 
  HTML submit buttons (<input type="submit" ...> or <button type="submit" ...>) 
  its "submit" event will no longer fire twice when it is submitted by the user 
  pressing the enter key while focus inside another HTML form control.

+ If all Button instances in a form are disabled, the form will no longer be 
  submitted when the user presses the enter key while focused inside another 
  HTML form control.

+ The first enabled Button instance in a form now correctly adds its name and 
  value to the form's data set when the form is submitted by the user pressing 
  the enter key while focused inside another form control.  

+ Fixed typo in the source file for the ButtonGroup class that was causing the 
  private variable "m_oButtons" to be declared as a global.

+ Switched to use of the CSS display type "-moz-inline-box" from 
  "-moz-inline-stack" for Gecko-based browsers so that the entire area of a 
  Button instance is clickable when it is rendered inside another inline 
  element.

+ Added "yui-button" and "yui-[button type]-button" prefix to CSS classes to 
  sandbox Button styles.


Changes:
--------

+ Default value of "type" configuration attribute now "push" (was "button").

+ Type "menubutton" now "menu."

+ Type "splitbuton" now "split."

+ Added "addStateCSSClasses" method.

+ Added "removeStateCSSClasses" method.

+ Renamed protected property "_hiddenField" to "_hiddenFields."

+ Removed protected "submit" event handler named "_onFormSubmit."

+ Renamed public method "createHiddenField" to "createHiddenFields."

+ Added new "removeHiddenFields" method.

+ Renamed static method "YAHOO.widget.Button.onFormKeyDown" 
  to "YAHOO.widget.Button.onFormKeyPress."

+ Renamed "TAG_NAME" constant (YAHOO.widget.Button.prototype.TAG_NAME and 
  YAHOO.widget.ButtonGroup.prototype.TAG_NAME) to 
  "NODE_NAME" (YAHOO.widget.Button.prototype.NODE_NAME and 
  YAHOO.widget.ButtonGroup.prototype.NODE_NAME).

+ The "selectedMenuItem" configuration attribute now correctly gets/sets the 
  index of the selected MenuItem instance of the button's menu, rather than a
  MenuItem instance.

+ The "container" configuration attribute is now writeonce

+ The "menu" configuration attribute is now writeonce

+ The root element of each button's menu now will have two CSS classes 
  appended to it:
    - The CSS class name specified by the "menuclassname" configuration 
      attribute (by default is "yui-button-menu")
    - A type-specific class name (either "yui-split-button-menu" 
      or "yui-menu-button-menu")

+ "menu" configuration attribute now supports creation or use of 
  YAHOO.widget.Overlay in addition to previously supported 
  YAHOO.widget.Menu:
  
	- To create a menu from existing markup using YAHOO.widget.Overlay, pass the
	  id or node reference of the HTML element to be used to create the Overlay 
	  as the value of the "menu" configuration attribute.

    - YAHOO.widget.Overlay instances passed as a value for the "menu" 
      configuration attribute need to be fully rendered.  

	- To create a menu from existing markup using YAHOO.widget.Menu, pass the 
	  id or node reference of the HTML element to be used to create the menu 
	  as the value of the "menu" configuration attribute and give the 
	  HTML element the same class name as specified by 
	  YAHOO.widget.Menu.prototype.CSS_CLASS_NAME.
	
	- YAHOO.widget.Overlay instances used as a menu are by default not rendered 
	  until they are are made visible for the first time.  This behavior 
	  can be changed so that they are rendered immediately by setting the value 
	  of the "lazyloadmenu" configuration attribute to "false."

+ If you pass an element id for the value of the "menu" configuration 
  attribute, that node is now accessed immediately via the "get" method of the 
  Dom utility (YAHOO.util.Dom) as opposed to the "onContentReady" method of the
  Event utility (YAHOO.util.Event).

+ Modified code to support a more generic markup format.  Now any number of 
  HTML elements can exist between a Button's root HTML element and its button 
  node (be it an <A> or <BUTTON> element):

    <ROOT_NODE> ... <BUTTON_NODE /> ... </ROOT_NODE>

+ A Button can now be initialized using any of the following six HTML patterns:

    - <A> TEXT/HTML </A>
    - <BUTTON> TEXT/HTML </BUTTON>
    - <INPUT />
    - <ROOT_NODE> ... <A> TEXT/HTML </A> ... </ROOT_NODE>
    - <ROOT_NODE> ... <BUTTON> TEXT/HTML </BUTTON> ... </ROOT_NODE>
    - <ROOT_NODE> ... <INPUT /> ... </ROOT_NODE>

+ The id of a Button instance can now match that of its source element.

+ CSS changes:

    1) All Buttons have a "yui-" prefix as opposed to "yui":
    
    2.2.2	    | 2.3
    -------------------------
    .yuibutton  | .yui-button
    
    
    2) Each Button type has its own class name with a "yui-" prefix and 
    "-button" suffix IN ADDITION TO the default "yui-button" class name:
    
    2.2.2			| 2.3
    ------------------------------------------
    .yuibutton.splitbutton	| .yui-split-button
    .yuibutton.menubutton	| .yui-menu-button
    
    * Allows for the definition of generic styles that apply to all buttons, 
    while providing a means for uniquely styling buttons of a specific type.
    
    
    3) For states that are common to all Buttons, two classes are applied: a
    generic class name (i.e. yui-button-[state]) and a type-specific state class
    name (yui-[type]-button-[state]):
    
    2.2.2			| 2.3
    -------------------------------------------
    .yuibutton.focus	| .yui-button-focus
    .yuibutton.radio.focus	| .yui-radio-button-focus
    
    * States common to all Button types are:
        + focus
        + hover
        + active
        + disabled
    
    ** Allows for the definition of generic styles that apply to all states of 
    all buttons, while providing a means for uniquely styling states for 
    buttons of a specific type.
    
    
    4) Buttons of type "radio" and "checkbox" have two classes applied to 
    represent their "checked" state: a generic class name 
    (i.e. yui-button-checked) and a type-specific class 
    name (yui-[type]-button-checked):
    
    2.2.2			    | 2.3
    -------------------------------------------
    .yuibutton.checked	    | .yui-button-checked
    .yuibutton.radio.checked    | .yui-radio-button-checked
    .yuibutton.checkbox.checked | .yui-checkbox-button-checked
    
    ** This allows for the definition of a universal style for all Buttons that
    have a "checked" state or the ability to define a type-specific style for 
    the "checked" state.
    
    
    5) States that are specific to a particular type only get a type-specific 
    state class name.  Currently this only applies to the "splitbutton" type:
    
    2.2.2			    | 2.3
    -------------------------------------------
    .yuibutton.activeoption     | .yui-split-button-activeoption
    
    
    6) The "ie6" class name is removed.


*** Version 2.2.2 ***

+ No changes


*** Version 2.2.1 ***

Added the following features:
-----------------------------

+ Added "getHiddenField" method to YAHOO.widget.Button.


Fixed the following bugs:
-------------------------

+ Removed built-in use of the Event utility's "onAvailable" method from the
  constructor of Button and ButtonGroup as it was preventing the addition of 
  event listeners on instances created from existing markup.  Going forward 
  Button and ButtonGroup instances created from existing markup can only be 
  instantiated once their source HTML element is available in the DOM.  The 
  Button examples illustrate how this can be accomplished.

+ Modified code so that disabled Button instances no longer fire DOM events.

+ Pressing the enter key while focused on a form field whose parent form 
  contains a Button instance of type "submit" will now automatically submit 
  the form using the first Button instance of type "submit".

+ Clicking a Button instance of type="submit" will now cause the Button's 
  parent form's "submit" event to fire.

+ Modified Button CSS so that the filter used to apply alpha transparency to 
  a Button's background PNG is only used by IE 6.  The previous code was 
  enabling IE's Alpha image loader for IE 7 in Quirks mode. 

+ Fixed documentation error for "getForm" method.  


Changes:
--------

+ Made the "submitForm" method of YAHOO.widget.Button public (was 
  previously protected).  

+ Removed "init" event and corresponding "oninit" configuration attribute
  from YAHOO.widget.Button and YAHOO.widget.ButtonGroup.

+ Added the CSS class "ie6" to button.css.  This classname is append to root 
  DOM element of Button instances created with IE 6.  By default this class
  is used to apply a filter that gives alpha transparency to a Button's 
  background PNG.



*** Version 2.2.0 ***

* Button Control introduced