YUI Release 2.4.0 README
Digest
This document is a summary of
the 2.4.0 update information that has been added to the respective
README files included within
each component folder. Please
refer the README files for the
components you are using for
a full change history of each component.
Animation
¥
Enhancements
- calling
stop() on a non-animated Anim no longer fires onComplete
AutoComplete
¥
Enhancements
- Support for YUI JSON Utility.
- The allowBrowserAutocomplete property now supports cases when
the user navigates
away from page via
mean other than a form submission.
- Added support for integration with the Get Utility, for
proxyless data
retrieval from
dynamically loaded script nodes.
¥ Bug Fixes
- Typing 'Enter' to select item no longer causes automatic form
submission on
Mac browsers.
Base
¥
Enhancements
-
Added margin-bottom:1em; for PRE element to match P
-
Added color:#000 for legend element, accommodation for IE
- Added
set width (equivalent to 160px but set in EMs) for input's
width type
= text or password, and for textareas.
¥
Bug Fixes
-
Fixed typo in comments.
Button
¥
Enhancements
-
Added a static method "YAHOO.widget.Button.getButton" that returns a
Button
instance
with the specified HTML element id.
¥
Bug Fixes
- 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 dependency 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>.
Calendar
¥
Enhancements
-
Added CalendarNavigator (year selector) feature to allow the user to jump to a
year/month directly without having to
scroll through months sequentially.
The feature is enabled/configured using
the "navigator" configuration property.
-
Added Custom Events:
showNav/beforeShowNav
hideNav/beforeHideNav,
renderNav/beforeRenderNav
To Calendar/CalendarGroup, in support
of the CalendarNavigator functionality.
-
Added Custom Events:
show/beforeShow
hide/beforeHide
To Calendar and CalendarGroup.
Returning false from a beforeShow/beforeHide
listener can be used to prevent the
Calendar from being shown/hidden respectively.
-
Added Public Methods:
getCellIndex(date) [ Calendar ]
getCalendarPage(date) [
CalendarGroup ]
toDate(dateArray) [ Calendar/CalendarGroup
]
removeRenderers() [
Calendar/CalendarGroup ]
-
The Calendar/CalendarGroup constructor is now more flexible:
* It no longer requires an
"id" argument.
In it's simplest form, a
Calendar/CalendarGroup can be
constructed by simply providing a
container id or reference.
var cal =
new YAHOO.widget.Calendar("container");
-or-
var
containerDiv = YAHOO.util.Dom.get("container");
var cal =
new YAHOO.widget.Calendar(containerDiv);
An id for the Calendar does not need
to be provided, and will be
generated from the container id by
appending an "_t" suffix to the
container id if only the container
is provided.
* The container argument
can be either a string, representing the
id of the container, or an
HTMLElement referring to the container
element itself, as suggested in the
example above.
* If an HTMLElement is
provided for the container argument and the
element does not have an id, one
will be generated for it using
YAHOO.util.Dom.generateId().
* The older form of
Calendar/CalendarGroup signature, expecting
both an id and containerId is still
supported and works as it did
prior to 2.4.0.
-
Added getDate(year, month, date) factory method to the DateMath utility,
which can be used to create JavaScript
Date instances for years less
than 100.
-
Changed Calendar/CalendarGroup/DateMath code to use the DateMath.getDate
method, so that 2 digit years are not
assumed to be in the 1900's.
NOTE: Calendar's API already expects 4
digit date strings when referring
to years after 999.
¥
Bug Fixes
-
Fixed performance issue, where the same custom renderer was being
applied multiple times to the same
cell.
Charts
¥
Initial release
Color Picker
¥
Bug Fixes
- Initialization values assigned to showcontrols,
showrgbcontrols,
showwebsafe,
showhexsummary, animate, red, green, and blue in the
constructor
configuration are now honored.
Connection
¥
Enhancements
-
The callback object can accept a new member, cache, defined with a Boolean
value. If set to
false (e.g., var callback = {
cache:false };), a timestamp will be appended to the URI to override
HTTP GET caching. This timestamp value will appear as
rnd=timestamp in the request querystring.
-
Custom Events startEvent, completeEvent, and abortEvent now receive
callback.argument,
if defined, in addition to the
transaction ID. Each Custom
Event's function handler receives
two arguments -- the event type as the
first argument, and an array as the second argument.
The first element in the array is the
transaction ID, and the second element are any arguments
defined in the callback object.
¥
Bug Fixes
- Fixed
Source Forge bug 1804153.
Transactions initialized with setForm() now properly clear
the POST data field after each transaction.
Container
¥
Enhancements
- Added "dragOnly" configuration property to
Panel, to leverage
the
"dragOnly" configuration property added to the DragDrop
utility for
2.4.0.
When the
"dragOnly" configuration property is set to true,
the DD
instance created for the Panel will not check for drop
targets
on the page, improving performance during drag operations
which
don't require drop target interaction.
The property is set to "false"
by default to maintain backwards
compatibility with older 2.x releases, but should be set to
"true"
if no
drop targets for the Panel exist on the page.
See the
DragDrop utilities 2.4.0 README for additional information.
¥
Bug Fixes
-
constraintoviewport and fixedcenter now handle Overlays which are
larger than the viewport. The Overlay
will be positioned such that
it's top, left corner is in the
viewport. Panel's draggable
behavior now also honors constraintoviewport,
if the panel is
larger than the viewport.
-
constrainToViewport will now correctly constrain Overlays which
haven't been specifically positioned
(don't have an XY value set).
-
Overlay/OverlayManager bringToTop methods will bring Overlays to
the top of the stack, even if their
current zindex is the same as
other Overlays on the page.
-
Fixed double textResizeEvents fired on gecko based browsers (e.g
Firefox 2.x).
-
Panel underlay now resizes correctly in Safari 2.x, when the
content of the Panel is modified (e.g.
when setBody() is called).
-
Tooltip "text" configuration property is no longer overridden by
the "title" attribute value
on the context element if both are
set. The "text" configuration
property takes precedence
(as indicated in the Tooltip
documentation).
-
Transparent shadows no longer become opaque (black) in IE6/IE7
when a Panel with ContainerEffect.FADE
is hidden and then
shown again. Also on IE6/IE7
transparent shadows no longer
appear opaque while animation is in
progress.
-
An empty header is no longer created for non-draggable
Dialogs/SimpleDialogs which don't
provide their own headers.
By design, an empty header is still
created for draggable
Dialogs/SimpleDialogs which don't
provide a header, in order
to provide a drag handle.
-
Select boxes inside Modal Panels on IE6 are no longer hidden.
-
In Sam Skin, Dialog/SimpleDialog default and non-default HTML
buttons (used when YUI Button is not
included on the page) now
have a consistent look. Previously
style properties intended
for default YUI Buttons, were being
incorrectly applied to
default HTML buttons, giving them a
look inconsistent with
non-default buttons.
Data Source
¥
Enhancements
- Support for YUI JSON Utility.
- Implemented setInterval(), clearInterval(), and
clearAllIntervals() for polling.
- Text data parsing algorithm now tolerates newlines
within and at the end of data.
Data Table
¥ No
changes
Dom
¥
Enhancements
- added getClientRegion()
- isAncestor and inDocument no longer use batch
¥
Bug Fixes
- no longer accounting for safari body margin when
offsetParent == body
Drag and Drop
¥
Enhancements
-
Added configuration option called "dragOnly". If dragOnly is set to
true,
all event in the fireEvents method will
not fire. These events are:
onInvalidDrop
b4DragOut & onDragOut
onDragEnter
b4DragOver & onDragOver
b4DragDrop & onDragDrop
This config option should be used
to drag elements that have no need for
drop interaction. They are elements that just need to move.
Editor
¥
Enhancements
- Created a new base class called SimpleEditor. Editor
now extends SimpleEditor
- Created 2 new Toolbar Buttons
YAHOO.widget.ToolbarButton - No requirement for Button or Menu
YAHOO.widget.ToolbarButtonAdvanced - Still Required Button and Menu
¥
Bug Fixes
-
All browsers
1. [Source Forge
1774823] Change text size removes selection highlight
2. [Source Forge
1796897] Font size issue
3. [Source Forge
1799379] setEditorHTML strips title attribute
4. [Source Forge
1810162] [example] Link Options Window appears behind the editor
Added a config option "limitCommands" when set to true, the
editor will not execute a command
that is not bound to a button.
5. [Source Forge
1808154] add non-editable snippets to YUI-RTE
Added a config option "allowNoEdit", when set to true the
"_isNonEditalble method is called at the
beginning
of all event handlers to check if this element or a parent element has the
class yui-noedit (this.CLASS_NOEDIT) applied. If it does, then this method will
stop the event and return true. The
event handlers will then return false and stop the
nodeChange from occuring. This method will also
disable and enable the Editor's toolbar based on the
noedit state.
6. [Source Forge
1808102] Keep the content of invalidHTML
If you set the value of a key in this.invalidHTML to "{
keepContents: true }", then the element will
be replaced with a yui-non span to be filtered out
when cleanHTML is called. The only tag that is
ignored here is the span tag as it will force the
Editor into a loop and freeze the browser. However,
all of these tags will be removed in the cleanHTML
routine
7. [Source Forge
1818681] RTE converts input tags to emnput
8. [Source Forge
1787357] Split into separate modules
Split the Editor into Editor and SimpleEditor. Also split out the
execCommand support into several
methods for easier overriding and extending.
9. [Source Forge
1779516] Dirty flag for editor
You can now check the editorDirty property on the Editor instance. It
will be default false and be set
to true when something important happens. You will
need to manually change it back to false when you check it.
-
Internet Explorer
1. [Source Forge
1804028, 1810362] Omission of DocType at top of page
It appears that Internet Explorer doesn't like the page containing the
Editor to not have a doctype
if the page inside the editor does. The Editor will
now check for compatMode and if it is not in standards
mode, it will omit the doctype from the editable area.
2. [Source Forge
1808818] IE6 reports security violation on secure pages
3. [Source Forge
1810362] Will Not Work Without DTD header
4. yui editor
indentation problem
5. [Source Forge
1789702] RTE Image insertion creates timer error
-
Firefox
1. Can not get focus on
edit box in FF 1.5 on FreeBSD
Element
¥ No
changes
Event
¥
Enhancements
- getListeners/purgeElement accepts either an element
reference or an element id
- onAvailable/onContentReady accepts a single id or an
array of ids
- No longer removing listeners during the unload event
for non-IE browsers
- IE unload strategy for cross page memory leaks
changed from removing each listener
to
calling clearAttributes()
- the DOMReady property is now public
- Changed IE onDOMReady approach from the defered
script node hack to the doScroll('left') hack
- getCharChode now Remaps SHIFT-TAB key code (25) to
TAB (9) in Safari
- getCharCode provides the proper key codes for page
up and page down in Safari
- Restored object check to _isValidCollection.
- In KeyListener, added keycode constants for some of
the special keys.
¥
Bug Fixes
- Rolled back the change added for hacking around IE
errors from bubbled
events
that originally targeted an ActiveX control.
Fonts
¥
Enhancements
- Rechanged core line-height from 1.22 to 1.231, sans
units.
- Updated line-height value for monospcaed elements.
Get
¥
Initial release
Grids
¥ No
changes
History Manager
¥
Enhancements
- Added onReady method (similar to the Event utility's
DOMReady method)
- Starting with YUI 2.4.0, the necessary markup (see
documentation) must be
statically created in the HTML document, and passed to the Browser
History
Manager initialize method. This has two major benefits over older
versions:
- The Browser History Manager may be
initialized much later than before,
allowing for the
corresponding <script> tag to be embedded at the
bottom of the page
(which is good for performance)
- IE had a tendency to
"forget" part or all of the history when returning
to a page.
¥
Bug Fixes
- Fixed SourceForge bugs 1794347, 1490803, 1490818 and
1420015.
Image Loader
¥ No
changes
JSON
¥
Initial release
Logger
¥
Enhancements
- Global window error event no longer being handled by
default. Implemented
handleWindowErrors() and unhandleWindowErrors().
Menu
¥
Enhancements
-
Added a new "minscrollheight" configuration property to
YAHOO.widget.Menu
that defines the minimum threshold for
the "maxheight" configuration property.
-
Added a new "scrollincrement" configuration property to YAHOO.widget.Menu
which can be used to increase or
decrease the scroll speed of scolled menu.
-
Hidden YAHOO.widget.Menu instances are now positioned off screen to
prevent them from introducing
scrollbars on the browser viewport.
The
default off-screen position is -10000
for both the x and y coordinates and is
defined in a new constant:
"YAHOO.widget.Menu.prototype.OFF_SCREEN_POSITION".
The method responsible for moving a
menu off the screen is
"YAHOO.widget.Menu.prototype.positionOffScreen" which is
called in response
to the firing of the "hide"
event.
-
Setting "iframe" configuration property on a YAHOO.widget.MenuBar
instance
will now result in the property
cascading down to all submenus.
-
The "position" configuration property no longer automatically enables
the
iframe shim for YAHOO.widget.Menu
instances. Previously, setting the
"position" configuration
property to "static" would automatically
set the "iframe"
configuration property to "false," and setting "position"
to
"dynamic" would set the
"iframe" configuration property to "true" for IE 6.
-
YAHOO.widget.Menu instances no longer have their widths set automatically
as they are rendered.
-
Modified the DOM structure for a YAHOO.widget.MenuItem instance so that the
submenu indicator node (<EM
class="submenuindicator" />) and checked
indicator node (<EM
class="checkedindicator" />) that were previously direct
descendants of the <A/> node are
no longer present. The updated DOM
structure of a YAHOO.widget.MenuItem instance
is now:
<LI class="yuimenuitem">
<A
class="yuimenuitemlabel">
Text Label
<EM class="helptext"> Help Text </EM> (Optional)
</A>
<DIV
class="yuimenu"> ... </DIV> (Optional submenu node)
</LI>
With the removal of the submenu
indicator and checked indicator nodes,
the following YAHOO.widget.MenuItem
constants, used to define the inner
text of these nodes, have been removed:
-
YAHOO.widget.MenuItem.prototype.COLLAPSED_SUBMENU_INDICATOR_TEXT
-
YAHOO.widget.MenuItem.prototype.EXPANDED_SUBMENU_INDICATOR_TEXT
-
YAHOO.widget.MenuItem.prototype.DISABLED_SUBMENU_INDICATOR_TEXT
-
YAHOO.widget.MenuItem.prototype.CHECKED_TEXT
-
YAHOO.widget.MenuItem.prototype.DISABLED_CHECKED_TEXT
The "submenuIndicator"
property of YAHOO.widget.MenuItem has also
been removed.
-
Modified the CSS class names used to represent the state of
YAHOO.widget.MenuItem and
YAHOO.widget.MenuBarItem instances.
Previous to
2.4.0 the following CSS class names
were applied only to the <A> element
representing the text label for
YAHOO.widget.MenuItem and
YAHOO.widget.MenuBarItem instances:
- hashelptext
- checked
- hassubmenu
- selected
- disabled
To provide more flexibility and
facilitate easier styling of state, a set of
new CSS class names have been created
that are applied to both the root
<LI> node and its child <A>
node for YAHOO.widget.MenuItem and
YAHOO.widget.MenuBarItem instances:
-
New YAHOO.widget.MenuItem CSS classes:
The following are applied
to the <LI> element:
.yuimenuitem-hassubmenu
.yuimenuitem-checked
.yuimenuitem-selected
.yuimenuitem-disabled
.yuimenuitem-checked-selected
.yuimenuitem-checked-disabled
.yuimenuitem-hassubmenu-selected
.yuimenuitem-hassubmenu-disabled
The following are applied
to the <A> element:
.yuimenuitemlabel-hassubmenu
.yuimenuitemlabel-checked
.yuimenuitemlabel-selected
.yuimenuitemlabel-disabled
.yuimenuitemlabel-checked-selected
.yuimenuitemlabel-checked-disabled
.yuimenuitemlabel-hassubmenu-selected
.yuimenuitemlabel-hassubmenu-disabled
New
YAHOO.widget.MenuBarItem CSS classes:
The following are applied
to the <LI> element:
.yuimenubaritem-hassubmenu
.yuimenubaritem-selected
.yuimenubaritem-disabled
.yuimenubaritem-hassubmenu-selected
.yuimenubaritem-hassubmenu-disabled
The following are applied
to the <A> element:
.yuimenubaritemlabel-hassubmenu
.yuimenubaritemlabel-selected
.yuimenubaritemlabel-disabled
.yuimenubaritemlabel-hassubmenu-selected
.yuimenubaritemlabel-hassubmenu-disabled
-
Deprecated the YAHOO.widget.ContextMenuItem class and replaced it
with YAHOO.widget.MenuItem.
-
All submenus of a YAHOO.widget.ContextMenu instance are now of type
YAHOO.widget.Menu.
-
Updated the behavior of the "clicktohide" configuration property of
YAHOO.widget.Menu so that it behaves as
documented: controls whether or not
clicking outside a menu results in the
menu hiding.
¥
Bug Fixes
-
The "context" property of YAHOO.widget.Menu works better in IE 6.
-
Immediate submenus of a YAHOO.widget.MenuBar instance will now re-align
themselves to their parent YAHOO.widget.MenuBarItem
instance to remain inside
the boundaries of the browser viewport
when the "constraintoviewport"
property is set to "true."
- A
submenu will now appear in the correct position when its parent menu
is scrolled.
-
YAHOO.widget.MenuItem instances will no longer increase in height when their
submenu is made visible.
-
Removed superfluous white space between YAHOO.widget.MenuItem instances in
IE 6 (Strict Mode and Quirks Mode) and
IE 7 (Quirks Mode).
-
Statically positioned YAHOO.widget.MenuBar instances will no longer be
rendered in the wrong position when the
Container CSS file is included in
the page.
-
Usage of the "maxheight" configuration property will no longer change
the
position of a YAHOO.widget.Menu instance's
shadow element
(<DIV
class="yui-menu-shadow">).
The shadow element will alway be the last
child node of a menu's root element.
-
YAHOO.widget.MenuBar instances with their "position" configuration
property
set to "dynamic" are no
longer rendered with scrollbars in Firefox for
Mac OS X.
Profiler
¥
Initial release
Reset
¥
Enhancements
- Moved background and default font color to HTML from
BODY
- Removed invalid sub/sup negative line-height values
because they
were invalid and weren't having a big impact.
-
Added legend element color to accommodate IE6 issues.
Reset-Fonts
¥
Initial release
-
This file is a convenience file containing an in-order concatenation of Reset
and Fonts.
Selector
¥
Initial release
Slider
¥ No
changes
Tab View
¥ No
changes
Tree View
¥
Enhancements
-
Added TreeView getNodeByElement, which will return a YAHOO.widget.Node
reference for any ancestor
HTML element of a node in the tree.
-
Added 'title' property to TextNode
-
Added treeview/tooltip example
-
Passing a null or invalid animation type to setExpandAnim/setCollapseAnim
will turn off animation for the tree.
-
Spacer style set to 12px width to fix layout inside overflow containers.
¥
Bug Fixes
- Fixed removeAll() when executed on the root node.
- TextNode's href property is now escaped.
- The 'expanded' property in a node's constructor now
works for dynamically
loaded nodes.
YAHOO Global
¥
Enhancements
- Added YAHOO.env.ua.mobile
- Removed the hasOwnProperty check in isArray to make
it perform a bit better.
- YAHOO will be created/overwritten if YAHOO is
undefined or the defined YAHOO is falsy
YUI Loader
¥
Enhancements
- NOTE: the API in this release has changed
significantly. Existing
implementations
will need to be modified in order to use
the new version.
- yuiloader now includes the yahoo and get
components. This removes the
timing
problems in the previous versions that
forced one to use YAHOO_config or include
yahoo.js on the page before yuiloader.
- No longer uses YAHOO_config for loading, you must
use YAHOO.util.YUILoader
- Interacting with YAHOO.register or supplying a
verifier function is no longer
required to load non-YUI resources.
- Supports script sandboxing. Does not support x-domain sandboxing at
this time
- Removed verifier property, added varName property
which is only needed when
using external scripts and the application needs to support Safari 2.x.
- YUI metadata updates:
-Added 'base', 'reset-fonts',
'get', 'json', 'simpleeditor', 'charts, and 'selector'
-button and history are no
longer beta components.
-imageloader promoted from
experimental to beta.