update YUI to 2.8.0r4
This commit is contained in:
parent
27f474ec64
commit
2d28e0c0ba
2007 changed files with 344487 additions and 210070 deletions
86
www/extras/yui/tests/menu/tests/keep-open-fix.html
Normal file
86
www/extras/yui/tests/menu/tests/keep-open-fix.html
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
||||
"http://www.w3.org/TR/html4/strict.dtd">
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Menu keepopen Configuration Property Test</title>
|
||||
|
||||
<link type="text/css" rel="stylesheet" href="../../../build/menu/assets/skins/sam/menu.css">
|
||||
|
||||
<script type="text/javascript" src="../../../build/yahoo-dom-event/yahoo-dom-event.js"></script>
|
||||
<script type="text/javascript" src="../../../build/container/container_core-min.js"></script>
|
||||
<script type="text/javascript" src="../../../build/menu/menu.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
/*
|
||||
Initialize and render the Menu when the element it is to be
|
||||
rendered into is ready to be scripted.
|
||||
*/
|
||||
|
||||
YAHOO.util.Event.onAvailable("rendertarget", function () {
|
||||
|
||||
/*
|
||||
Instantiate a Menu: The first argument passed to the constructor
|
||||
is the id for the Menu element to be created, the second is an
|
||||
object literal of configuration properties.
|
||||
*/
|
||||
|
||||
var oMenu = new YAHOO.widget.Menu("basicmenu", { fixedcenter: true, keepopen: true });
|
||||
|
||||
|
||||
/*
|
||||
Add items to the Menu instance by passing an array of object literals
|
||||
(each of which represents a set of YAHOO.widget.MenuItem
|
||||
configuration properties) to the "addItems" method.
|
||||
*/
|
||||
|
||||
oMenu.addItems([
|
||||
|
||||
{ text: "MenuItem 1", submenu: {
|
||||
|
||||
id: "submenu-1", itemdata: [
|
||||
"MenuItem 1",
|
||||
"MenuItem 2",
|
||||
"MenuItem 3",
|
||||
"MenuItem 4",
|
||||
]
|
||||
|
||||
} },
|
||||
"MenuItem 2",
|
||||
"MenuItem 3",
|
||||
"MenuItem 4"
|
||||
|
||||
]);
|
||||
|
||||
|
||||
/*
|
||||
Since this Menu instance is built completely from script, call the
|
||||
"render" method passing in the DOM element that it should be
|
||||
appended to.
|
||||
*/
|
||||
|
||||
oMenu.render("rendertarget");
|
||||
|
||||
|
||||
YAHOO.util.Event.addListener("menutoggle", "click", oMenu.show, null, oMenu);
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="yui-skin-sam">
|
||||
|
||||
<h1>Menu keepopen Configuration Property Test</h1>
|
||||
<p>Test case to demonstrate fix for <a href="http://yuilibrary.com/projects/yui2/ticket/2512349">bug 2512349</a>.</p>
|
||||
|
||||
<button id="menutoggle" type="button">Show Menu</button>
|
||||
|
||||
<div id="rendertarget"></div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
86
www/extras/yui/tests/menu/tests/keep-open-repo.html
Normal file
86
www/extras/yui/tests/menu/tests/keep-open-repo.html
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
||||
"http://www.w3.org/TR/html4/strict.dtd">
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Menu keepopen Configuration Property Test</title>
|
||||
|
||||
<link type="text/css" rel="stylesheet" href="http://yui.yahooapis.com/2.7.0/build/menu/assets/skins/sam/menu.css">
|
||||
|
||||
<script type="text/javascript" src="http://yui.yahooapis.com/2.7.0/build/yahoo-dom-event/yahoo-dom-event.js"></script>
|
||||
<script type="text/javascript" src="http://yui.yahooapis.com/2.7.0/build/container/container_core-min.js"></script>
|
||||
<script type="text/javascript" src="http://yui.yahooapis.com/2.7.0/build/menu/menu.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
/*
|
||||
Initialize and render the Menu when the element it is to be
|
||||
rendered into is ready to be scripted.
|
||||
*/
|
||||
|
||||
YAHOO.util.Event.onAvailable("rendertarget", function () {
|
||||
|
||||
/*
|
||||
Instantiate a Menu: The first argument passed to the constructor
|
||||
is the id for the Menu element to be created, the second is an
|
||||
object literal of configuration properties.
|
||||
*/
|
||||
|
||||
var oMenu = new YAHOO.widget.Menu("basicmenu", { fixedcenter: true, keepopen: true });
|
||||
|
||||
|
||||
/*
|
||||
Add items to the Menu instance by passing an array of object literals
|
||||
(each of which represents a set of YAHOO.widget.MenuItem
|
||||
configuration properties) to the "addItems" method.
|
||||
*/
|
||||
|
||||
oMenu.addItems([
|
||||
|
||||
{ text: "MenuItem 1", submenu: {
|
||||
|
||||
id: "submenu-1", itemdata: [
|
||||
"MenuItem 1",
|
||||
"MenuItem 2",
|
||||
"MenuItem 3",
|
||||
"MenuItem 4",
|
||||
]
|
||||
|
||||
} },
|
||||
"MenuItem 2",
|
||||
"MenuItem 3",
|
||||
"MenuItem 4"
|
||||
|
||||
]);
|
||||
|
||||
|
||||
/*
|
||||
Since this Menu instance is built completely from script, call the
|
||||
"render" method passing in the DOM element that it should be
|
||||
appended to.
|
||||
*/
|
||||
|
||||
oMenu.render("rendertarget");
|
||||
|
||||
|
||||
YAHOO.util.Event.addListener("menutoggle", "click", oMenu.show, null, oMenu);
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body class="yui-skin-sam">
|
||||
|
||||
<h1>Menu keepopen Configuration Property Test</h1>
|
||||
<p>Test case to reproduce <a href="http://yuilibrary.com/projects/yui2/ticket/2512349">bug 2512349</a>.</p>
|
||||
|
||||
<button id="menutoggle" type="button">Show Menu</button>
|
||||
|
||||
<div id="rendertarget"></div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
116
www/extras/yui/tests/menu/tests/menu-activeelement-test.html
Normal file
116
www/extras/yui/tests/menu/tests/menu-activeelement-test.html
Normal file
|
|
@ -0,0 +1,116 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title>Button activeElement Test</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../../../build/fonts/fonts-min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../../../build/menu/assets/skins/sam/menu.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../../../build/button/assets/skins/sam/button.css" />
|
||||
<link type="text/css" rel="stylesheet" href="../../../build/logger/assets/skins/sam/logger.css">
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
#button-example-form fieldset {
|
||||
|
||||
border: 2px groove #ccc;
|
||||
margin: .5em;
|
||||
padding: .5em;
|
||||
|
||||
}
|
||||
|
||||
#menubutton3menu,
|
||||
#menubutton4menu {
|
||||
|
||||
position: absolute;
|
||||
visibility: hidden;
|
||||
border: solid 1px #000;
|
||||
padding: .5em;
|
||||
background-color: #ccc;
|
||||
|
||||
}
|
||||
|
||||
#button-example-form-postdata {
|
||||
|
||||
border: dashed 1px #666;
|
||||
background-color: #ccc;
|
||||
padding: 1em;
|
||||
|
||||
}
|
||||
|
||||
#button-example-form-postdata h2 {
|
||||
|
||||
margin: 0 0 .5em 0;
|
||||
padding: 0;
|
||||
border: none;
|
||||
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<script type="text/javascript" src="../../../build/yahoo-dom-event/yahoo-dom-event.js"></script>
|
||||
<script type="text/javascript" src="../../../build/container/container_core-min.js"></script>
|
||||
<script type="text/javascript" src="../../../build/menu/menu-min.js"></script>
|
||||
<script type="text/javascript" src="../../../build/element/element-min.js"></script>
|
||||
<script type="text/javascript" src="../../../build/button/button-min.js"></script>
|
||||
<script type="text/javascript" src="../../../build/dragdrop/dragdrop-min.js"></script>
|
||||
<script type="text/javascript" src="../../../build/logger/logger-min.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
(function () {
|
||||
|
||||
var Event = YAHOO.util.Event,
|
||||
Dom = YAHOO.util.Dom;
|
||||
|
||||
|
||||
Event.onDOMReady(function () {
|
||||
|
||||
var logReader = new YAHOO.widget.LogReader();
|
||||
|
||||
|
||||
var oMenu = new YAHOO.widget.Menu("menu-1", { fixedcenter: true, visible: true });
|
||||
|
||||
oMenu.addItems([
|
||||
"MenuItem 1",
|
||||
"MenuItem 2",
|
||||
"MenuItem 3",
|
||||
]);
|
||||
|
||||
oMenu.render(document.body);
|
||||
|
||||
|
||||
Event.on("text-field-1", "keydown", function (event) {
|
||||
|
||||
YAHOO.log("keydown: " + Event.getCharCode(event));
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
}());
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body class=" yui-skin-sam">
|
||||
|
||||
<h1>Button activeElement Test</h1>
|
||||
<p>Test case for <a href="http://yuilibrary.com/projects/yui2/ticket/2528245">bug 2528245</a>.</p>
|
||||
<p>
|
||||
Clicking on the text box when the Button's Menu is open should result in the Menu closing,
|
||||
the Button blurring and the text box being focused and becoming the activeElement.
|
||||
After mousing down on the text box, it should have a black outline and
|
||||
should fire key events.
|
||||
</p>
|
||||
|
||||
<form id="button-example-form" name="button-example-form" method="post">
|
||||
|
||||
<input type="text" id="text-field-1" name="text-field-1">
|
||||
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
103
www/extras/yui/tests/menu/tests/menu-right-click-test.html
Normal file
103
www/extras/yui/tests/menu/tests/menu-right-click-test.html
Normal file
|
|
@ -0,0 +1,103 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title>Menu Right Click Test</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../../../build/fonts/fonts-min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../../../build/menu/assets/skins/sam/menu.css" />
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
/*
|
||||
Position and hide the Menu instance to prevent a flash of unstyled
|
||||
content when the page is loading.
|
||||
*/
|
||||
|
||||
div.yuimenu {
|
||||
|
||||
position: absolute;
|
||||
visibility: hidden;
|
||||
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<script type="text/javascript" src="../../../build/yahoo-dom-event/yahoo-dom-event.js"></script>
|
||||
<script type="text/javascript" src="../../../build/container/container_core-min.js"></script>
|
||||
<script type="text/javascript" src="../../../build/menu/menu-min.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
/*
|
||||
Initialize and render the Menu when its elements are ready
|
||||
to be scripted.
|
||||
*/
|
||||
|
||||
YAHOO.util.Event.onContentReady("basicmenu", function () {
|
||||
|
||||
/*
|
||||
Instantiate a Menu: The first argument passed to the
|
||||
constructor is the id of the element in the page
|
||||
representing the Menu; the second is an object literal
|
||||
of configuration properties.
|
||||
*/
|
||||
|
||||
var oMenu = new YAHOO.widget.Menu("basicmenu", { fixedcenter: true });
|
||||
|
||||
|
||||
/*
|
||||
Call the "render" method with no arguments since the
|
||||
markup for this Menu instance is already exists in the page.
|
||||
*/
|
||||
|
||||
oMenu.render();
|
||||
|
||||
// Bind a "click" event handler to the Menu to test that
|
||||
// the "click" event doesn't fire when the user right clicks
|
||||
// on the the Menu instance.
|
||||
|
||||
oMenu.subscribe("click", function () {
|
||||
|
||||
alert("If you see this alert the bug is not fixed.");
|
||||
|
||||
});
|
||||
|
||||
|
||||
YAHOO.util.Event.addListener("menutoggle", "click", oMenu.show, null, oMenu);
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body class=" yui-skin-sam">
|
||||
|
||||
<h1>Menu Right Click Test</h1>
|
||||
|
||||
<p>
|
||||
This is a test case for <a href="http://yuilibrary.com/projects/yui2/ticket/2527869" title="#2527869 Menu click event incorrectly called for right click in Firefox :: YUI 2.x :: YUI Library">bug 2527869</a>.
|
||||
</p>
|
||||
<p>
|
||||
Right click on the Menu using Firefox for Windows.
|
||||
The Menu should remain visible, and the browser's context menu should
|
||||
appear. If an alert pops up, the bug is not fixed.
|
||||
</p>
|
||||
|
||||
<button id="menutoggle" type="button">Show Menu</button>
|
||||
|
||||
<div id="basicmenu" class="yuimenu">
|
||||
<div class="bd">
|
||||
<ul class="first-of-type">
|
||||
<li class="yuimenuitem"><a class="yuimenuitemlabel" href="http://mail.yahoo.com">Yahoo! Mail</a></li>
|
||||
<li class="yuimenuitem"><a class="yuimenuitemlabel" href="http://addressbook.yahoo.com">Yahoo! Address Book</a></li>
|
||||
<li class="yuimenuitem"><a class="yuimenuitemlabel" href="http://calendar.yahoo.com">Yahoo! Calendar</a></li>
|
||||
<li class="yuimenuitem"><a class="yuimenuitemlabel" href="http://notepad.yahoo.com">Yahoo! Notepad</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
118
www/extras/yui/tests/menu/tests/menu-unsubscribe.html
Normal file
118
www/extras/yui/tests/menu/tests/menu-unsubscribe.html
Normal file
|
|
@ -0,0 +1,118 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>YUI MenuBar test</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../build/fonts/fonts-min.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../../build/menu/assets/skins/sam/menu.css">
|
||||
</head>
|
||||
<body class="yui-skin-sam">
|
||||
<div class="yuimenubar" id="h-menu">
|
||||
<div class="bd">
|
||||
<ul class="first-of-type">
|
||||
<li class="yuimenubaritem first-of-type" id="h-menu-file">
|
||||
<a href="#" class="yuimenubaritemlabel">File</a>
|
||||
<div class="yuimenu">
|
||||
<div class="bd">
|
||||
<ul class="first-of-type">
|
||||
<li class="yuimenuitem first-of-type" id="h-menu-file-new">
|
||||
<a href="#" class="yuimenuitemlabel">New...</a>
|
||||
</li>
|
||||
<li class="yuimenuitem" id="h-menu-file-open">
|
||||
<a href="#" class="yuimenuitemlabel">Open...</a>
|
||||
</li>
|
||||
<li class="yuimenuitem" id="h-menu-file-close">
|
||||
<a href="#" class="yuimenuitemlabel">Close</a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li class="yuimenuitem first-of-type" id="h-menu-file-save">
|
||||
<a href="#" class="yuimenuitemlabel">Save</a>
|
||||
</li>
|
||||
<li class="yuimenuitem" id="h-menu-file-saveas">
|
||||
<a href="#" class="yuimenuitemlabel">Save As...</a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li class="yuimenuitem first-of-type" id="h-menu-file-manage">
|
||||
<a href="#" class="yuimenuitemlabel">Manage Docs...</a>
|
||||
</li>
|
||||
<li class="yuimenuitem" id="h-menu-file-print">
|
||||
<a href="#" class="yuimenuitemlabel">Print...</a>
|
||||
</li>
|
||||
<li class="yuimenuitem" id="h-menu-file-email">
|
||||
<a href="#" class="yuimenuitemlabel">Email...</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="yuimenubaritem" id="h-menu-searches">
|
||||
<a href="#h-menu-searches-submenu" class="yuimenubaritemlabel">Searches</a>
|
||||
<div class="yuimenu" id="h-menu-searches-submenu">
|
||||
<div class="bd">
|
||||
<ul class="first-of-type">
|
||||
<li class="yuimenuitem query first-of-type">
|
||||
<a target="_blank" href="http://facthotcover.corp.search.yahoo.com/search?ei=UTF-8&p=la+ponderosa" class="yuimenuitemlabel">la ponderosa</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="yuimenubaritem" id="h-menu-help">
|
||||
<a href="#" class="yuimenubaritemlabel">Help</a>
|
||||
<div class="yuimenu">
|
||||
<div class="bd">
|
||||
<ul class="first-of-type">
|
||||
<li class="yuimenuitem" id="h-menu-help-about">
|
||||
<a target="_blank" href="http://help.yahoo.com/l/us/yahoo/search/searchpad/;_ylt=AwpIeSAU17pJtOYA6TZXNyoA" class="yuimenuitemlabel">About Search Pad</a>
|
||||
</li>
|
||||
<li class="yuimenuitem" id="h-menu-help-feedback">
|
||||
<a target="_blank" href="http://help.yahoo.com/l/us/yahoo/search/searchpad.html;_ylt=AwpIeSAU17pJtOYA6jZXNyoA" class="yuimenuitemlabel">Send Feedback</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form action="./" method="get" style="margin-top: 200px;">
|
||||
<p>
|
||||
<textarea id="log" rows="10" cols="50"></textarea>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<label>MenuBar clicks:</label>
|
||||
<input type="button" id="add" value="Subscribe">
|
||||
<input type="button" id="remove" value="Unsubscribe">
|
||||
</p>
|
||||
</form>
|
||||
|
||||
<script type="text/javascript" src="../../../build/yahoo-dom-event/yahoo-dom-event.js"></script>
|
||||
<script type="text/javascript" src="../../../build/container/container_core-min.js"></script>
|
||||
<script type="text/javascript" src="../../../build/menu/menu-min.js"></script>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function () {
|
||||
function handleClick(e, args) {
|
||||
YAHOO.util.Dom.get('log').value += "Click: " + args[1].id + "\n";
|
||||
}
|
||||
|
||||
var menubar = new YAHOO.widget.MenuBar('h-menu');
|
||||
menubar.render();
|
||||
|
||||
YAHOO.util.Event.on('add', 'click', function () {
|
||||
menubar.subscribe('click', handleClick);
|
||||
YAHOO.util.Dom.get('log').value += "Subscribed to click events\n";
|
||||
});
|
||||
|
||||
YAHOO.util.Event.on('remove', 'click', function () {
|
||||
menubar.unsubscribe('click', handleClick);
|
||||
YAHOO.util.Dom.get('log').value += "Unsubscribed from click events\n";
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
1752
www/extras/yui/tests/menu/tests/menu.html
Normal file
1752
www/extras/yui/tests/menu/tests/menu.html
Normal file
File diff suppressed because it is too large
Load diff
242
www/extras/yui/tests/menu/tests/visited-link-test.html
Normal file
242
www/extras/yui/tests/menu/tests/visited-link-test.html
Normal file
|
|
@ -0,0 +1,242 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
||||
"http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title>Example: Website Top Nav With Submenus Built From Markup (YUI Library)</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../../../build/reset-fonts-grids/reset-fonts-grids.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../../build/menu/assets/skins/sam/menu.css">
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
a:visited {
|
||||
color: yellow;
|
||||
}
|
||||
|
||||
div.yui-b p {
|
||||
|
||||
margin: 0 0 .5em 0;
|
||||
color: #999;
|
||||
|
||||
}
|
||||
|
||||
div.yui-b p strong {
|
||||
|
||||
font-weight: bold;
|
||||
color: #000;
|
||||
|
||||
}
|
||||
|
||||
div.yui-b p em {
|
||||
|
||||
color: #000;
|
||||
|
||||
}
|
||||
|
||||
h1 {
|
||||
|
||||
font-weight: bold;
|
||||
margin: 0 0 1em 0;
|
||||
padding: .25em .5em;
|
||||
background-color: #ccc;
|
||||
|
||||
}
|
||||
|
||||
#productsandservices {
|
||||
|
||||
margin: 0 0 10px 0;
|
||||
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<script type="text/javascript" src="../../../build/yahoo-dom-event/yahoo-dom-event.js"></script>
|
||||
<script type="text/javascript" src="../../../build/container/container_core.js"></script>
|
||||
<script type="text/javascript" src="../../../build/menu/menu.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
/*
|
||||
Initialize and render the MenuBar when its elements are ready
|
||||
to be scripted.
|
||||
*/
|
||||
|
||||
YAHOO.util.Event.onContentReady("productsandservices", function () {
|
||||
|
||||
/*
|
||||
Instantiate a MenuBar: The first argument passed to the constructor
|
||||
is the id for the Menu element to be created, the second is an
|
||||
object literal of configuration properties.
|
||||
*/
|
||||
|
||||
var oMenuBar = new YAHOO.widget.MenuBar("productsandservices", {
|
||||
autosubmenudisplay: true,
|
||||
hidedelay: 750,
|
||||
lazyload: true });
|
||||
|
||||
|
||||
|
||||
/*
|
||||
Call the "render" method with no arguments since the
|
||||
markup for this MenuBar instance is already exists in
|
||||
the page.
|
||||
*/
|
||||
|
||||
oMenuBar.render();
|
||||
|
||||
oMenuBar.getItem(1).cfg.setProperty('disabled', true);
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body class="yui-skin-sam" id="yahoo-com">
|
||||
|
||||
<div id="doc" class="yui-t1">
|
||||
<div id="hd">
|
||||
<!-- start: your content here -->
|
||||
|
||||
<h1>Example: Website Top Nav With Submenus Built From Markup (YUI Library)</h1>
|
||||
|
||||
<!-- end: your content here -->
|
||||
</div>
|
||||
<div id="bd">
|
||||
|
||||
<!-- start: primary column from outer template -->
|
||||
<div id="yui-main">
|
||||
<div class="yui-b">
|
||||
<!-- start: stack grids here -->
|
||||
|
||||
<div id="productsandservices" class="yuimenubar yuimenubarnav">
|
||||
<div class="bd">
|
||||
<ul class="first-of-type">
|
||||
<li class="yuimenubaritem first-of-type"><a class="yuimenubaritemlabel" href="#communication">Communication</a>
|
||||
|
||||
<div id="communication" class="yuimenu">
|
||||
<div class="bd">
|
||||
<ul>
|
||||
<li class="yuimenuitem"><a class="yuimenuitemlabel" href="http://360.yahoo.com">360°</a></li>
|
||||
<li class="yuimenuitem"><a class="yuimenuitemlabel" href="http://alerts.yahoo.com">Alerts</a></li>
|
||||
<li class="yuimenuitem"><a class="yuimenuitemlabel" href="http://avatars.yahoo.com">Avatars</a></li>
|
||||
<li class="yuimenuitem"><a class="yuimenuitemlabel" href="http://groups.yahoo.com">Groups</a></li>
|
||||
<li class="yuimenuitem"><a class="yuimenuitemlabel" href="http://promo.yahoo.com/broadband/">Internet Access</a></li>
|
||||
<li class="yuimenuitem"><a class="yuimenuitemlabel" href="#">PIM</a>
|
||||
|
||||
<div id="pim" class="yuimenu">
|
||||
<div class="bd">
|
||||
<ul class="first-of-type">
|
||||
<li class="yuimenuitem"><a class="yuimenuitemlabel" href="http://mail.yahoo.com">Yahoo! Mail</a></li>
|
||||
<li class="yuimenuitem"><a class="yuimenuitemlabel" href="http://addressbook.yahoo.com">Yahoo! Address Book</a></li>
|
||||
<li class="yuimenuitem"><a class="yuimenuitemlabel" href="http://calendar.yahoo.com">Yahoo! Calendar</a></li>
|
||||
<li class="yuimenuitem"><a class="yuimenuitemlabel" href="http://notepad.yahoo.com">Yahoo! Notepad</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
<li class="yuimenuitem"><a class="yuimenuitemlabel" href="http://members.yahoo.com">Member Directory</a></li>
|
||||
<li class="yuimenuitem"><a class="yuimenuitemlabel" href="http://messenger.yahoo.com">Messenger</a></li>
|
||||
<li class="yuimenuitem"><a class="yuimenuitemlabel" href="http://mobile.yahoo.com">Mobile</a></li>
|
||||
<li class="yuimenuitem"><a class="yuimenuitemlabel" href="http://www.flickr.com">Flickr Photo Sharing</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
<li class="yuimenubaritem"><a class="yuimenubaritemlabel" href="http://shopping.yahoo.com">Shopping</a>
|
||||
|
||||
<div id="shopping" class="yuimenu">
|
||||
<div class="bd">
|
||||
<ul>
|
||||
<li class="yuimenuitem"><a class="yuimenuitemlabel" href="http://auctions.shopping.yahoo.com">Auctions</a></li>
|
||||
<li class="yuimenuitem"><a class="yuimenuitemlabel" href="http://autos.yahoo.com">Autos</a></li>
|
||||
<li class="yuimenuitem"><a class="yuimenuitemlabel" href="http://classifieds.yahoo.com">Classifieds</a></li>
|
||||
<li class="yuimenuitem"><a class="yuimenuitemlabel" href="http://shopping.yahoo.com/b:Flowers%20%26%20Gifts:20146735">Flowers & Gifts</a></li>
|
||||
<li class="yuimenuitem"><a class="yuimenuitemlabel" href="http://realestate.yahoo.com">Real Estate</a></li>
|
||||
<li class="yuimenuitem"><a class="yuimenuitemlabel" href="http://travel.yahoo.com">Travel</a></li>
|
||||
<li class="yuimenuitem"><a class="yuimenuitemlabel" href="http://wallet.yahoo.com">Wallet</a></li>
|
||||
<li class="yuimenuitem"><a class="yuimenuitemlabel" href="http://yp.yahoo.com">Yellow Pages</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
<li class="yuimenubaritem"><a class="yuimenubaritemlabel" href="http://entertainment.yahoo.com">Entertainment</a>
|
||||
|
||||
<div id="entertainment" class="yuimenu">
|
||||
<div class="bd">
|
||||
<ul>
|
||||
<li class="yuimenuitem"><a class="yuimenuitemlabel" href="http://fantasysports.yahoo.com">Fantasy Sports</a></li>
|
||||
<li class="yuimenuitem"><a class="yuimenuitemlabel" href="http://games.yahoo.com">Games</a></li>
|
||||
<li class="yuimenuitem"><a class="yuimenuitemlabel" href="http://www.yahooligans.com">Kids</a></li>
|
||||
<li class="yuimenuitem"><a class="yuimenuitemlabel" href="http://music.yahoo.com">Music</a></li>
|
||||
<li class="yuimenuitem"><a class="yuimenuitemlabel" href="http://movies.yahoo.com">Movies</a></li>
|
||||
<li class="yuimenuitem"><a class="yuimenuitemlabel" href="http://music.yahoo.com/launchcast">Radio</a></li>
|
||||
<li class="yuimenuitem"><a class="yuimenuitemlabel" href="http://travel.yahoo.com">Travel</a></li>
|
||||
<li class="yuimenuitem"><a class="yuimenuitemlabel" href="http://tv.yahoo.com">TV</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
<li class="yuimenubaritem"><a class="yuimenubaritemlabel" href="#information">Information</a>
|
||||
|
||||
<div id="information" class="yuimenu">
|
||||
<div class="bd">
|
||||
<ul>
|
||||
<li class="yuimenuitem"><a class="yuimenuitemlabel" href="http://downloads.yahoo.com">Downloads</a></li>
|
||||
<li class="yuimenuitem"><a class="yuimenuitemlabel" href="http://finance.yahoo.com">Finance</a></li>
|
||||
<li class="yuimenuitem"><a class="yuimenuitemlabel" href="http://health.yahoo.com">Health</a></li>
|
||||
<li class="yuimenuitem"><a class="yuimenuitemlabel" href="http://local.yahoo.com">Local</a></li>
|
||||
<li class="yuimenuitem"><a class="yuimenuitemlabel" href="http://maps.yahoo.com">Maps & Directions</a></li>
|
||||
<li class="yuimenuitem"><a class="yuimenuitemlabel" href="http://my.yahoo.com">My Yahoo!</a></li>
|
||||
<li class="yuimenuitem"><a class="yuimenuitemlabel" href="http://news.yahoo.com">News</a></li>
|
||||
<li class="yuimenuitem"><a class="yuimenuitemlabel" href="http://search.yahoo.com">Search</a></li>
|
||||
<li class="yuimenuitem"><a class="yuimenuitemlabel" href="http://smallbusiness.yahoo.com">Small Business</a></li>
|
||||
<li class="yuimenuitem"><a class="yuimenuitemlabel" href="http://weather.yahoo.com">Weather</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p id="note"><strong>NOTE:</strong> <em>This example demonstrates how to add submenus to a menu bar using existing markup.</em></p>
|
||||
|
||||
<form name="example">
|
||||
<select name="test">
|
||||
<option value="one">One</option>
|
||||
<option value="two">Two</option>
|
||||
<option value="three">Three</option>
|
||||
</select>
|
||||
</form>
|
||||
|
||||
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas sit amet metus. Nunc quam elit, posuere nec, auctor in, rhoncus quis, dui. Aliquam erat volutpat. Ut dignissim, massa sit amet dignissim cursus, quam lacus feugiat dolor, id aliquam leo tortor eget odio. Pellentesque orci arcu, eleifend at, iaculis sit amet, posuere eu, lorem. Aliquam erat volutpat. Phasellus vulputate. Vivamus id erat. Nulla facilisi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Nunc gravida. Ut euismod, tortor eget convallis ullamcorper, arcu odio egestas pede, ut ornare urna elit vitae mauris. Aenean ullamcorper eros a lacus. Curabitur egestas tempus lectus. Donec et lectus et purus dapibus feugiat. Sed sit amet diam. Etiam ipsum leo, facilisis ac, rutrum nec, dignissim quis, tellus. Sed eleifend.</p>
|
||||
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas sit amet metus. Nunc quam elit, posuere nec, auctor in, rhoncus quis, dui. Aliquam erat volutpat. Ut dignissim, massa sit amet dignissim cursus, quam lacus feugiat dolor, id aliquam leo tortor eget odio. Pellentesque orci arcu, eleifend at, iaculis sit amet, posuere eu, lorem. Aliquam erat volutpat. Phasellus vulputate. Vivamus id erat. Nulla facilisi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Nunc gravida. Ut euismod, tortor eget convallis ullamcorper, arcu odio egestas pede, ut ornare urna elit vitae mauris. Aenean ullamcorper eros a lacus. Curabitur egestas tempus lectus. Donec et lectus et purus dapibus feugiat. Sed sit amet diam. Etiam ipsum leo, facilisis ac, rutrum nec, dignissim quis, tellus. Sed eleifend.</p>
|
||||
|
||||
<!-- end: stack grids here -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- end: primary column from outer template -->
|
||||
|
||||
<!-- start: secondary column from outer template -->
|
||||
<div class="yui-b">
|
||||
|
||||
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas sit amet metus. Nunc quam elit, posuere nec, auctor in, rhoncus quis, dui. Aliquam erat volutpat. Ut dignissim, massa sit amet dignissim cursus, quam lacus feugiat dolor, id aliquam leo tortor eget odio. Pellentesque orci arcu, eleifend at, iaculis sit amet, posuere eu, lorem. Aliquam erat volutpat. Phasellus vulputate. Vivamus id erat. Nulla facilisi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Nunc gravida. Ut euismod, tortor eget convallis ullamcorper, arcu odio egestas pede, ut ornare urna elit vitae mauris. Aenean ullamcorper eros a lacus. Curabitur egestas tempus lectus. Donec et lectus et purus dapibus feugiat. Sed sit amet diam. Etiam ipsum leo, facilisis ac, rutrum nec, dignissim quis, tellus. Sed eleifend.</p>
|
||||
|
||||
</div>
|
||||
<!-- end: secondary column from outer template -->
|
||||
</div>
|
||||
<div id="ft">
|
||||
|
||||
<p>FOOTER: Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas sit amet metus. Nunc quam elit, posuere nec, auctor in, rhoncus quis, dui. Aliquam erat volutpat. Ut dignissim, massa sit amet dignissim cursus, quam lacus feugiat.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue