/public/javascripts/dojo/dojox/presentation/tests/test_presentation.html

http://enginey.googlecode.com/ · HTML · 163 lines · 119 code · 26 blank · 18 comment · 0 complexity · 6a9a0c045536f56af3adcc1ea988ea78 MD5 · raw file

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
  2. <html>
  3. <head>
  4. <title>dojox.presentation - Presentation Mechanism</title>
  5. <style type="text/css">
  6. @import "../../../dojo/resources/dojo.css";
  7. @import "../../../dijit/themes/tundra/tundra.css";
  8. @import "../../../dijit/tests/css/dijitTests.css";
  9. @import "../resources/Show.css";
  10. </style>
  11. <script type="text/javascript"> djConfig = { isDebug: true, parseOnLoad: true, popup:true }; </script>
  12. <script type="text/javascript" src="../../../dojo/dojo.js"></script>
  13. <script type="text/javascript" src="../../../dijit/form/Button.js"></script>
  14. <script type="text/javascript">
  15. dojo.require("dojox.presentation");
  16. dojo.require("dijit._Calendar");
  17. dojo.require("dijit.TitlePane");
  18. dojo.require("dojo.parser");
  19. dojo.require("dojo.fx");
  20. dojo.require("dojo.dnd.move");
  21. </script>
  22. <script type="text/javascript">
  23. var externalAnimation = null;
  24. var titleCount=0;
  25. var titles = [
  26. "Just Kidding",
  27. "The Title Will keep changing",
  28. "but you can click to advance",
  29. "nonthing fancy",
  30. "just an example of",
  31. "an external function controlling a slide."
  32. ];
  33. function playIt() {
  34. var node = dijit.byId('animated').slideTitle;
  35. console.debug(node);
  36. // this is the fanciest animation chain i could thing of atm
  37. tmpTitle = titles[titleCount++] || titles[0];
  38. externalAnimation = dojo.fx.chain([
  39. dojo.fadeOut({ node: node,
  40. duration: 500,
  41. onEnd: dojo.hitch(this,function(){
  42. node.innerHTML = tmpTitle;
  43. })
  44. }),
  45. dojo.animateProperty({
  46. node: node,
  47. duration: 10,
  48. properties: { letterSpacing: {
  49. end:-26.3, unit: 'em', start:3.2
  50. }
  51. }
  52. }),
  53. dojo.fadeIn({ node: node,
  54. duration:300
  55. }),
  56. dojo.animateProperty({
  57. node: node,
  58. duration: 800,
  59. properties: { letterSpacing: {
  60. end:2.8, unit: 'em' , start:-26.0
  61. }
  62. }
  63. })
  64. ]);
  65. setTimeout(function(){externalAnimation.play();},50);
  66. }
  67. function makeDraggable(node) {
  68. var tmp = new dojo.dnd.Moveable(node);
  69. }
  70. </script>
  71. </head>
  72. <body class="tundra">
  73. <div dojoType="dojox.presentation.Deck" id="testPresentation">
  74. <div dojoType="dojox.presentation.Slide" id="myFirstSlide" title="Introduction">
  75. <p>This is a brief overview of what this presentation widget is capable of.</p>
  76. <div dojoType="dojox.presentation.Part" as="one">... it's new, and completely different, so watch close</div>
  77. <input dojoType="dojox.presentation.Action" forSlide="one" toggle="fade" duration="3000">
  78. <input dojoType="dojox.presentation.Action" forSlide="one" toggle="wipe">
  79. </div>
  80. <div dojoType="dojox.presentation.Slide" title="Basic Actions">
  81. <p>Click, and more text will appear</p>
  82. <div dojoType="dojox.presentation.Part" as="one">
  83. <p>Lorem something something. I am text, hear me _roar_.</p>
  84. </div>
  85. <input dojoType="dojox.presentation.Action" forSlide="one" on="click" toggle="fade">
  86. <div dojoType="dojox.presentation.Part" as="me">
  87. I am here to make sure click-advancing is disabled on normal input type elements:
  88. <ul>
  89. <li><a href="#">href</a></li>
  90. <li>Input: <input type="text" name="foo"></li>
  91. </ul>
  92. </div>
  93. <input dojoType="dojox.presentation.Action" forslide="me" toggle="slide">
  94. </div>
  95. <div dojoType="dojox.presentation.Slide" title="Automatically Advance">
  96. <p dojoType="dojox.presentation.Part" as="one">First You See me ...</p>
  97. <p dojoType="dojox.presentation.Part" as="two">Then you see ME ...</p>
  98. <p dojoType="dojox.presentation.Part" as="three" style="padding:20px;">oh yeah!</p>
  99. <input dojoType="dojox.presentation.Action" forSlide="one" on="click" toggle="fade" delay="1500">
  100. <input dojoType="dojox.presentation.Action" forSlide="two" toggle="wipe" delay="1500">
  101. <input dojoType="dojox.presentation.Action" forSlide="three" toggle="wipe" delay="1500">
  102. </div>
  103. <!--
  104. <div dojoType="dojox.presentation.Slide" title="Remote Slide" href="_ext1.html"></div>
  105. -->
  106. <div dojoType="dojox.presentation.Slide" title="Click Blocking" id="animated">
  107. <p>You cannot click on this page</p>
  108. <p dojoType="dojox.presentation.Part" as="1">I told you that you can't click ...</p>
  109. <a href="#" onClick="playIt()">click here to move the title</a>
  110. <input dojoType="dojox.presentation.Action" forSlide="1" toggle="wipe">
  111. <input dojoType="dojox.presentation.Action" forSlide="2">
  112. <input dojoType="dojox.presentation.Action" forSlide="1" toggle="fade">
  113. </div>
  114. <div dojoType="dojox.presentation.Slide" title="Widgets in Slide" noClick="true" id="wdijit">
  115. <p>There is a widget in this page:</p>
  116. <!--p>clicking has been stopped on this page to demonstrate the usage ..</p>
  117. <div dojoType="dojox.presentation.Part" as="foo" startVisible="true">
  118. There _should_ be a _Calendar widget here<br>
  119. <div dojoType="dijit._Calendar"></div>
  120. </div>
  121. <div dojoType="dijit.TitlePane" title="foobar" id="newTitlePane"
  122. style="width:300px; position:absolute; right:40px; top:125px;">
  123. I am a titlepane, you can do cool things with me.
  124. <button onClick="makeDraggable('newTitlePane')">Make me Draggable!</button>
  125. </div>
  126. <div style="width:400px; position:absolute; right: 40px; bottom:40px;">
  127. <p>... so I'm providing a next button: <button dojoType="dijit.form.Button" value="Next" onClick="dijit.byId('testPresentation').nextSlide();">Next</button></p>
  128. </div>
  129. <input type="dojox.presentation.Action" forSlide="foo" toggle="slide">
  130. -->
  131. </div>
  132. <div dojoType="dojox.presentation.Slide" title="The End">
  133. <p>Thanks for watching!</p>
  134. </div>
  135. </div>
  136. </body>
  137. </html>