2150 |
mathias |
1 |
<html>
|
|
|
2 |
<head>
|
|
|
3 |
<title>Dijit Theme Tester</title>
|
|
|
4 |
<script type="text/javascript" src="../../dojo/dojo.js"
|
|
|
5 |
djConfig="parseOnLoad: false, isDebug: true"></script>
|
|
|
6 |
<!--
|
|
|
7 |
<script type="text/javascript" src="http://prototypejs.org/assets/2007/10/16/prototype.js"></script>
|
|
|
8 |
-->
|
|
|
9 |
<script type="text/javascript" src="../dijit.js"></script>
|
|
|
10 |
<script type="text/javascript" src="../dijit-all.js"></script>
|
|
|
11 |
<script type="text/javascript">
|
|
|
12 |
// this is just a list of 'official' dijit themes, you can use ?theme=String
|
|
|
13 |
// for 'un-supported' themes, too. (eg: yours)
|
|
|
14 |
var availableThemes = [
|
|
|
15 |
{ theme:"tundra", author:"Dojo", baseUri:"../themes/"},
|
|
|
16 |
{ theme:"soria", author:"dante", baseUri:"../themes/"}//,
|
|
|
17 |
//{ theme:"noir", author:"owen", baseUri:"../themes/"}
|
|
|
18 |
];
|
|
|
19 |
</script>
|
|
|
20 |
<style type="text/css">
|
|
|
21 |
@import "../../dojo/resources/dojo.css";
|
|
|
22 |
@import "../../dijit/themes/dijit.css";
|
|
|
23 |
@import "../tests/css/dijitTests.css";
|
|
|
24 |
@import "../../dojo/tests/dnd/dndDefault.css";
|
|
|
25 |
|
|
|
26 |
html, body { height: 100%; width: 100%; padding: 0; border: 0; }
|
|
|
27 |
#main { height: 100%; width: 100%; padding: 0; border: 0; }
|
|
|
28 |
#header, #mainSplit { margin: 10px; }
|
|
|
29 |
|
|
|
30 |
/* pre-loader specific stuff to prevent unsightly flash of unstyled content */
|
|
|
31 |
#loader {
|
|
|
32 |
padding:0;
|
|
|
33 |
margin:0;
|
|
|
34 |
position:absolute;
|
|
|
35 |
top:0; left:0;
|
|
|
36 |
width:100%; height:100%;
|
|
|
37 |
background:#ededed;
|
|
|
38 |
z-index:999;
|
|
|
39 |
vertical-align:center;
|
|
|
40 |
}
|
|
|
41 |
#loaderInner {
|
|
|
42 |
padding:5px;
|
|
|
43 |
position:relative;
|
|
|
44 |
left:0;
|
|
|
45 |
top:0;
|
|
|
46 |
width:175px;
|
|
|
47 |
background:#3c3;
|
|
|
48 |
color:#fff;
|
|
|
49 |
|
|
|
50 |
}
|
|
|
51 |
|
|
|
52 |
hr.spacer { border:0; background-color:#ededed; width:80%; height:1px; }
|
|
|
53 |
</style>
|
|
|
54 |
<script type="text/javascript" src="../tests/_testCommon.js"></script>
|
|
|
55 |
<script type="text/javascript"> // dojo.requires()
|
|
|
56 |
|
|
|
57 |
dojo.require("dijit.Menu");
|
|
|
58 |
dojo.require("dijit._Calendar");
|
|
|
59 |
dojo.require("dijit.ColorPalette");
|
|
|
60 |
dojo.require("dijit.ProgressBar");
|
|
|
61 |
dojo.require("dijit.TitlePane");
|
|
|
62 |
dojo.require("dijit.Tooltip");
|
|
|
63 |
dojo.require("dijit.Tree");
|
|
|
64 |
|
|
|
65 |
// editor:
|
|
|
66 |
dojo.require("dijit.Editor");
|
|
|
67 |
|
|
|
68 |
// dnd:
|
|
|
69 |
dojo.require("dojo.dnd.Source");
|
|
|
70 |
|
|
|
71 |
// various Form elemetns
|
|
|
72 |
dojo.require("dijit.form.CheckBox");
|
|
|
73 |
dojo.require("dijit.form.Textarea");
|
|
|
74 |
dojo.require("dijit.form.FilteringSelect");
|
|
|
75 |
dojo.require("dijit.form.TextBox");
|
|
|
76 |
dojo.require("dijit.form.DateTextBox");
|
|
|
77 |
dojo.require("dijit.form.Button");
|
|
|
78 |
dojo.require("dijit.InlineEditBox");
|
|
|
79 |
dojo.require("dijit.form.NumberSpinner");
|
|
|
80 |
dojo.require("dijit.form.Slider");
|
|
|
81 |
|
|
|
82 |
// layouts used in page
|
|
|
83 |
dojo.require("dijit.layout.AccordionContainer");
|
|
|
84 |
dojo.require("dijit.layout.ContentPane");
|
|
|
85 |
dojo.require("dijit.layout.SplitContainer");
|
|
|
86 |
dojo.require("dijit.layout.TabContainer");
|
|
|
87 |
dojo.require("dijit.layout.LayoutContainer");
|
|
|
88 |
dojo.require("dijit.Dialog");
|
|
|
89 |
|
|
|
90 |
// scan page for widgets and instantiate them
|
|
|
91 |
dojo.require("dojo.parser");
|
|
|
92 |
|
|
|
93 |
// humm?
|
|
|
94 |
dojo.require("dojo.date.locale");
|
|
|
95 |
|
|
|
96 |
// for the Tree
|
|
|
97 |
dojo.require("dojo.data.ItemFileReadStore");
|
|
|
98 |
|
|
|
99 |
// for the colorpalette
|
|
|
100 |
function setColor(color){
|
|
|
101 |
var theSpan = dojo.byId("outputSpan");
|
|
|
102 |
dojo.style(theSpan,"color",color);
|
|
|
103 |
theSpan.innerHTML = color;
|
|
|
104 |
}
|
|
|
105 |
|
|
|
106 |
// for the calendar
|
|
|
107 |
function myHandler(id,newValue){
|
|
|
108 |
console.debug("onChange for id = " + id + ", value: " + newValue);
|
|
|
109 |
};
|
|
|
110 |
|
|
|
111 |
function hideLoader(){
|
|
|
112 |
var loader = dojo.byId('loader');
|
|
|
113 |
dojo.fadeOut({ node: loader, duration:500,
|
|
|
114 |
onEnd: function(){
|
|
|
115 |
loader.style.display = "none";
|
|
|
116 |
}
|
|
|
117 |
}).play();
|
|
|
118 |
}
|
|
|
119 |
|
|
|
120 |
dojo.addOnLoad(function() {
|
|
|
121 |
|
|
|
122 |
var holder = dojo.byId('themeData');
|
|
|
123 |
var tmpString='';
|
|
|
124 |
dojo.forEach(availableThemes,function(theme){
|
|
|
125 |
tmpString += '<a href="?theme='+theme.theme+'">'+theme.theme+'</'+'a> - by: '+theme.author+' <br>';
|
|
|
126 |
});
|
|
|
127 |
holder.innerHTML = tmpString;
|
|
|
128 |
|
|
|
129 |
var start = new Date().getTime();
|
|
|
130 |
dojo.parser.parse(dojo.byId('container'));
|
|
|
131 |
console.log("Total parse time: " + (new Date().getTime() - start) + "ms");
|
|
|
132 |
|
|
|
133 |
dojo.byId('loaderInner').innerHTML += " done.";
|
|
|
134 |
setTimeout("hideLoader()",250);
|
|
|
135 |
|
|
|
136 |
});
|
|
|
137 |
|
|
|
138 |
</script>
|
|
|
139 |
<style type="text/css">
|
|
|
140 |
/* for custom menu buttons, do not appear to have any effect */
|
|
|
141 |
.dc {
|
|
|
142 |
font-size: x-large !important;
|
|
|
143 |
padding-top: 10px !important;
|
|
|
144 |
padding-bottom: 10px !important;
|
|
|
145 |
}
|
|
|
146 |
|
|
|
147 |
.Acme *,
|
|
|
148 |
.Acme {
|
|
|
149 |
background: rgb(96,96,96) !important;
|
|
|
150 |
color: white !important;
|
|
|
151 |
padding: 10px !important;
|
|
|
152 |
}
|
|
|
153 |
|
|
|
154 |
.Acme:hover *,
|
|
|
155 |
.Acme:hover {
|
|
|
156 |
background-color: rgb(89,94,111) !important;
|
|
|
157 |
color: cyan !important;
|
|
|
158 |
}
|
|
|
159 |
|
|
|
160 |
.Acme:active *,
|
|
|
161 |
.Acme:active {
|
|
|
162 |
background-color: white !important;
|
|
|
163 |
color: black !important;
|
|
|
164 |
}
|
|
|
165 |
</style>
|
|
|
166 |
<script>
|
|
|
167 |
/***
|
|
|
168 |
dojo.addOnLoad(function(){
|
|
|
169 |
// use "before advice" to print log message each time resize is called on a layout widget
|
|
|
170 |
var origResize = dijit.layout._LayoutWidget.prototype.resize;
|
|
|
171 |
dijit.layout._LayoutWidget.prototype.resize = function(mb){
|
|
|
172 |
console.log(this + ": resize({w:"+ mb.w + ", h:" + mb.h + "})");
|
|
|
173 |
origResize.apply(this, arguments);
|
|
|
174 |
};
|
|
|
175 |
|
|
|
176 |
// content pane has no children so just use dojo's builtin after advice
|
|
|
177 |
dojo.connect(dijit.layout.ContentPane.prototype, "resize", function(mb){
|
|
|
178 |
console.log(this + ": resize({w:"+ mb.w + ", h:" + mb.h + "})");
|
|
|
179 |
});
|
|
|
180 |
});
|
|
|
181 |
***/
|
|
|
182 |
</script>
|
|
|
183 |
</head>
|
|
|
184 |
<body>
|
|
|
185 |
<!-- basic preloader: -->
|
|
|
186 |
<div id="loader"><div id="loaderInner">Loading themeTester ... </div></div>
|
|
|
187 |
|
|
|
188 |
<!-- data for tree and combobox -->
|
|
|
189 |
<div dojoType="dojo.data.ItemFileReadStore" jsId="continentStore"
|
|
|
190 |
url="../tests/_data/countries.json"></div>
|
|
|
191 |
<div dojoType="dojo.data.ItemFileReadStore" jsId="stateStore"
|
|
|
192 |
url="../tests/_data/states.json"></div>
|
|
|
193 |
<!-- contentMenu popup -->
|
|
|
194 |
<div dojoType="dijit.Menu" id="submenu1" contextMenuForWindow="true" style="display: none;">
|
|
|
195 |
<div dojoType="dijit.MenuItem" onClick="alert('Hello world');">Enabled Item</div>
|
|
|
196 |
<div dojoType="dijit.MenuItem" disabled="true">Disabled Item</div>
|
|
|
197 |
<div dojoType="dijit.MenuSeparator"></div>
|
|
|
198 |
<div dojoType="dijit.MenuItem" iconClass="dijitEditorIcon dijitEditorIconCut"
|
|
|
199 |
onClick="alert('not actually cutting anything, just a test!')">Cut</div>
|
|
|
200 |
<div dojoType="dijit.MenuItem" iconClass="dijitEditorIcon dijitEditorIconCopy"
|
|
|
201 |
onClick="alert('not actually copying anything, just a test!')">Copy</div>
|
|
|
202 |
<div dojoType="dijit.MenuItem" iconClass="dijitEditorIcon dijitEditorIconPaste"
|
|
|
203 |
onClick="alert('not actually pasting anything, just a test!')">Paste</div>
|
|
|
204 |
<div dojoType="dijit.MenuSeparator"></div>
|
|
|
205 |
<div dojoType="dijit.PopupMenuItem">
|
|
|
206 |
<span>Enabled Submenu</span>
|
|
|
207 |
<div dojoType="dijit.Menu" id="submenu2">
|
|
|
208 |
<div dojoType="dijit.MenuItem" onClick="alert('Submenu 1!')">Submenu Item One</div>
|
|
|
209 |
<div dojoType="dijit.MenuItem" onClick="alert('Submenu 2!')">Submenu Item Two</div>
|
|
|
210 |
<div dojoType="dijit.PopupMenuItem">
|
|
|
211 |
<span>Deeper Submenu</span>
|
|
|
212 |
<div dojoType="dijit.Menu" id="submenu4">
|
|
|
213 |
<div dojoType="dijit.MenuItem" onClick="alert('Sub-submenu 1!')">Sub-sub-menu Item One</div>
|
|
|
214 |
<div dojoType="dijit.MenuItem" onClick="alert('Sub-submenu 2!')">Sub-sub-menu Item Two</div>
|
|
|
215 |
</div>
|
|
|
216 |
</div>
|
|
|
217 |
</div>
|
|
|
218 |
</div>
|
|
|
219 |
<div dojoType="dijit.PopupMenuItem" disabled="true">
|
|
|
220 |
<span>Disabled Submenu</span>
|
|
|
221 |
<div dojoType="dijit.Menu" id="submenu3" style="display: none;">
|
|
|
222 |
<div dojoType="dijit.MenuItem" onClick="alert('Submenu 1!')">Submenu Item One</div>
|
|
|
223 |
<div dojoType="dijit.MenuItem" onClick="alert('Submenu 2!')">Submenu Item Two</div>
|
|
|
224 |
</div>
|
|
|
225 |
</div>
|
|
|
226 |
<div dojoType="dijit.PopupMenuItem">
|
|
|
227 |
<span>Different popup</span>
|
|
|
228 |
<div dojoType="dijit.ColorPalette"></div>
|
|
|
229 |
</div>
|
|
|
230 |
<div dojoType="dijit.PopupMenuItem">
|
|
|
231 |
<span>Different popup</span>
|
|
|
232 |
<div dojoType="dijit._Calendar"></div>
|
|
|
233 |
</div>
|
|
|
234 |
</div>
|
|
|
235 |
<!-- end contextMenu -->
|
|
|
236 |
|
|
|
237 |
<div id="main" dojoType="dijit.layout.LayoutContainer">
|
|
|
238 |
<h1 id="header" dojoType="dijit.layout.ContentPane" layoutAlign=top>Dijit Theme Test Page</h1>
|
|
|
239 |
|
|
|
240 |
<!-- overall splitcontainer horizontal -->
|
|
|
241 |
<div dojoType="dijit.layout.SplitContainer" orientation="horizontal" sizerWidth="7"
|
|
|
242 |
layoutAlign=client id="mainSplit">
|
|
|
243 |
|
|
|
244 |
<div dojoType="dijit.layout.AccordionContainer" duration="200"
|
|
|
245 |
sizeMin="20" sizeShare="38">
|
|
|
246 |
|
|
|
247 |
<div dojoType="dijit.layout.AccordionPane" title="Popups and Alerts"><div style="padding:8px">
|
|
|
248 |
<h2>Tooltips:</h2>
|
|
|
249 |
<ul>
|
|
|
250 |
<li>
|
|
|
251 |
<span id="ttRich">rich text tooltip</span>
|
|
|
252 |
<span dojoType="dijit.Tooltip" connectId="ttRich" style="display:none;">
|
|
|
253 |
Embedded <b>bold</b> <i>RICH</i> text <span style="color:#309; font-size:x-large;">weirdness!</span>
|
|
|
254 |
</span>
|
|
|
255 |
</li>
|
|
|
256 |
|
|
|
257 |
<li><a id="ttOne" href="#bogus">anchor tooltip</a>
|
|
|
258 |
<span dojoType="dijit.Tooltip" connectId="ttOne" style="display:none;">tooltip on anchor</span>
|
|
|
259 |
</li>
|
|
|
260 |
|
|
|
261 |
</ul>
|
|
|
262 |
|
|
|
263 |
<hr class="spacer">
|
|
|
264 |
|
|
|
265 |
<h2>Dialogs:</h2>
|
|
|
266 |
<ul>
|
|
|
267 |
<li><a href="javascript:dijit.byId('dialog1').show()">show Modal Dialog</a></li>
|
|
|
268 |
</ul>
|
|
|
269 |
|
|
|
270 |
<div dojoType="dijit.form.DropDownButton">
|
|
|
271 |
<span>Show Tooltip Dialog</span>
|
|
|
272 |
<div dojoType="dijit.TooltipDialog" id="tooltipDlg" title="Enter Login information"
|
|
|
273 |
execute="alert('submitted w/args:\n' + dojo.toJson(arguments[0], true));">
|
|
|
274 |
<table>
|
|
|
275 |
<tr>
|
|
|
276 |
<td><label for="user">User:</label></td>
|
|
|
277 |
<td><input dojoType=dijit.form.TextBox type="text" name="user" ></td>
|
|
|
278 |
</tr>
|
|
|
279 |
<tr>
|
|
|
280 |
<td><label for="pwd">Password:</label></td>
|
|
|
281 |
<td><input dojoType=dijit.form.TextBox type="password" name="pwd"></td>
|
|
|
282 |
</tr>
|
|
|
283 |
<tr>
|
|
|
284 |
<td colspan="2" align="center">
|
|
|
285 |
<button dojoType=dijit.form.Button type="submit" name="submit">Login</button>
|
|
|
286 |
</tr>
|
|
|
287 |
</table>
|
|
|
288 |
</div>
|
|
|
289 |
</div>
|
|
|
290 |
</div>
|
|
|
291 |
</div>
|
|
|
292 |
|
|
|
293 |
<div dojoType="dijit.layout.AccordionPane" title="Dojo Tree from Store">
|
|
|
294 |
<!-- tree widget -->
|
|
|
295 |
<div dojoType="dijit.Tree" store="continentStore" query="{type:'continent'}"
|
|
|
296 |
labelAttr="name" typeAttr="type" label="Continents">
|
|
|
297 |
</div>
|
|
|
298 |
</div>
|
|
|
299 |
|
|
|
300 |
<div dojoType="dijit.layout.AccordionPane" title="Calendar" selected="true">
|
|
|
301 |
<!-- calendar widget pane -->
|
|
|
302 |
<input id="calendar1" dojoType="dijit._Calendar" onChange="myHandler(this.id,arguments[0])">
|
|
|
303 |
</div>
|
|
|
304 |
|
|
|
305 |
<div dojoType="dijit.layout.AccordionPane" title="Color Picker">
|
|
|
306 |
<!-- color palette picker -->
|
|
|
307 |
<h2 class="testHeader">Dijit Color Palette(7x10)</h2>
|
|
|
308 |
<div dojoType="dijit.ColorPalette" onChange="setColor(this.value);"></div>
|
|
|
309 |
<br>
|
|
|
310 |
Test color is: <span id="outputSpan"></span>
|
|
|
311 |
|
|
|
312 |
<br><br>
|
|
|
313 |
<div dojoType="dijit.ColorPalette" palette="3x4"></div>
|
|
|
314 |
</div>
|
|
|
315 |
|
|
|
316 |
|
|
|
317 |
|
|
|
318 |
</div><!-- end AccordionContainer -->
|
|
|
319 |
|
|
|
320 |
<!-- embedded split container start -->
|
|
|
321 |
<div dojoType="dijit.layout.SplitContainer" orientation="vertical" sizerWidth="7" sizeShare="75" id="verticalSplit">
|
|
|
322 |
|
|
|
323 |
<!-- top half, vertical split container -->
|
|
|
324 |
<div dojoType="dijit.layout.TabContainer" sizeShare="40">
|
|
|
325 |
<!-- first tab? -->
|
|
|
326 |
<div id="tab1" dojoType="dijit.layout.ContentPane" title="Form Feel" style="padding:10px;display:none;">
|
|
|
327 |
<h2>Various Form Elements:</h2>
|
|
|
328 |
|
|
|
329 |
<form name="dijitFormTest">
|
|
|
330 |
|
|
|
331 |
<p><input type="checkBox" dojoType="dijit.form.CheckBox" checked="checked"> Standard Dijit CheckBox
|
|
|
332 |
<br><input type="checkBox" dojoType="dijit.form.CheckBox" disabled="disabled"> Disabled Dijit
|
|
|
333 |
<br><input type="checkBox" dojoType="dijit.form.CheckBox" disabled="disabled" checked="checked"> Checked and Disabled Dijit
|
|
|
334 |
</p>
|
|
|
335 |
|
|
|
336 |
<p>
|
|
|
337 |
<span>Radio group #1:</span>
|
|
|
338 |
<input type="radio" name="g1" id="g1rb1" value="news" dojoType="dijit.form.RadioButton">
|
|
|
339 |
<label for="g1rb1">news</label>
|
|
|
340 |
<input type="radio" name="g1" id="g1rb2" value="talk" dojoType="dijit.form.RadioButton" checked="checked"/>
|
|
|
341 |
<label for="g1rb2">talk</label>
|
|
|
342 |
<input type="radio" name="g1" id="g1rb3" value="weather" dojoType="dijit.form.RadioButton" disabled="disabled"/>
|
|
|
343 |
<label for="g1rb3">weather (disabled)</label>
|
|
|
344 |
</p>
|
|
|
345 |
|
|
|
346 |
<p>
|
|
|
347 |
<span>Radio group #2: (no default value, and has breaks)</span><br>
|
|
|
348 |
<input type="radio" name="g2" id="g2rb1" value="top40" dojoType="dijit.form.RadioButton">
|
|
|
349 |
<label for="g2rb1">top 40</label><br>
|
|
|
350 |
<input type="radio" name="g2" id="g2rb2" value="oldies" dojoType="dijit.form.RadioButton">
|
|
|
351 |
<label for="g2rb2">oldies</label><br>
|
|
|
352 |
|
|
|
353 |
<input type="radio" name="g2" id="g2rb3" value="country" dojoType="dijit.form.RadioButton">
|
|
|
354 |
<label for="g2rb3">country</label><br>
|
|
|
355 |
|
|
|
356 |
<br>
|
|
|
357 |
(Note if using keyboard: tab to navigate, and use arrow or space to select)
|
|
|
358 |
</p>
|
|
|
359 |
|
|
|
360 |
<hr class="spacer">
|
|
|
361 |
|
|
|
362 |
<h2>dijit.form.NumberSpinner max=100</h2>
|
|
|
363 |
<input dojoType="dijit.form.NumberSpinner" constraints="{max:100,places:0}" id="integertextbox3" value="10">
|
|
|
364 |
|
|
|
365 |
<hr class="spacer">
|
|
|
366 |
|
|
|
367 |
<h2>dijit.form.Textarea: (sans <i>any</i> styling...)</h2>
|
|
|
368 |
<textarea dojoType="dijit.form.Textarea" name="areText">Lorem ipsum dolor sit amet,
|
|
|
369 |
consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet
|
|
|
370 |
dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci
|
|
|
371 |
tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis
|
|
|
372 |
autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat,
|
|
|
373 |
vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio
|
|
|
374 |
dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait
|
|
|
375 |
nulla facilisi.
|
|
|
376 |
</textarea>
|
|
|
377 |
|
|
|
378 |
<hr class="spacer">
|
|
|
379 |
|
|
|
380 |
<h2>dijit.form.ComboBox</h2>
|
|
|
381 |
<label for="datatest">US State test 2: </label>
|
|
|
382 |
<input dojoType="dijit.form.ComboBox"
|
|
|
383 |
value="California"
|
|
|
384 |
class="medium"
|
|
|
385 |
store="stateStore"
|
|
|
386 |
searchAttr="name"
|
|
|
387 |
style="width: 300px;"
|
|
|
388 |
name="state2"
|
|
|
389 |
id="datatestComboBox"
|
|
|
390 |
>
|
|
|
391 |
|
|
|
392 |
</form>
|
|
|
393 |
|
|
|
394 |
</div><!-- end first tab -->
|
|
|
395 |
|
|
|
396 |
<!-- second upper tab -->
|
|
|
397 |
<div id="tab2" dojoType="dijit.layout.ContentPane" title="Various Dijits"
|
|
|
398 |
style="padding:10px; display:none;">
|
|
|
399 |
|
|
|
400 |
<!-- Sliders: -->
|
|
|
401 |
<div style="float:right;">
|
|
|
402 |
<div dojoType="dijit.form.VerticalSlider" name="vertical1"
|
|
|
403 |
onChange="dojo.byId('slider2input').value=arguments[0];"
|
|
|
404 |
value="10"
|
|
|
405 |
maximum="100"
|
|
|
406 |
minimum="0"
|
|
|
407 |
discreteValues="11"
|
|
|
408 |
style="height:175px; clear:both"
|
|
|
409 |
id="slider2">
|
|
|
410 |
<ol dojoType="dijit.form.VerticalRuleLabels" container="leftDecoration"style="width:2em;color:gray;" labelStyle="right:0px;">
|
|
|
411 |
<li>0
|
|
|
412 |
<li>100
|
|
|
413 |
</ol>
|
|
|
414 |
|
|
|
415 |
<div dojoType="dijit.form.VerticalRule" container="leftDecoration" count=11 style="width:5px;" ruleStyle="border-color:gray;"></div>
|
|
|
416 |
<div dojoType="dijit.form.VerticalRule" container="rightDecoration" count=11 style="width:5px;" ruleStyle="border-color:gray;"></div>
|
|
|
417 |
<ol dojoType="dijit.form.VerticalRuleLabels" container="rightDecoration"style="width:2em;color:gray;" maximum="100" count="6" numericMargin="1" constraints="{pattern:'#'}"></ol>
|
|
|
418 |
</div>
|
|
|
419 |
<br> Slider2 Value:<input readonly id="slider2input" size="3" value="10">
|
|
|
420 |
</div>
|
|
|
421 |
<h2>Sliders</h2>
|
|
|
422 |
<div dojoType="dijit.form.HorizontalSlider" name="horizontal1"
|
|
|
423 |
onChange="dojo.byId('slider1input').value=dojo.number.format(arguments[0]/100,{places:1,pattern:'#%'});"
|
|
|
424 |
value="10"
|
|
|
425 |
maximum="100"
|
|
|
426 |
minimum="0"
|
|
|
427 |
showButtons="false"
|
|
|
428 |
intermediateChanges="true"
|
|
|
429 |
style="width:50%; height: 20px;"
|
|
|
430 |
id="horizontal1">
|
|
|
431 |
<ol dojoType="dijit.form.HorizontalRuleLabels" container="topDecoration" style="height:1.2em;font-size:75%;color:gray;" numericMargin="1" count="6"></ol>
|
|
|
432 |
<div dojoType="dijit.form.HorizontalRule" container="topDecoration" count=11 style="height:5px;"></div>
|
|
|
433 |
<div dojoType="dijit.form.HorizontalRule" container="bottomDecoration" count=5 style="height:5px;"></div>
|
|
|
434 |
<ol dojoType="dijit.form.HorizontalRuleLabels" container="bottomDecoration" style="height:1em;font-size:75%;color:gray;">
|
|
|
435 |
<li>lowest
|
|
|
436 |
<li>normal
|
|
|
437 |
<li>highest
|
|
|
438 |
</ol>
|
|
|
439 |
|
|
|
440 |
</div>
|
|
|
441 |
<br>Value: <input readonly id="slider1input" size="5" value="10.0%">
|
|
|
442 |
|
|
|
443 |
<div dojoType="dijit.form.HorizontalSlider" name="horizontal2"
|
|
|
444 |
minimum="1"
|
|
|
445 |
value="2"
|
|
|
446 |
maximum="3"
|
|
|
447 |
discreteValues="3"
|
|
|
448 |
showButtons="false"
|
|
|
449 |
intermediateChanges="true"
|
|
|
450 |
style="width:300px; height: 40px;"
|
|
|
451 |
id="horizontal2">
|
|
|
452 |
<div dojoType="dijit.form.HorizontalRule" container="bottomDecoration" count=3 style="height:5px;"></div>
|
|
|
453 |
<ol dojoType="dijit.form.HorizontalRuleLabels" container="bottomDecoration"style="height:1em;font-size:75%;color:gray;">
|
|
|
454 |
<li><img width=10 height=10 src="../tests/images/note.gif"><br><span style="font-size: small">small</span>
|
|
|
455 |
<li><img width=15 height=15 src="../tests/images/note.gif"><br><span style="font-size: medium">medium</span>
|
|
|
456 |
|
|
|
457 |
<li><img width=20 height=20 src="../tests/images/note.gif"><br><span style="font-size: large">large</span>
|
|
|
458 |
</ol>
|
|
|
459 |
</div>
|
|
|
460 |
|
|
|
461 |
<br style="clear:both;">
|
|
|
462 |
<hr class="spacer">
|
|
|
463 |
|
|
|
464 |
<h2>ProgressBar</h2>
|
|
|
465 |
<div style="width:400px" annotate="true" maximum="200" id="setTestBar"
|
|
|
466 |
progress="20" dojoType="dijit.ProgressBar"></div>
|
|
|
467 |
|
|
|
468 |
Indeterminate:
|
|
|
469 |
<div style="width:400px" indeterminate="true" dojoType="dijit.ProgressBar"></div>
|
|
|
470 |
|
|
|
471 |
<hr class="spacer">
|
|
|
472 |
|
|
|
473 |
<h2>TitlePane (nested)</h2>
|
|
|
474 |
<div dojoType="dijit.TitlePane" title="Outer pane" width="275">
|
|
|
475 |
<p>This is a title pane, containing another title pane ...</p>
|
|
|
476 |
<div dojoType="dijit.TitlePane" title="Inner pane" width="125">
|
|
|
477 |
|
|
|
478 |
<p>And this is the inner title pane...</p>
|
|
|
479 |
|
|
|
480 |
<p>Sed sollicitudin suscipit risus. Nam
|
|
|
481 |
ullamcorper. Sed nisl lectus, pellentesque nec,
|
|
|
482 |
malesuada eget, ornare a, libero. Lorem ipsum dolor
|
|
|
483 |
sit amet, consectetuer adipiscing elit.</p>
|
|
|
484 |
|
|
|
485 |
</div><!-- end inner titlepane -->
|
|
|
486 |
<p>And this is the closing line for the outer title pane.</p>
|
|
|
487 |
</div><!-- end outer title pane -->
|
|
|
488 |
<h2>HTML After, check indent</h2>
|
|
|
489 |
</div><!-- end:second upper tab -->
|
|
|
490 |
|
|
|
491 |
<!-- start third upper tab -->
|
|
|
492 |
<div id="tab3" dojoType="dijit.layout.ContentPane" title="Buttons"
|
|
|
493 |
style="padding:10px; display:none; ">
|
|
|
494 |
|
|
|
495 |
<h2>Simple, drop down & combo buttons</h2>
|
|
|
496 |
<p>Buttons can do an action, display a menu, or both:</p>
|
|
|
497 |
|
|
|
498 |
<div class="box">
|
|
|
499 |
<button dojoType="dijit.form.Button" iconClass="plusIcon" onClick='console.debug("clicked simple")'>
|
|
|
500 |
Create
|
|
|
501 |
</button>
|
|
|
502 |
|
|
|
503 |
<button dojoType="dijit.form.DropDownButton" iconClass="noteIcon">
|
|
|
504 |
<span>Edit</span>
|
|
|
505 |
<div dojoType="dijit.Menu" id="editMenu" style="display: none;">
|
|
|
506 |
<div dojoType="dijit.MenuItem"
|
|
|
507 |
iconClass="dijitEditorIcon dijitEditorIconCut"
|
|
|
508 |
onClick="console.debug('not actually cutting anything, just a test!')">
|
|
|
509 |
Cut
|
|
|
510 |
</div>
|
|
|
511 |
|
|
|
512 |
<div dojoType="dijit.MenuItem"
|
|
|
513 |
iconClass="dijitEditorIcon dijitEditorIconCopy"
|
|
|
514 |
onClick="console.debug('not actually copying anything, just a test!')">
|
|
|
515 |
Copy
|
|
|
516 |
</div>
|
|
|
517 |
|
|
|
518 |
<div dojoType="dijit.MenuItem"
|
|
|
519 |
iconClass="dijitEditorIcon dijitEditorIconPaste"
|
|
|
520 |
onClick="console.debug('not actually pasting anything, just a test!')">
|
|
|
521 |
Paste
|
|
|
522 |
</div>
|
|
|
523 |
</div>
|
|
|
524 |
</button>
|
|
|
525 |
|
|
|
526 |
<button dojoType="dijit.form.ComboButton" iconClass="noteIcon"
|
|
|
527 |
optionsTitle='save options'
|
|
|
528 |
onClick='console.debug("clicked combo save")'>
|
|
|
529 |
<span>Save</span>
|
|
|
530 |
<div dojoType="dijit.Menu" id="saveMenu" style="display: none;">
|
|
|
531 |
<div dojoType="dijit.MenuItem"
|
|
|
532 |
iconClass="dijitEditorIcon dijitEditorIconSave"
|
|
|
533 |
onClick="console.debug('not actually saving anything, just a test!')">
|
|
|
534 |
Save
|
|
|
535 |
</div>
|
|
|
536 |
<div dojoType="dijit.MenuItem"
|
|
|
537 |
onClick="console.debug('not actually saving anything, just a test!')">
|
|
|
538 |
Save As
|
|
|
539 |
</div>
|
|
|
540 |
</div>
|
|
|
541 |
</button>
|
|
|
542 |
|
|
|
543 |
<button dojoType="dijit.form.Button" iconClass="plusIcon" onClick='console.debug("clicked simple")'
|
|
|
544 |
disabled='true'>
|
|
|
545 |
Disabled
|
|
|
546 |
</button>
|
|
|
547 |
</div><!-- end:box -->
|
|
|
548 |
|
|
|
549 |
<hr class="spacer">
|
|
|
550 |
|
|
|
551 |
<h2>Sizing</h2>
|
|
|
552 |
<p>Short button, tall buttons, big buttons, small buttons... These buttons
|
|
|
553 |
size to their content (just like <button>).</p>
|
|
|
554 |
|
|
|
555 |
<div class="box">
|
|
|
556 |
<button dojoType="dijit.form.Button" iconClass="flatScreenIcon" onclick='console.debug("big");'>
|
|
|
557 |
<span style="font-size:xx-large">big</span>
|
|
|
558 |
</button>
|
|
|
559 |
|
|
|
560 |
<button id="smallButton1" dojoType="dijit.form.Button" onclick='console.debug("small");'>
|
|
|
561 |
<img src="../tests/images/arrowSmall.gif" width="15" height="5">
|
|
|
562 |
<span style="font-size:x-small">small</span>
|
|
|
563 |
</button>
|
|
|
564 |
|
|
|
565 |
<button dojoType="dijit.form.Button" onclick='console.debug("long");'>
|
|
|
566 |
<img src="../tests/images/tube.gif" width="150" height="16"> long
|
|
|
567 |
</button>
|
|
|
568 |
|
|
|
569 |
<button dojoType="dijit.form.Button" onclick='console.debug("tall");' width2height="0.1">
|
|
|
570 |
<img src="../tests/images/tubeTall.gif" height="75" width="35"><br>
|
|
|
571 |
<span style="font-size:medium">tall</span>
|
|
|
572 |
</button>
|
|
|
573 |
<div style="clear: both;"></div>
|
|
|
574 |
</div><!-- end box -->
|
|
|
575 |
|
|
|
576 |
<hr class="spacer">
|
|
|
577 |
|
|
|
578 |
<h2>Customized buttons</h2>
|
|
|
579 |
<p>Dojo users can mix in their styles. Here's an example:</p>
|
|
|
580 |
|
|
|
581 |
<div class="box"><!-- custom styled button tests -->
|
|
|
582 |
<button dojoType="dijit.form.Button" class="Acme"
|
|
|
583 |
onclick='console.debug("short");'>
|
|
|
584 |
<div class="dc">short</div>
|
|
|
585 |
</button>
|
|
|
586 |
|
|
|
587 |
<button dojoType="dijit.form.Button" class="Acme"
|
|
|
588 |
onclick='console.debug("longer");'>
|
|
|
589 |
<div class="dc">bit longer</div>
|
|
|
590 |
</button>
|
|
|
591 |
|
|
|
592 |
<button dojoType="dijit.form.Button" class="Acme"
|
|
|
593 |
onclick='console.debug("longer yet");'>
|
|
|
594 |
<div class="dc">ridiculously long</div>
|
|
|
595 |
</button>
|
|
|
596 |
|
|
|
597 |
<div style="clear: both;"></div>
|
|
|
598 |
</div><!-- end styled buttons -->
|
|
|
599 |
|
|
|
600 |
</div><!-- end third upper tab-->
|
|
|
601 |
|
|
|
602 |
<!-- fourth upper tab -->
|
|
|
603 |
<div id="tab32" dojoType="dijit.layout.ContentPane" title="Editable Text" style="padding:10px;" selected="selected">
|
|
|
604 |
|
|
|
605 |
<h2>dijit.Editor:</h2>
|
|
|
606 |
<!-- FIXME:
|
|
|
607 |
set height on this node to size the whole editor, but causes the tab to not scroll
|
|
|
608 |
until you select another tab and come back. alternative is no height: here, but that
|
|
|
609 |
causes editor to become VERY tall, and size to a normal height when selected (like the
|
|
|
610 |
dijit.form.TextArea in "Form Feel" Tab), but in reverse. refs #3980 and is maybe new bug?
|
|
|
611 |
-->
|
|
|
612 |
<div style="border:1px solid #ededed;">
|
|
|
613 |
<textarea height="175" dojoType="dijit.Editor" styleSheets="../../dojo/resources/dojo.css" sytle="width:400px; height:175px; overflow:auto; ">
|
|
|
614 |
<ul>
|
|
|
615 |
<li>Lorem <a href="http://dojotoolkit.org">and a link</a>, what do you think?</li>
|
|
|
616 |
<li>This is the Editor with a Toolbar attached.</li>
|
|
|
617 |
</ul>
|
|
|
618 |
</textarea>
|
|
|
619 |
</div>
|
|
|
620 |
<hr class="spacer">
|
|
|
621 |
|
|
|
622 |
|
|
|
623 |
<h2 class="testTitle">dijit.InlineEditBox + dijit.form.TextBox</h2>
|
|
|
624 |
|
|
|
625 |
This is an editable header,
|
|
|
626 |
<h3 id="editable" style="font-size:larger;" dojoType="dijit.InlineEditBox" onChange="myHandler(this.id,arguments[0])">
|
|
|
627 |
Edit me - I trigger the onChange callback
|
|
|
628 |
</h3>
|
|
|
629 |
And keep the text around me static.
|
|
|
630 |
|
|
|
631 |
<hr class="spacer">
|
|
|
632 |
|
|
|
633 |
<h2>dijit.InlineEditBox + dijit.form.Textarea</h2>
|
|
|
634 |
|
|
|
635 |
(HTML before)
|
|
|
636 |
<p id="areaEditable" dojoType="dijit.InlineEditBox" editor="dijit.form.Textarea">
|
|
|
637 |
I'm one big paragraph. Go ahead and <i>edit</i> me. <b>I dare you.</b>
|
|
|
638 |
The quick brown fox jumped over the lazy dog. Blah blah blah blah blah blah blah ...
|
|
|
639 |
</p>
|
|
|
640 |
(HTML after)
|
|
|
641 |
|
|
|
642 |
<p>
|
|
|
643 |
These links will
|
|
|
644 |
<a href="#" onClick="dijit.byId('areaEditable').setDisabled(true)">disable</a> /
|
|
|
645 |
<a href="#" onClick="dijit.byId('areaEditable').setDisabled(false)">enable</a>
|
|
|
646 |
the text area above.
|
|
|
647 |
</p>
|
|
|
648 |
|
|
|
649 |
<hr class="spacer">
|
|
|
650 |
|
|
|
651 |
<h2>dijit.form.DateTextBox:</h2>
|
|
|
652 |
|
|
|
653 |
(HTML inline before)
|
|
|
654 |
<span id="backgroundArea" dojoType="dijit.InlineEditBox" editor="dijit.form.DateTextBox" width="170px">12/30/2005</span>
|
|
|
655 |
(HTML after)
|
|
|
656 |
|
|
|
657 |
<hr class="spacer">
|
|
|
658 |
|
|
|
659 |
<h2>dijit.form.TimeTextBox:</h2>
|
|
|
660 |
|
|
|
661 |
(HTML inline before)
|
|
|
662 |
<span id="timePicker" dojoType="dijit.InlineEditBox" editor="dijit.form.TimeTextBox" width="150px">9:00 AM</span>
|
|
|
663 |
(HTML after)
|
|
|
664 |
|
|
|
665 |
<hr class="spacer">
|
|
|
666 |
|
|
|
667 |
|
|
|
668 |
<h2>dijit.form.FilteringSelect + Inline + remote data store:</h2>
|
|
|
669 |
(HTML inline before)
|
|
|
670 |
<span id="backgroundArea2" dojoType="dijit.InlineEditBox" editor="dijit.form.FilteringSelect"
|
|
|
671 |
editorParams="{store: stateStore, autoComplete: true, promptMessage: 'Please enter a state'}"
|
|
|
672 |
width="300px">
|
|
|
673 |
Indiana
|
|
|
674 |
</span>
|
|
|
675 |
(HTML after)
|
|
|
676 |
|
|
|
677 |
</div><!-- end fourth upper tab -->
|
|
|
678 |
|
|
|
679 |
<!-- fourth upper tab -->
|
|
|
680 |
<div id="tab4" dojoType="dijit.layout.ContentPane" title="DnD"
|
|
|
681 |
style="padding:10px; display:none; ">
|
|
|
682 |
<div style="float:left; margin:5px; ">
|
|
|
683 |
<h3>Source 1</h3>
|
|
|
684 |
<div dojoType="dojo.dnd.Source" class="container">
|
|
|
685 |
<div class="dojoDndItem">Item <strong>X</strong></div>
|
|
|
686 |
<div class="dojoDndItem">Item <strong>Y</strong></div>
|
|
|
687 |
<div class="dojoDndItem">Item <strong>Z</strong></div>
|
|
|
688 |
</div>
|
|
|
689 |
</div>
|
|
|
690 |
<div style="float:left; margin:5px; ">
|
|
|
691 |
<h3>Source 2</h3>
|
|
|
692 |
<div dojoType="dojo.dnd.Source" class="container">
|
|
|
693 |
<div class="dojoDndItem">Item <strong>1</strong></div>
|
|
|
694 |
<div class="dojoDndItem">Item <strong>2</strong></div>
|
|
|
695 |
<div class="dojoDndItem">Item <strong>3</strong></div>
|
|
|
696 |
</div>
|
|
|
697 |
</div>
|
|
|
698 |
</div>
|
|
|
699 |
|
|
|
700 |
<!-- fifth upper tab -->
|
|
|
701 |
<div id="tab5" dojoType="dijit.layout.ContentPane" title="Closable"
|
|
|
702 |
style="display:none; padding:10px; " closable="true">
|
|
|
703 |
This pane is closable, just for the icon ...
|
|
|
704 |
</div>
|
|
|
705 |
</div><!-- end top part vertical split container -->
|
|
|
706 |
|
|
|
707 |
<!-- bottom half, vertical split container -->
|
|
|
708 |
<div dojoType="dijit.layout.TabContainer" tabPosition="bottom" selectedChild="btab1">
|
|
|
709 |
|
|
|
710 |
<!-- btab 1 -->
|
|
|
711 |
<div id="btab1" dojoType="dijit.layout.ContentPane" title="Info" style=" padding:10px; ">
|
|
|
712 |
<p>You can explore this single page after applying a Theme
|
|
|
713 |
for use in creation of your own theme.</p>
|
|
|
714 |
|
|
|
715 |
<p>I am whole slew of Widgets on a page. Jump to <a href="../tests/">dijit tests</a> to
|
|
|
716 |
test individual components.</p>
|
|
|
717 |
|
|
|
718 |
<p>There is a right-click [context] pop-up menu here, as well.</p>
|
|
|
719 |
</div><!-- end:info btab1 -->
|
|
|
720 |
|
|
|
721 |
<div id="btab21" dojoType="dijit.layout.ContentPane" title="Alternate Themes" style="padding:20px;">
|
|
|
722 |
<span id="themeData"></span>
|
|
|
723 |
</div><!-- btab21 -->
|
|
|
724 |
|
|
|
725 |
<div id="btab3" dojoType="dijit.layout.ContentPane" title="Bottom 3" closable="true">
|
|
|
726 |
<p>I am the last Tab</p>
|
|
|
727 |
<div id="dialog2" dojoType="dijit.Dialog" title="Encased Dialog" style="display:none;">
|
|
|
728 |
I am the second dialog. I am
|
|
|
729 |
parented by the Low Tab Pane #3
|
|
|
730 |
</div>
|
|
|
731 |
</div><!-- btab3 -->
|
|
|
732 |
|
|
|
733 |
</div><!-- end Bottom TabContainer -->
|
|
|
734 |
|
|
|
735 |
</div><!-- end embedded vertical split container -->
|
|
|
736 |
|
|
|
737 |
</div><!-- splitContainer parent -->
|
|
|
738 |
</div><!-- Layoutcontainer -->
|
|
|
739 |
|
|
|
740 |
<!-- dialog in body -->
|
|
|
741 |
<div id="dialog1" dojoType="dijit.Dialog" title="Floating Modal Dialog" style="display:none;" href="../tests/layout/doc0.html"></div>
|
|
|
742 |
|
|
|
743 |
</body>
|
|
|
744 |
</html>
|