test_TitlePane.html 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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>TitlePane Test</title>
  6. <script type="text/javascript" src="../../dojo/dojo.js"
  7. djConfig="parseOnLoad: true, isDebug: true"></script>
  8. <script type="text/javascript" src="_testCommon.js"></script>
  9. <script language="JavaScript" type="text/javascript">
  10. dojo.require("dijit.TitlePane");
  11. dojo.require("dojo.parser"); // scan page for widgets and instantiate them
  12. // widgets used inside subpage loaded via href=
  13. dojo.require("dijit.form.Button");
  14. dojo.require("dijit.form.ComboBox");
  15. function randomMessageId(){
  16. return Math.floor(Math.random() * 3) + 3;
  17. }
  18. </script>
  19. <style type="text/css">
  20. @import "../../dojo/resources/dojo.css";
  21. @import "css/dijitTests.css";
  22. </style>
  23. </head>
  24. <body>
  25. <h1 class="testTitle">Dijit TitlePane Test</h1>
  26. <h1>Test #1: plain title pane, width=300px</h1>
  27. <div dojoType="dijit.TitlePane" title="Title Pane #1" style="width: 300px;">
  28. Lorem Ipsum Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Quisque
  29. iaculis, nulla id semper faucibus, pede tellus nonummy magna, vitae adipiscing
  30. orci arcu ut augue. Nunc condimentum, magna a vestibulum convallis, libero purus
  31. pulvinar orci, sed vestibulum urna sem ut pede. More Ipsum...
  32. Sed sollicitudin suscipit risus. Nam ullamcorper. Sed nisl lectus, pellentesque
  33. nec, malesuada eget, ornare a, libero. Lorem ipsum dolor sit amet,
  34. consectetuer adipiscing elit.
  35. </div>
  36. <h1>Test #2: title pane with form, width=300px</h1>
  37. <div dojoType="dijit.TitlePane" title="Title Pane #2" id="pane_2" style="width: 300px;">
  38. <form>
  39. Age: <input><br>
  40. Discount card <input type=checkbox><br>
  41. <button>Submit</button><br>
  42. </form>
  43. </div>
  44. <br>
  45. <h1>Test #3: initially closed pane</h1>
  46. <div dojoType="dijit.TitlePane" title="Initially closed pane" open="false" width="200">
  47. <form>
  48. <title for="age">Age: </title><input id="age"><br>
  49. <title for="discount">Discount card </title><input type=checkbox id="discount"><br>
  50. <button>Submit</button><br>
  51. </form>
  52. </div>
  53. <h1>Test #4: title pane with href (initially closed)</h1>
  54. <p>The pane should open to "Loading..." message and then 2 seconds later it should slide open more to show loaded data.</p>
  55. <div dojoType="dijit.TitlePane" duration=1000 title="Pane from href" href="layout/getResponse.php?delay=3000&messId=3" open="false">
  56. Loading...
  57. </div>
  58. <h1>Test #5: title pane with href (initially closed)</h1>
  59. <p>The pane should start to open to "Loading..." but halfway through href data will be loaded, and it should expand correctly.</p>
  60. <div dojoType="dijit.TitlePane" duration=1000 title="Pane from href" href="layout/getResponse.php?delay=500&messId=3" open="false">
  61. Loading...
  62. </div>
  63. <h1>Test #6: nested title pane</h1>
  64. <div dojoType="dijit.TitlePane" title="Outer pane" width="300">
  65. <p>This is a title pane, containing another title pane ...
  66. <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Quisque iaculis, nulla id semper faucibus, pede tellus nonummy magna, vitae adipiscing orci arcu ut augue. Nunc condimentum, magna a vestibulum convallis, libero purus pulvinar orci, sed vestibulum urna sem ut pede.
  67. More Ipsum...
  68. <div dojoType="dijit.TitlePane" title="Inner pane" width="250">
  69. <p>And this is the inner title pane...
  70. <p>Sed sollicitudin suscipit risus. Nam ullamcorper. Sed nisl lectus, pellentesque nec, malesuada eget, ornare a, libero. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
  71. </div>
  72. <p>And this is the closing line for the outer title pane.
  73. </div>
  74. <table style="border: solid blue 2px; margin-top: 1em;">
  75. <tr>
  76. <td>
  77. Here's some text below the title panes (to make sure that closing a title pane releases the space that the content was taking up)
  78. </td>
  79. </tr>
  80. </table>
  81. </body>
  82. </html>