2c9250726ddb1789b5585d1993a026c010dfe850.svn-base 27 KB

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