update YUI to 2.8.0r4

This commit is contained in:
Graham Knop 2009-09-21 12:54:44 -05:00
parent 27f474ec64
commit 2d28e0c0ba
2007 changed files with 344487 additions and 210070 deletions

File diff suppressed because one or more lines are too long

View file

@ -6,6 +6,7 @@
UA = YAHOO.env.ua,
Panel = YAHOO.widget.Panel,
Tooltip = YAHOO.widget.Tooltip,
SimpleDialog = YAHOO.widget.SimpleDialog,
ModulePrototype = YAHOO.widget.Module.prototype,
fnModuleInitDefaultConfig = ModulePrototype.initDefaultConfig,
@ -17,6 +18,9 @@
PanelPrototype,
fnPanelInitDefaultConfig,
SimpleDialogPrototype,
fnSimpleDialogConfigIcon,
m_bPanelDocumentListenersAdded = false,
m_oFocusedElement, // Currently focused element in the DOM
m_oOverlayManager, // An OverlayManager instance
@ -36,6 +40,7 @@
_FOCUS = "focus",
_VISIBLE = "visible",
_BEFORE_HIDE = "beforeHide",
_ALERT_DIALOG = "alertdialog",
_DIALOG = "dialog",
_DESCRIBED_BY = "describedby",
_CONTEXT = "context",
@ -47,7 +52,6 @@
_KEY_DOWN = "keydown",
_BEFORE_SHOW = "beforeShow",
_CLOSE = "close",
_ALERT_DIALOG = "alertdialog",
_LABELLED_BY = "labelledby",
_XY = "xy",
_TOOLTIP = "tooltip",
@ -257,7 +261,7 @@
};
var onPanelBeforeHide = function (type, args, element) {
var restoreFocus = function (type, args, element) {
this.blur();
@ -272,23 +276,28 @@
}
this.unsubscribe(_BEFORE_HIDE, onPanelBeforeHide, element);
this.unsubscribe(type, restoreFocus, element);
};
var onPanelBeforeShow = function () {
this.subscribe(_BEFORE_HIDE, onPanelBeforeHide, m_oFocusedElement);
// If the Panel is modal it is necessary to wait until the modality
// mask has been hidden before attempting to restore focus to the
// element in the DOM that had focus before the Panel was made visible.
var sEvent = (this.cfg.getProperty("modal") === true) ?
"hideMask" : _BEFORE_HIDE;
this.subscribe(sEvent, restoreFocus, m_oFocusedElement);
};
var setPanelHiddenRole = function () {
var oElement = this.cfg.getProperty(_ROLE) === _DIALOG ? this.innerElement : this.body;
setARIAProperty(oElement, _HIDDEN, !this.cfg.getProperty(_VISIBLE));
setARIAProperty(this.innerElement, _HIDDEN, !this.cfg.getProperty(_VISIBLE));
};
@ -399,32 +408,20 @@
configDescribedBy: function (type, args) {
var sID = args[0],
oElement;
var sID = args[0];
if (this.cfg.getProperty(_USE_ARIA) && sID) {
oElement = this.cfg.getProperty(_ROLE) === _DIALOG ?
this.innerElement : this.body;
setARIAProperty(oElement, _DESCRIBED_BY, sID);
setARIAProperty(this.innerElement, _DESCRIBED_BY, sID);
}
},
configLabelledBy: function (type, args) {
var sID = args[0],
oElement;
var sID = args[0];
if (this.cfg.getProperty(_USE_ARIA) && sID) {
oElement = this.cfg.getProperty(_ROLE) === _DIALOG ?
this.innerElement : this.body;
setARIAProperty(oElement, _LABELLED_BY, sID);
setARIAProperty(this.innerElement, _LABELLED_BY, sID);
}
},
@ -432,44 +429,40 @@
configRole: function (type, args) {
var sRole = args[0],
oElement,
oBody,
oHeader,
sHeaderId;
sID;
if (sRole) {
switch (sRole) {
case _DIALOG:
oElement = this.innerElement;
break;
case _ALERT_DIALOG:
oElement = this.body;
oBody = this.body;
sID = oBody.id || Dom.generateId(oBody);
this.cfg.setProperty(_DESCRIBED_BY, sID);
break;
case _DIALOG:
oHeader = this.header;
sID = oHeader.id || Dom.generateId(oHeader);
this.cfg.setProperty(_LABELLED_BY, sID);
break;
}
setARIARole(this.innerElement, sRole);
if (oElement) {
setARIARole(oElement, sRole);
oHeader = this.header;
sHeaderId = oHeader.id || Dom.generateId(oHeader);
this.cfg.setProperty(_LABELLED_BY, sHeaderId);
setRoleForCloseButton.call(this);
}
setRoleForCloseButton.call(this);
}
@ -497,6 +490,36 @@
}
// SimpleDialog ARIA plugin - augments YAHOO.widget.SimpleDialog
if (SimpleDialog) {
SimpleDialogPrototype = SimpleDialog.prototype;
fnSimpleDialogConfigIcon = SimpleDialogPrototype.configIcon;
SimpleDialogPrototype.configIcon = function (type, args, obj) {
fnSimpleDialogConfigIcon.apply(this, arguments);
var sIcon = args[0],
sCSSClass = SimpleDialog.ICON_CSS_CLASSNAME,
oIcon;
if (sIcon && sIcon != "none") {
oIcon = Dom.getElementsByClassName(sCSSClass, "*" , this.body);
if (oIcon) {
setARIARole(oIcon[0], _PRESENTATION);
}
}
};
}
// Tooltip ARIA plugin - augments YAHOO.widget.Tooltip
var onDocumentFocus = function (event) {
@ -630,4 +653,5 @@
}
}());
}());
YAHOO.register("containerariaplugin", YAHOO.widget.Module, {version: "@VERSION@", build: "@BUILD@"});

View file

@ -9,7 +9,7 @@ em { font-style:italic }
#hd a#logo { display:block;margin:10px;width:378px; }
#hd a#logo div { background:url(../assets/yui.gif) no-repeat;height:34px; }
#hd h1 { font-weight:bold;text-indent:15px; background: url(http://us.i1.yimg.com/us.yimg.com/i/ydn/bg_hd.gif) 0 0 repeat-x #B6CDE1; border:1px solid #93B2CC; position:relative;font-size:110%;padding:5px 0;margin:0 auto;}
#hd h1 { font-weight:bold;text-indent:15px; background: url(http://l.yimg.com/a/i/ydn/bg_hd.gif) 0 0 repeat-x #B6CDE1; border:1px solid #93B2CC; position:relative;font-size:110%;padding:5px 0;margin:0 auto;}
#hd { margin-bottom:10px; }
#toc { background-color:#ecf5fa; padding:0; border:1px solid #89d;overflow:hidden;zoom:1}
@ -30,8 +30,8 @@ em { font-style:italic }
#toc ul li.active a { color:#000; }
#toc ul li a.printer { padding:0;margin-right:2px;margin-top:-1.5em;display:none;float:right;height:12px;width:12px; }
#toc ul li.selected a.printer { display:block;background:url(http://us.i1.yimg.com/us.yimg.com/i/us/aut/pltfrm/ic/print_12.gif) no-repeat;cursor:pointer; }
#toc ul li.selected a.printer:hover { background:url(http://us.i1.yimg.com/us.yimg.com/i/us/aut/pltfrm/ic/print_12.gif) no-repeat;cursor:pointer; }
#toc ul li.selected a.printer { display:block;background:url(http://l.yimg.com/a/i/us/aut/pltfrm/ic/print_12.gif) no-repeat;cursor:pointer; }
#toc ul li.selected a.printer:hover { background:url(http://l.yimg.com/a/i/us/aut/pltfrm/ic/print_12.gif) no-repeat;cursor:pointer; }
#toc ul li em { display:none; }
#toc ul li.sect { font-weight:bold; color:#fff; background:#ccc; }