123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144 |
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
- "http://www.w3.org/TR/html4/strict.dtd">
- <html>
- <head>
- <title>dojox.layout.FloatPane - simplest extension on TitlePane ... ever.</title>
-
- <script type="text/javascript" src="../../../dojo/dojo.js" djConfig="isDebug:true, parseOnLoad: true" ></script>
- <script type="text/javascript" src="../../../dijit/tests/_testCommon.js"></script>
- <script type="text/javascript" src="../FloatingPane.js"></script>
- <script type="text/javascript">
- // dojo.require("dojox.layout.FloatingPane");
- dojo.require("dijit.form.ComboBox");
- dojo.require("dijit.form.Button");
- dojo.require("dojo.parser"); // scan page for widgets
- </script>
- <style type="text/css">
- @import "../../../dojo/resources/dojo.css";
- @import "../../../dijit/themes/dijit.css";
- @import "../../../dijit/themes/tundra/tundra.css";
- @import "../../../dijit/tests/css/dijitTests.css";
- @import "../resources/FloatingPane.css";
- @import "../resources/ResizeHandle.css";
- /* body { background:url('gridUnderlay.png') top left; } */
- .alternateDock {
- position:absolute;
- background-color:#ededed;
- right:0px; top:0px;
- border-left:1px solid #ccc;
- height:100%;
-
- }
- #alternateDock ul.dojoxDockList { display:block; }
- .testFixedSize {
- width:300px;
- height:200px;
- padding:7px;
- }
- </style>
- <script type="text/javascript">
- function makeFloater() {
- // programatically created FloatingPane with srcNode ref
- var tmp = new dojox.layout.FloatingPane({
- title: "dynamically created ...",
- id:"floater3",
- closeable:true,
- resizable:true,
- dockable: false
- },"nonFloater");
- tmp.startup();
- }
- var mi = 1;
- function brandNewFloater(){
- var node = document.createElement('div');
- node.innerHTML = dojo.byId('contentHolder').innerHTML;
- dojo.body().appendChild(node);
- dojo.addClass(node,"testFixedSize");
- var tmp = new dojox.layout.FloatingPane({
- title:" New Floater #"+(mi++),
- dockable: false,
- maxable: true,
- closable: true,
- resizable: false
- },node);
- tmp.startup();
- tmp.resize({ w:300, h:175 });
- }
- var vpx, vpy = null;
- dojo.addOnLoad(makeFloater);
- </script>
- </head>
- <body>
- <a href="javascript:dijit.byId('floater1').hide()">hide first pane</a> |
- <a href="javascript:dijit.byId('floater1').show()">show first pane</a> |
- <a href="javascript:dijit.byId('floater1').minimize()">minimize 'uncloseable, dockable' pane pane</a> |
- <a href="javascript:brandNewFloater()">new floater</a>
- <div dojoType="dojox.layout.FloatingPane" title="Floater test ... " resizable="true" id="floater1" style="width:200px;" duration="300">
- <p style="margin:0; padding:10px;">I am the content to be floated around</p>
- </div>
- <div dojoType="dojox.layout.FloatingPane" title="un-closable, dockable" style="width:200px; position:absolute; " closable="false" id="floater2">
- <p style="padding:8px; margin:0;">
- I am dockable, though I have no dockTo="" attribute. I will create or use an existing dock
- on the bottom of the screen.
- <br><br>
- Lorem ipsum dolor sit amet, consectetuer adipiscing elit. In porta. Etiam mattis libero nec ante. Nam
- porta lacus eu ligula. Cras mauris. Suspendisse vel augue. Vivamus aliquam orci ut eros. Nunc
- eleifend sagittis turpis. purus purus in nibh. Phasellus in nunc.
- </p>
- </div>
-
- <div id="nonFloater" style="width:200px;" duration="750" >
- <p style="padding:8x; margin:2px;">
- I am made into a FloatingPane in dojo.addOnLoad();<br><br>
- Lorem ipsum dolor sit amet, consectetuer adipiscing elit. In porta. Etiam mattis libero nec ante. Nam
- porta lacus eu ligula. Cras mauris. Suspendisse vel augue. Vivamus aliquam orci ut eros. Nunc eleifend
- sagittis turpis. purus purus in nibh. Phasellus in nunc.
- </p>
- </div>
- <div title="Alt Dock 1" style="width:100px; height:100px; float:left;"
- dojoType="dojox.layout.FloatingPane" duration="350" resizable="true"
- dockTo="alternateDock" executeScripts="true" href="_script.html">
- </div>
- <div title="Alt Dock 2" dojoType="dojox.layout.FloatingPane" resizable="true" style="width:200px; float:left;" duration="350" dockTo="alternateDock">
- <p style="color:#666; padding:8px; margin:0;">
- Lorem ipsum dolor sit amet, consectetuer adipiscing elit. In porta. Etiam mattis libero nec ante. Nam
- porta lacus eu ligula. Cras mauris. Suspendisse vel augue. Vivamus aliquam orci ut eros. Nunc eleifend
- sagittis turpis. purus purus in nibh. Phasellus in nunc.
- </p>
- </div>
-
- <div dojoType="dojox.layout.FloatingPane"
- resizeable="false" style="width:200px; margin:0; background:#ccc; " title="foobar"
- closable="false" dockable="false"><p style="padding:12px;">
- This is just a pane. You cannot close me, you cannot resize me, you cannot minimize me.
- </p>
- </div>
- <div dojoType="dojox.layout.FloatingPane"
- title="remote pane" href="../../../dijit/tests/layout/doc0.html"
- style="width:250px; height:250px; background:#fff; margin:0; "
- ></div>
- <div dojoType="dojox.layout.Dock" id="alternateDock" class="alternateDock"></div>
- <div style="display:none;" id="contentHolder"><p style="padding:13px; margin:0;">
- I am content. I am hidden right now. This content is used to populate the newly created
- node being attached to the DOM to insert a new FloatingPane without a srcNodeRef. This
- node is not being manipulated, just having it's innerHTML read. For demonstration purposes.
- </p>
- </div>
- </body>
- </html>
|