2150 |
mathias |
1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
|
|
2 |
"http://www.w3.org/TR/html4/strict.dtd">
|
|
|
3 |
<html>
|
|
|
4 |
<head>
|
|
|
5 |
<title>dojox.layout.FloatPane - simplest extension on TitlePane ... ever.</title>
|
|
|
6 |
|
|
|
7 |
<script type="text/javascript" src="../../../dojo/dojo.js" djConfig="isDebug:true, parseOnLoad: true" ></script>
|
|
|
8 |
<script type="text/javascript" src="../../../dijit/tests/_testCommon.js"></script>
|
|
|
9 |
<script type="text/javascript" src="../FloatingPane.js"></script>
|
|
|
10 |
<script type="text/javascript">
|
|
|
11 |
// dojo.require("dojox.layout.FloatingPane");
|
|
|
12 |
dojo.require("dijit.form.ComboBox");
|
|
|
13 |
dojo.require("dijit.form.Button");
|
|
|
14 |
dojo.require("dojo.parser"); // scan page for widgets
|
|
|
15 |
</script>
|
|
|
16 |
<style type="text/css">
|
|
|
17 |
@import "../../../dojo/resources/dojo.css";
|
|
|
18 |
@import "../../../dijit/themes/dijit.css";
|
|
|
19 |
@import "../../../dijit/themes/tundra/tundra.css";
|
|
|
20 |
@import "../../../dijit/tests/css/dijitTests.css";
|
|
|
21 |
@import "../resources/FloatingPane.css";
|
|
|
22 |
@import "../resources/ResizeHandle.css";
|
|
|
23 |
|
|
|
24 |
/* body { background:url('gridUnderlay.png') top left; } */
|
|
|
25 |
|
|
|
26 |
.alternateDock {
|
|
|
27 |
position:absolute;
|
|
|
28 |
background-color:#ededed;
|
|
|
29 |
right:0px; top:0px;
|
|
|
30 |
border-left:1px solid #ccc;
|
|
|
31 |
height:100%;
|
|
|
32 |
|
|
|
33 |
}
|
|
|
34 |
#alternateDock ul.dojoxDockList { display:block; }
|
|
|
35 |
.testFixedSize {
|
|
|
36 |
width:300px;
|
|
|
37 |
height:200px;
|
|
|
38 |
padding:7px;
|
|
|
39 |
}
|
|
|
40 |
</style>
|
|
|
41 |
<script type="text/javascript">
|
|
|
42 |
|
|
|
43 |
function makeFloater() {
|
|
|
44 |
// programatically created FloatingPane with srcNode ref
|
|
|
45 |
var tmp = new dojox.layout.FloatingPane({
|
|
|
46 |
title: "dynamically created ...",
|
|
|
47 |
id:"floater3",
|
|
|
48 |
closeable:true,
|
|
|
49 |
resizable:true,
|
|
|
50 |
dockable: false
|
|
|
51 |
},"nonFloater");
|
|
|
52 |
tmp.startup();
|
|
|
53 |
}
|
|
|
54 |
|
|
|
55 |
var mi = 1;
|
|
|
56 |
function brandNewFloater(){
|
|
|
57 |
var node = document.createElement('div');
|
|
|
58 |
node.innerHTML = dojo.byId('contentHolder').innerHTML;
|
|
|
59 |
dojo.body().appendChild(node);
|
|
|
60 |
dojo.addClass(node,"testFixedSize");
|
|
|
61 |
var tmp = new dojox.layout.FloatingPane({
|
|
|
62 |
title:" New Floater #"+(mi++),
|
|
|
63 |
dockable: false,
|
|
|
64 |
maxable: true,
|
|
|
65 |
closable: true,
|
|
|
66 |
resizable: false
|
|
|
67 |
},node);
|
|
|
68 |
tmp.startup();
|
|
|
69 |
tmp.resize({ w:300, h:175 });
|
|
|
70 |
}
|
|
|
71 |
|
|
|
72 |
var vpx, vpy = null;
|
|
|
73 |
dojo.addOnLoad(makeFloater);
|
|
|
74 |
|
|
|
75 |
</script>
|
|
|
76 |
|
|
|
77 |
</head>
|
|
|
78 |
<body>
|
|
|
79 |
|
|
|
80 |
|
|
|
81 |
<a href="javascript:dijit.byId('floater1').hide()">hide first pane</a> |
|
|
|
82 |
<a href="javascript:dijit.byId('floater1').show()">show first pane</a> |
|
|
|
83 |
<a href="javascript:dijit.byId('floater1').minimize()">minimize 'uncloseable, dockable' pane pane</a> |
|
|
|
84 |
<a href="javascript:brandNewFloater()">new floater</a>
|
|
|
85 |
|
|
|
86 |
<div dojoType="dojox.layout.FloatingPane" title="Floater test ... " resizable="true" id="floater1" style="width:200px;" duration="300">
|
|
|
87 |
<p style="margin:0; padding:10px;">I am the content to be floated around</p>
|
|
|
88 |
</div>
|
|
|
89 |
|
|
|
90 |
<div dojoType="dojox.layout.FloatingPane" title="un-closable, dockable" style="width:200px; position:absolute; " closable="false" id="floater2">
|
|
|
91 |
<p style="padding:8px; margin:0;">
|
|
|
92 |
I am dockable, though I have no dockTo="" attribute. I will create or use an existing dock
|
|
|
93 |
on the bottom of the screen.
|
|
|
94 |
<br><br>
|
|
|
95 |
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. In porta. Etiam mattis libero nec ante. Nam
|
|
|
96 |
porta lacus eu ligula. Cras mauris. Suspendisse vel augue. Vivamus aliquam orci ut eros. Nunc
|
|
|
97 |
eleifend sagittis turpis. purus purus in nibh. Phasellus in nunc.
|
|
|
98 |
</p>
|
|
|
99 |
</div>
|
|
|
100 |
|
|
|
101 |
<div id="nonFloater" style="width:200px;" duration="750" >
|
|
|
102 |
<p style="padding:8x; margin:2px;">
|
|
|
103 |
I am made into a FloatingPane in dojo.addOnLoad();<br><br>
|
|
|
104 |
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. In porta. Etiam mattis libero nec ante. Nam
|
|
|
105 |
porta lacus eu ligula. Cras mauris. Suspendisse vel augue. Vivamus aliquam orci ut eros. Nunc eleifend
|
|
|
106 |
sagittis turpis. purus purus in nibh. Phasellus in nunc.
|
|
|
107 |
</p>
|
|
|
108 |
</div>
|
|
|
109 |
|
|
|
110 |
<div title="Alt Dock 1" style="width:100px; height:100px; float:left;"
|
|
|
111 |
dojoType="dojox.layout.FloatingPane" duration="350" resizable="true"
|
|
|
112 |
dockTo="alternateDock" executeScripts="true" href="_script.html">
|
|
|
113 |
</div>
|
|
|
114 |
<div title="Alt Dock 2" dojoType="dojox.layout.FloatingPane" resizable="true" style="width:200px; float:left;" duration="350" dockTo="alternateDock">
|
|
|
115 |
<p style="color:#666; padding:8px; margin:0;">
|
|
|
116 |
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. In porta. Etiam mattis libero nec ante. Nam
|
|
|
117 |
porta lacus eu ligula. Cras mauris. Suspendisse vel augue. Vivamus aliquam orci ut eros. Nunc eleifend
|
|
|
118 |
sagittis turpis. purus purus in nibh. Phasellus in nunc.
|
|
|
119 |
</p>
|
|
|
120 |
</div>
|
|
|
121 |
|
|
|
122 |
|
|
|
123 |
<div dojoType="dojox.layout.FloatingPane"
|
|
|
124 |
resizeable="false" style="width:200px; margin:0; background:#ccc; " title="foobar"
|
|
|
125 |
closable="false" dockable="false"><p style="padding:12px;">
|
|
|
126 |
This is just a pane. You cannot close me, you cannot resize me, you cannot minimize me.
|
|
|
127 |
</p>
|
|
|
128 |
</div>
|
|
|
129 |
|
|
|
130 |
<div dojoType="dojox.layout.FloatingPane"
|
|
|
131 |
title="remote pane" href="../../../dijit/tests/layout/doc0.html"
|
|
|
132 |
style="width:250px; height:250px; background:#fff; margin:0; "
|
|
|
133 |
></div>
|
|
|
134 |
|
|
|
135 |
<div dojoType="dojox.layout.Dock" id="alternateDock" class="alternateDock"></div>
|
|
|
136 |
|
|
|
137 |
<div style="display:none;" id="contentHolder"><p style="padding:13px; margin:0;">
|
|
|
138 |
I am content. I am hidden right now. This content is used to populate the newly created
|
|
|
139 |
node being attached to the DOM to insert a new FloatingPane without a srcNodeRef. This
|
|
|
140 |
node is not being manipulated, just having it's innerHTML read. For demonstration purposes.
|
|
|
141 |
</p>
|
|
|
142 |
</div>
|
|
|
143 |
</body>
|
|
|
144 |
</html>
|