upgrade to yui 2.5.1
This commit is contained in:
parent
e00050ad1c
commit
ff7d72becc
1632 changed files with 812103 additions and 0 deletions
88
www/extras/yui/examples/container/panel_clean.html
Normal file
88
www/extras/yui/examples/container/panel_clean.html
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
<!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>Simple Panel Example</title>
|
||||
|
||||
<style type="text/css">
|
||||
/*margin and padding on body element
|
||||
can introduce errors in determining
|
||||
element position and are not recommended;
|
||||
we turn them off as a foundation for YUI
|
||||
CSS treatments. */
|
||||
body {
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
</style>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../../build/fonts/fonts-min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../../build/container/assets/skins/sam/container.css" />
|
||||
<script type="text/javascript" src="../../build/yahoo-dom-event/yahoo-dom-event.js"></script>
|
||||
<script type="text/javascript" src="../../build/dragdrop/dragdrop-min.js"></script>
|
||||
<script type="text/javascript" src="../../build/container/container-min.js"></script>
|
||||
|
||||
<!--there is no custom header content for this example-->
|
||||
|
||||
</head>
|
||||
|
||||
<body class=" yui-skin-sam">
|
||||
|
||||
<h1>Simple Panel Example</h1>
|
||||
|
||||
<div class="exampleIntro">
|
||||
<p>Use the show/hide buttons below to show and hide two simple panels. The first panel is created based on markup on the page and its <code>draggable</code> configuration is set to <code>true</code>; it can be dragged around the screen.</p>
|
||||
</div>
|
||||
|
||||
<!--BEGIN SOURCE CODE FOR EXAMPLE =============================== -->
|
||||
|
||||
<style>
|
||||
#container {height:15em;}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
YAHOO.namespace("example.container");
|
||||
|
||||
function init() {
|
||||
// Instantiate a Panel from markup
|
||||
YAHOO.example.container.panel1 = new YAHOO.widget.Panel("panel1", { width:"320px", visible:false, constraintoviewport:true } );
|
||||
YAHOO.example.container.panel1.render();
|
||||
|
||||
// Instantiate a Panel from script
|
||||
YAHOO.example.container.panel2 = new YAHOO.widget.Panel("panel2", { width:"320px", visible:false, draggable:false, close:false } );
|
||||
YAHOO.example.container.panel2.setHeader("Panel #2 from Script — This Panel Isn't Draggable");
|
||||
YAHOO.example.container.panel2.setBody("This is a dynamically generated Panel.");
|
||||
YAHOO.example.container.panel2.setFooter("End of Panel #2");
|
||||
YAHOO.example.container.panel2.render("container");
|
||||
|
||||
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("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(window, "load", init);
|
||||
</script>
|
||||
|
||||
<div id="container">
|
||||
<div>
|
||||
<button id="show1">Show panel1</button>
|
||||
<button id="hide1">Hide panel1</button>
|
||||
</div>
|
||||
|
||||
<div id="panel1">
|
||||
<div class="hd">Panel #1 from Markup — This Panel is Draggable</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>
|
||||
<button id="show2">Show panel2</button>
|
||||
<button id="hide2">Hide panel2</button>
|
||||
</div>
|
||||
</div>
|
||||
<!--END SOURCE CODE FOR EXAMPLE =============================== -->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue