test_Gallery.html 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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 the Image Gallery</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:true, isDebug: true, defaultTestTheme:'soria'"></script>
  11. <script type="text/javascript" src="../../../dijit/tests/_testCommon.js"></script>
  12. <script type="text/javascript" src="../ThumbnailPicker.js"></script>
  13. <script type="text/javascript" src="../SlideShow.js"></script>
  14. <script type="text/javascript" src="../Gallery.js"></script>
  15. <script type="text/javascript" src="../../../dojo/data/util/simpleFetch.js"></script>
  16. <script type="text/javascript" src="../../data/FlickrStore.js"></script>
  17. <script type="text/javascript" src="../../data/FlickrRestStore.js"></script>
  18. <script type="text/javascript" src="../../../dojo/data/ItemFileReadStore.js"></script>
  19. <script type="text/javascript">
  20. // dojo.require("dojox.image.Gallery");
  21. dojo.require("dojox.data.FlickrRestStore");
  22. dojo.require("dojo.parser"); // find widgets
  23. dojo.addOnLoad(function(){
  24. var flickrRestStore = new dojox.data.FlickrRestStore();
  25. var req = {
  26. query: {
  27. userid: "44153025@N00",
  28. apikey: "8c6803164dbc395fb7131c9d54843627",
  29. sort: [
  30. {
  31. attribute: "interestingness",
  32. descending: true
  33. }
  34. ],
  35. // tags: ["superhorse", "redbones", "beachvolleyball"],
  36. tag_mode: "any"
  37. },
  38. count: 20
  39. };
  40. dijit.byId('gallery1').setDataStore(flickrRestStore, req);
  41. /*
  42. dijit.byId('gallery2').setDataStore(imageItemStore,{ count:20 },{
  43. imageThumbAttr: "thumb",
  44. imageLargeAttr: "large"
  45. });
  46. */
  47. });
  48. </script>
  49. </head>
  50. <body>
  51. <h1 class="testTitle">dojox.image.Gallery</h1>
  52. <h2>From FlickrRestStore:</h2>
  53. <div id="gallery1" dojoType="dojox.image.Gallery" numberThumbs="4"></div>
  54. <!--
  55. <h2>From ItemFileReadStore:</h2>
  56. <div id="gallery2" dojoType="dojox.image.Gallery"></div>
  57. -->
  58. </body>
  59. </html>