| 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 |
|
| 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 |
|
| 16 |
<script type="text/javascript" src="../../../dojo/dojo.js" data-dojo-config=" parseOnLoad: true"></script> |
| 17 |
|
| 18 |
|
| 19 |
<script type="text/javascript" src="../../../dijit/tests/_testCommon.js"></script> |
| 20 |
|
| 21 |
<script type="text/javascript"> |
| 22 |
dojo.require('dojo.data.ItemFileReadStore'); |
| 23 |
dojo.require('dojox.image.Gallery'); |
| 24 |
dojo.require('dojox.data.FlickrRestStore'); |
| 25 |
dojo.require("dojo.parser"); // find widgets |
| 26 |
|
| 27 |
dojo.ready(function(){ |
| 28 |
console.log('onload'); |
| 29 |
var flickrRestStore = new dojox.data.FlickrRestStore(); |
| 30 |
var req = { |
| 31 |
query: { |
| 32 |
userid: "44153025@N00", |
| 33 |
apikey: "8c6803164dbc395fb7131c9d54843627", |
| 34 |
sort: [ |
| 35 |
{ |
| 36 |
attribute: "interestingness", |
| 37 |
descending: true |
| 38 |
} |
| 39 |
], |
| 40 |
// tags: ["superhorse", "redbones", "beachvolleyball"], |
| 41 |
tag_mode: "any" |
| 42 |
}, |
| 43 |
count: 20 |
| 44 |
}; |
| 45 |
setTimeout(function(){ |
| 46 |
dijit.byId('gallery1').setDataStore(flickrRestStore, req); |
| 47 |
},250); |
| 48 |
|
| 49 |
dijit.byId('gallery2').setDataStore(imageItemStore,{ count:20 },{ |
| 50 |
imageThumbAttr: "thumb", |
| 51 |
imageLargeAttr: "large" |
| 52 |
}); |
| 53 |
}); |
| 54 |
</script> |
| 55 |
</head> |
| 56 |
<body class="tundra"> |
| 57 |
<h1 class="testTitle">dojox.image.Gallery</h1> |
| 58 |
|
| 59 |
<h2>From FlickrRestStore:</h2> |
| 60 |
<div id="gallery1" dojoType="dojox.image.Gallery" imageWidth="700" imageHeight="500"></div> |
| 61 |
|
| 62 |
<h2>From ItemFileReadStore:</h2> |
| 63 |
|
| 64 |
<div data-dojo-id="imageItemStore" dojoType="dojo.data.ItemFileReadStore" url="images.json"></div> |
| 65 |
<div id="gallery2" dojoType="dojox.image.Gallery"></div> |
| 66 |
|
| 67 |
</body> |
| 68 |
</html> |