upgraded to yui 0.12.0
upgraded to yui-ext 0.33 rc2
This commit is contained in:
parent
62b3d90db7
commit
cfd09a5cb6
1271 changed files with 539033 additions and 0 deletions
152
www/extras/yui/examples/container/overlaymanager/1.html
Normal file
152
www/extras/yui/examples/container/overlaymanager/1.html
Normal file
|
|
@ -0,0 +1,152 @@
|
|||
<!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>YUI Container - Using OverlayManager (YUI Library)</title>
|
||||
|
||||
<link type="text/css" rel="stylesheet" href="../../../build/reset-fonts-grids/reset-fonts-grids.css">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../../../docs/assets/dpSyntaxHighlighter.css">
|
||||
<link type="text/css" rel="stylesheet" href="../assets/style.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="doc3" class="yui-t5">
|
||||
<div id="hd">
|
||||
<a href="http://developer.yahoo.com/yui" id="logo"><div></div></a>
|
||||
<h1>YUI Container: Using OverlayManager</h1>
|
||||
</div>
|
||||
|
||||
<div id="bd">
|
||||
|
||||
<div id="toc" class="yui-b">
|
||||
<ul>
|
||||
<li class="sect"><a href="../index.html">YUI Container: Tutorials</a></li>
|
||||
|
||||
<li class="item"><a href="../module/1.html">Module: Quickstart</a></li>
|
||||
<li class="item"><a href="../overlay/1.html">Overlay: Quickstart</a></li>
|
||||
<li class="item"><a href="../tooltip/1.html">Tooltip: Quickstart</a></li>
|
||||
<li class="item"><a href="../tooltipmulti/1.html">Tooltip: One Tooltip, Many Elements</a></li>
|
||||
<li class="item"><a href="../panel/1.html">Panel: Quickstart</a></li>
|
||||
<li class="item"><a href="../panelskin/1.html">Panel: Advanced Skinning using CSS</a></li>
|
||||
<li class="item"><a href="../panelwait/1.html">Panel: Creating a 'Loading' Popup</a></li>
|
||||
<li class="item"><a href="../panelphotobox/1.html">PhotoBox: Subclassing Panel</a></li>
|
||||
<li class="item"><a href="../panelresize/1.html">ResizePanel: Creating a Resizable Panel</a></li>
|
||||
<li class="item"><a href="../dialog/1.html">Dialog Quickstart</a></li>
|
||||
<li class="item"><a href="../simpledialog/1.html">SimpleDialog Quickstart</a></li>
|
||||
<li class="item"><a href="../effect/1.html">Using ContainerEffect</a></li>
|
||||
<li class="item selected"><a href="1.html">Using OverlayManager</a></li>
|
||||
<li class="child active"><a href="1.html">Managing Overlay Focus & Blur</a></li>
|
||||
<li class="child"><a href="2.html">Functional Example</a></li>
|
||||
<li class="item"><a href="../keylistener/1.html">Using KeyListener</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="yui-main">
|
||||
<div class="yui-b">
|
||||
<h1 class="first">Managing Overlay Focus & Blur</h1>
|
||||
|
||||
<p>OverlayManager provides an easy way to manage multiple Overlays and keep track of which Overlay is currently in focus. When you register an Overlay with the OverlayManager, it is augmented with <em>focus</em> and <em>blur</em>, as well as two additional events, <em>focusEvent</em> and <em>blurEvent</em>. By default, clicking on an Overlay that is registered with the OverlayManager will bring it to the top by setting its z-index higher than all the other registered Overlays and will add the CSS class "focused" to its element.</p>
|
||||
|
||||
<p>In this tutorial, we will build three separate Panels and register them with an OverlayManager. To begin, we will instantiate three Panels that are hidden by default and render them:</p>
|
||||
|
||||
<textarea name="code" class="JScript" cols="60" rows="1">
|
||||
// Build panel1 based on markup
|
||||
YAHOO.example.container.panel1 = new YAHOO.widget.Panel("panel1", { xy:[150,100],
|
||||
visible:false,
|
||||
width:"300px"
|
||||
} );
|
||||
YAHOO.example.container.panel1.render();
|
||||
|
||||
// Build panel2 based on markup
|
||||
YAHOO.example.container.panel2 = new YAHOO.widget.Panel("panel2", { xy:[250,200],
|
||||
visible:false,
|
||||
width:"300px"
|
||||
} );
|
||||
YAHOO.example.container.panel2.render();
|
||||
|
||||
// Build panel3 based on markup
|
||||
YAHOO.example.container.panel3 = new YAHOO.widget.Panel("panel3", { xy:[350,300],
|
||||
visible:false,
|
||||
width:"300px"
|
||||
} );
|
||||
YAHOO.example.container.panel3.render();
|
||||
</textarea>
|
||||
|
||||
<p>Next, we will instantiate a new OverlayManager and register the Panels as an array:</p>
|
||||
|
||||
<textarea name="code" class="JScript" cols="60" rows="1">
|
||||
YAHOO.example.container.manager = new YAHOO.widget.OverlayManager();
|
||||
YAHOO.example.container.manager.register([YAHOO.example.container.panel1,
|
||||
YAHOO.example.container.panel2,
|
||||
YAHOO.example.container.panel3]);
|
||||
</textarea>
|
||||
|
||||
<p>Each of the Panels is then automatically augmented with focus and blur methods and events. Each Panel will be automatically focused when clicked, but we can also wire up buttons to focus and blur our Panels. The OverlayManager also has <em>showAll</em>, <em>hideAll</em>, and <em>blurAll</em> methods:</p>
|
||||
|
||||
<textarea name="code" class="HTML" cols="60" rows="1">
|
||||
<div>
|
||||
panel1:
|
||||
<button id="show1">Show</button>
|
||||
<button id="hide1">Hide</button>
|
||||
<button id="focus1">Focus</button>
|
||||
</div>
|
||||
<div>
|
||||
panel2:
|
||||
<button id="show2">Show</button>
|
||||
<button id="hide2">Hide</button>
|
||||
<button id="focus2">Focus</button>
|
||||
</div>
|
||||
<div>
|
||||
panel3:
|
||||
<button id="show3">Show</button>
|
||||
<button id="hide3">Hide</button>
|
||||
<button id="focus3">Focus</button>
|
||||
</div>
|
||||
<div>
|
||||
All Panels:
|
||||
<button id="showAll">Show All</button>
|
||||
<button id="hideAll">Hide All</button>
|
||||
<button id="blurAll">Blur All</button>
|
||||
</div>
|
||||
</textarea>
|
||||
|
||||
|
||||
<p>Finally, we will place the basic markup for our Panels, which looks identical to much of the standard module markup we've seen in previous tutorials. Note that we set the "visibility:hidden" style inline on these Panels because we don't want them to flash before they are hidden by default. Setting the style inline ensures that the Panels will not be seen in the browser until they are made visible.</p>
|
||||
|
||||
<textarea name="code" class="HTML" cols="60" rows="1">
|
||||
<div id="panel1" style="visibility:hidden">
|
||||
<div class="hd">Panel #1 from Markup</div>
|
||||
<div class="bd">This is a Panel that was marked up in the document.</div>
|
||||
<div class="ft">End of Panel #1</div>
|
||||
</div>
|
||||
|
||||
<div id="panel2" style="visibility:hidden">
|
||||
<div class="hd">Panel #2 from Markup</div>
|
||||
<div class="bd">This is a Panel that was marked up in the document.</div>
|
||||
<div class="ft">End of Panel #2</div>
|
||||
</div>
|
||||
|
||||
<div id="panel3" style="visibility:hidden">
|
||||
<div class="hd">Panel #3 from Markup</div>
|
||||
<div class="bd">This is a Panel that was marked up in the document.</div>
|
||||
<div class="ft">End of Panel #3</div>
|
||||
</div>
|
||||
</textarea>
|
||||
<div id="stepnav">
|
||||
<a class="next" href="2.html">Continue to <em>Functional Example</em> ></a> </div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="ft"> </div>
|
||||
</div>
|
||||
|
||||
<script src="../../../docs/assets/dpSyntaxHighlighter.js"></script>
|
||||
<script language="javascript">
|
||||
dp.SyntaxHighlighter.HighlightAll('code');
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
71
www/extras/yui/examples/container/overlaymanager/2.html
Normal file
71
www/extras/yui/examples/container/overlaymanager/2.html
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
<!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>YUI Container - Using OverlayManager (YUI Library)</title>
|
||||
|
||||
<link type="text/css" rel="stylesheet" href="../../../build/reset-fonts-grids/reset-fonts-grids.css">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../../../docs/assets/dpSyntaxHighlighter.css">
|
||||
<link type="text/css" rel="stylesheet" href="../assets/style.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="doc3" class="yui-t5">
|
||||
<div id="hd">
|
||||
<a href="http://developer.yahoo.com/yui" id="logo"><div></div></a>
|
||||
<h1>YUI Container: Using OverlayManager</h1>
|
||||
</div>
|
||||
|
||||
<div id="bd">
|
||||
|
||||
<div id="toc" class="yui-b">
|
||||
<ul>
|
||||
<li class="sect"><a href="../index.html">YUI Container: Tutorials</a></li>
|
||||
|
||||
<li class="item"><a href="../module/1.html">Module: Quickstart</a></li>
|
||||
<li class="item"><a href="../overlay/1.html">Overlay: Quickstart</a></li>
|
||||
<li class="item"><a href="../tooltip/1.html">Tooltip: Quickstart</a></li>
|
||||
<li class="item"><a href="../tooltipmulti/1.html">Tooltip: One Tooltip, Many Elements</a></li>
|
||||
<li class="item"><a href="../panel/1.html">Panel: Quickstart</a></li>
|
||||
<li class="item"><a href="../panelskin/1.html">Panel: Advanced Skinning using CSS</a></li>
|
||||
<li class="item"><a href="../panelwait/1.html">Panel: Creating a 'Loading' Popup</a></li>
|
||||
<li class="item"><a href="../panelphotobox/1.html">PhotoBox: Subclassing Panel</a></li>
|
||||
<li class="item"><a href="../panelresize/1.html">ResizePanel: Creating a Resizable Panel</a></li>
|
||||
<li class="item"><a href="../dialog/1.html">Dialog Quickstart</a></li>
|
||||
<li class="item"><a href="../simpledialog/1.html">SimpleDialog Quickstart</a></li>
|
||||
<li class="item"><a href="../effect/1.html">Using ContainerEffect</a></li>
|
||||
<li class="item selected"><a href="1.html">Using OverlayManager</a></li>
|
||||
<li class="child"><a href="1.html">Managing Overlay Focus & Blur</a></li>
|
||||
<li class="child active"><a href="2.html">Functional Example</a></li>
|
||||
<li class="item"><a href="../keylistener/1.html">Using KeyListener</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="yui-main">
|
||||
<div class="yui-b">
|
||||
<h1 class="first">Functional Example</h1>
|
||||
|
||||
<p>You can see the full example in action below:</p>
|
||||
|
||||
<div id="solution" style="">
|
||||
<iframe src="solution.html" style="width:96%;height:325px"></iframe>
|
||||
<a href="solution.html" target="_blank">Open this example in a new window</a>
|
||||
</div>
|
||||
<div id="stepnav">
|
||||
<a class="back" href="1.html">< Back to <em>Managing Overlay Focus & Blur</em></a> </div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="ft"> </div>
|
||||
</div>
|
||||
|
||||
<script src="../../../docs/assets/dpSyntaxHighlighter.js"></script>
|
||||
<script language="javascript">
|
||||
dp.SyntaxHighlighter.HighlightAll('code');
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
118
www/extras/yui/examples/container/overlaymanager/solution.html
Normal file
118
www/extras/yui/examples/container/overlaymanager/solution.html
Normal file
|
|
@ -0,0 +1,118 @@
|
|||
<!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">
|
||||
<link type="text/css" rel="stylesheet" href="../../../build/reset/reset.css">
|
||||
<link type="text/css" rel="stylesheet" href="../../../build/fonts/fonts.css">
|
||||
|
||||
<script type="text/javascript" src="../../../build/yahoo/yahoo.js"></script>
|
||||
<script type="text/javascript" src="../../../build/event/event.js" ></script>
|
||||
<script type="text/javascript" src="../../../build/dom/dom.js" ></script>
|
||||
<script type="text/javascript" src="../../../build/dragdrop/dragdrop.js"></script>
|
||||
|
||||
<script type="text/javascript" src="../../../build/container/container.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="../../../build/container/assets/container.css">
|
||||
|
||||
<style>
|
||||
body { background-color:#eee }
|
||||
.panel-container.focused .hd { background-color:red; }
|
||||
</style>
|
||||
|
||||
<script>
|
||||
YAHOO.namespace("example.container");
|
||||
|
||||
function init() {
|
||||
// Build panel1 based on markup
|
||||
YAHOO.example.container.panel1 = new YAHOO.widget.Panel("panel1", { xy:[150,100],
|
||||
visible:false,
|
||||
width:"300px"
|
||||
} );
|
||||
YAHOO.example.container.panel1.render();
|
||||
|
||||
// Build panel2 based on markup
|
||||
YAHOO.example.container.panel2 = new YAHOO.widget.Panel("panel2", { xy:[250,200],
|
||||
visible:false,
|
||||
width:"300px"
|
||||
} );
|
||||
YAHOO.example.container.panel2.render();
|
||||
|
||||
// Build panel3 based on markup
|
||||
YAHOO.example.container.panel3 = new YAHOO.widget.Panel("panel3", { xy:[350,300],
|
||||
visible:false,
|
||||
width:"300px"
|
||||
} );
|
||||
YAHOO.example.container.panel3.render();
|
||||
|
||||
YAHOO.example.container.manager = new YAHOO.widget.OverlayManager();
|
||||
YAHOO.example.container.manager.register([YAHOO.example.container.panel1,
|
||||
YAHOO.example.container.panel2,
|
||||
YAHOO.example.container.panel3]);
|
||||
|
||||
YAHOO.util.Event.addListener("show1", "click", YAHOO.example.container.panel1.show, YAHOO.example.container.panel1, true);
|
||||
YAHOO.util.Event.addListener("hide1", "click", YAHOO.example.container.panel1.hide, YAHOO.example.container.panel1, true);
|
||||
YAHOO.util.Event.addListener("focus1", "click", YAHOO.example.container.panel1.focus, YAHOO.example.container.panel1, true);
|
||||
|
||||
YAHOO.util.Event.addListener("show2", "click", YAHOO.example.container.panel2.show, YAHOO.example.container.panel2, true);
|
||||
YAHOO.util.Event.addListener("hide2", "click", YAHOO.example.container.panel2.hide, YAHOO.example.container.panel2, true);
|
||||
YAHOO.util.Event.addListener("focus2", "click", YAHOO.example.container.panel2.focus, YAHOO.example.container.panel2, true);
|
||||
|
||||
YAHOO.util.Event.addListener("show3", "click", YAHOO.example.container.panel3.show, YAHOO.example.container.panel3, true);
|
||||
YAHOO.util.Event.addListener("hide3", "click", YAHOO.example.container.panel3.hide, YAHOO.example.container.panel3, true);
|
||||
YAHOO.util.Event.addListener("focus3", "click", YAHOO.example.container.panel3.focus, YAHOO.example.container.panel3, true);
|
||||
|
||||
YAHOO.util.Event.addListener("showAll", "click", YAHOO.example.container.manager.showAll, YAHOO.example.container.manager, true);
|
||||
YAHOO.util.Event.addListener("hideAll", "click", YAHOO.example.container.manager.hideAll, YAHOO.example.container.manager, true);
|
||||
YAHOO.util.Event.addListener("blurAll", "click", YAHOO.example.container.manager.blurAll, YAHOO.example.container.manager, true);
|
||||
}
|
||||
|
||||
YAHOO.util.Event.addListener(window, "load", init);
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div>
|
||||
panel1:
|
||||
<button id="show1">Show</button>
|
||||
<button id="hide1">Hide</button>
|
||||
<button id="focus1">Focus</button>
|
||||
</div>
|
||||
<div>
|
||||
panel2:
|
||||
<button id="show2">Show</button>
|
||||
<button id="hide2">Hide</button>
|
||||
<button id="focus2">Focus</button>
|
||||
</div>
|
||||
<div>
|
||||
panel3:
|
||||
<button id="show3">Show</button>
|
||||
<button id="hide3">Hide</button>
|
||||
<button id="focus3">Focus</button>
|
||||
</div>
|
||||
<div>
|
||||
All Panels:
|
||||
<button id="showAll">Show All</button>
|
||||
<button id="hideAll">Hide All</button>
|
||||
<button id="blurAll">Blur All</button>
|
||||
</div>
|
||||
|
||||
<div id="panel1" style="visibility:hidden">
|
||||
<div class="hd">Panel #1 from Markup</div>
|
||||
<div class="bd">This is a Panel that was marked up in the document.</div>
|
||||
<div class="ft">End of Panel #1</div>
|
||||
</div>
|
||||
|
||||
<div id="panel2" style="visibility:hidden">
|
||||
<div class="hd">Panel #2 from Markup</div>
|
||||
<div class="bd">This is a Panel that was marked up in the document.</div>
|
||||
<div class="ft">End of Panel #2</div>
|
||||
</div>
|
||||
|
||||
<div id="panel3" style="visibility:hidden">
|
||||
<div class="hd">Panel #3 from Markup</div>
|
||||
<div class="bd">This is a Panel that was marked up in the document.</div>
|
||||
<div class="ft">End of Panel #3</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue