Debian Codegraph @

dojox/image/tests/test_Gallery_GoogleData.html

raw symbols SCIP
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
7 <!-- required: a default theme file -->
8 <link rel="stylesheet" id="themeStyles" href="../../../dijit/themes/tundra/tundra.css">
9 <link rel="stylesheet" href="../resources/image.css">
10
11 <style type="text/css">
12 @import "../../../dijit/tests/css/dijitTests.css";
13 </style>
14
15 <!-- required: dojo.js -->
16 <script type="text/javascript" src="../../../dojo/dojo.js" data-dojo-config="isDebug:true, parseOnLoad: true"></script>
17
18 <!-- do not use! only for testing dynamic themes -->
19 <script type="text/javascript" src="../../../dijit/tests/_testCommon.js"></script>
20
21 <!-- debugging includes -->
22 <script type="text/javascript" src="../ThumbnailPicker.js"></script>
23 <script type="text/javascript" src="../SlideShow.js"></script>
24 <script type="text/javascript" src="../Gallery.js"></script>
25 <script type="text/javascript" src="../../data/GoogleSearchStore.js"></script>
26
27 <script type="text/javascript">
28 dojo.require("dojox.image.Gallery");
29 dojo.require("dojox.data.GoogleSearchStore");
30 dojo.require("dojox.data.FlickrRestStore");
31 dojo.require("dojo.parser"); // find widgets
32
33 dojo.addOnLoad(function(){
34 var googleImageStore = new dojox.data.GoogleImageSearchStore();
35 var req = {
36 query: {
37 text: "kinsale"
38 },
39 count: 32
40 };
41 // testCommon defers parsing by a little, so dijit's aren't ready
42 // in addOnLoad for soria/nihilo :(
43 setTimeout(function(){
44 dijit.byId('gallery1').setDataStore(googleImageStore, req);
45 },250);
46 });
47
48 function changeStore(){
49 var flickrRestStore = new dojox.data.FlickrRestStore();
50 var req = {
51 query: {
52 userid: "44153025@N00",
53 apikey: "8c6803164dbc395fb7131c9d54843627",
54 sort: [
55 {
56 attribute: "interestingness",
57 descending: true
58 }
59 ],
60 tag_mode: "any"
61 },
62 count: 20
63 };
64 dijit.byId('gallery1').setDataStore(flickrRestStore, req, {
65 imageThumbAttr: "imageUrlThumb",
66 imageLargeAttr: "imageUrl",
67 titleAttr: "title"
68
69 });
70 }
71 </script>
72 </head>
73 <body class="tundra">
74 <h1 class="testTitle">dojox.image.Gallery</h1>
75
76 <h2>From GoogleImageSearchStore:</h2>
77
78 <button onclick="changeStore()">Change Datastore</button>
79
80 <div id="gallery1" dojoType="dojox.image.Gallery" imageWidth="700" imageHeight="500"
81 imageThumbAttr="tbUrl" imageLargeAttr="unescapedUrl" titleAttr="titleNoFormatting"></div>
82
83 </body>
84 </html>