test_SlideShow.html 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  5. <title>Testing dojox.image.SlideShow</title>
  6. <style type="text/css">
  7. @import "../../../dijit/tests/css/dijitTests.css";
  8. @import "../resources/image.css";
  9. </style>
  10. <script type="text/javascript" src="../../../dojo/dojo.js" djconfig="parseOnLoad:false, isDebug: true, defaultTestTheme: 'soria'"></script>
  11. <script type="text/javascript" src="../../../dijit/tests/_testCommon.js"></script>
  12. <script type="text/javascript" src="../SlideShow.js"></script>
  13. <script type="text/javascript" src="../../../dojo/data/ItemFileReadStore.js"></script>
  14. <script type="text/javascript" src="../../data/FlickrRestStore.js"></script>
  15. <script type="text/javascript">
  16. // dojo.require("dojox.image.SlideShow");
  17. // dojo.require("dojox.data.FlickrRestStore");
  18. // dojo.require("dojo.data.ItemFileReadStore");
  19. dojo.require("dojo.parser"); // find widgets
  20. dojo.addOnLoad(function(){
  21. //Initialize the first SlideShow with an ItemFileReadStore
  22. dojo.parser.parse(dojo.body());
  23. dijit.byId('slideshow1').setDataStore(imageItemStore,
  24. { query: {}, count:20 },
  25. {
  26. imageThumbAttr: "thumb",
  27. imageLargeAttr: "large"
  28. }
  29. );
  30. //INitialize the second store with a FlickrRestStore
  31. var flickrRestStore = new dojox.data.FlickrRestStore();
  32. var req = {
  33. query: {
  34. userid: "44153025@N00",
  35. apikey: "8c6803164dbc395fb7131c9d54843627"
  36. },
  37. count: 20
  38. };
  39. dijit.byId('slideshow2').setDataStore(flickrRestStore, req);
  40. });
  41. </script>
  42. </head>
  43. <body>
  44. <h1 class="testTitle">dojox.image.SlideShow</h1>
  45. <h2>from dojo.data.ItemFileReadStore</h2>
  46. <div jsId="imageItemStore" dojoType="dojo.data.ItemFileReadStore" url="images.json"></div>
  47. This SlideShow should display five photos, and loop. It should also
  48. open a URL when the image is clicked. The widget should also resize to
  49. fit the image.
  50. <div id="slideshow1" dojoType="dojox.image.SlideShow"></div>
  51. <h2>from dojox.data.FlickrRestStore</h2>
  52. This SlideShow should display five photos, and not loop. It should also not
  53. open a URL when the image is clicked. AutoLoading of images is also disabled.
  54. The time between images in a SlideShow is 1 second. The widget should not resize to fit the image
  55. <div id="slideshow2" dojoType="dojox.image.SlideShow" noLink="true" loop="false" autoLoad="false"
  56. slideshowInterval="1" fixedHeight="true"></div>
  57. </body>
  58. </html>