2150 |
mathias |
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 |
|
|
|
7 |
<style type="text/css">
|
|
|
8 |
@import "../../../dijit/tests/css/dijitTests.css";
|
|
|
9 |
@import "../resources/image.css";
|
|
|
10 |
</style>
|
|
|
11 |
|
|
|
12 |
<script type="text/javascript" src="../../../dojo/dojo.js" djconfig="parseOnLoad:false, isDebug: true, defaultTestTheme: 'soria'"></script>
|
|
|
13 |
<script type="text/javascript" src="../../../dijit/tests/_testCommon.js"></script>
|
|
|
14 |
<script type="text/javascript" src="../SlideShow.js"></script>
|
|
|
15 |
<script type="text/javascript" src="../../../dojo/data/ItemFileReadStore.js"></script>
|
|
|
16 |
<script type="text/javascript" src="../../data/FlickrRestStore.js"></script>
|
|
|
17 |
|
|
|
18 |
<script type="text/javascript">
|
|
|
19 |
// dojo.require("dojox.image.SlideShow");
|
|
|
20 |
// dojo.require("dojox.data.FlickrRestStore");
|
|
|
21 |
// dojo.require("dojo.data.ItemFileReadStore");
|
|
|
22 |
dojo.require("dojo.parser"); // find widgets
|
|
|
23 |
|
|
|
24 |
dojo.addOnLoad(function(){
|
|
|
25 |
//Initialize the first SlideShow with an ItemFileReadStore
|
|
|
26 |
dojo.parser.parse(dojo.body());
|
|
|
27 |
dijit.byId('slideshow1').setDataStore(imageItemStore,
|
|
|
28 |
{ query: {}, count:20 },
|
|
|
29 |
{
|
|
|
30 |
imageThumbAttr: "thumb",
|
|
|
31 |
imageLargeAttr: "large"
|
|
|
32 |
}
|
|
|
33 |
);
|
|
|
34 |
|
|
|
35 |
//INitialize the second store with a FlickrRestStore
|
|
|
36 |
var flickrRestStore = new dojox.data.FlickrRestStore();
|
|
|
37 |
var req = {
|
|
|
38 |
query: {
|
|
|
39 |
userid: "44153025@N00",
|
|
|
40 |
apikey: "8c6803164dbc395fb7131c9d54843627"
|
|
|
41 |
},
|
|
|
42 |
count: 20
|
|
|
43 |
};
|
|
|
44 |
dijit.byId('slideshow2').setDataStore(flickrRestStore, req);
|
|
|
45 |
});
|
|
|
46 |
|
|
|
47 |
</script>
|
|
|
48 |
</head>
|
|
|
49 |
<body>
|
|
|
50 |
<h1 class="testTitle">dojox.image.SlideShow</h1>
|
|
|
51 |
|
|
|
52 |
<h2>from dojo.data.ItemFileReadStore</h2>
|
|
|
53 |
<div jsId="imageItemStore" dojoType="dojo.data.ItemFileReadStore" url="images.json"></div>
|
|
|
54 |
|
|
|
55 |
This SlideShow should display five photos, and loop. It should also
|
|
|
56 |
open a URL when the image is clicked. The widget should also resize to
|
|
|
57 |
fit the image.
|
|
|
58 |
<div id="slideshow1" dojoType="dojox.image.SlideShow"></div>
|
|
|
59 |
|
|
|
60 |
<h2>from dojox.data.FlickrRestStore</h2>
|
|
|
61 |
This SlideShow should display five photos, and not loop. It should also not
|
|
|
62 |
open a URL when the image is clicked. AutoLoading of images is also disabled.
|
|
|
63 |
The time between images in a SlideShow is 1 second. The widget should not resize to fit the image
|
|
|
64 |
<div id="slideshow2" dojoType="dojox.image.SlideShow" noLink="true" loop="false" autoLoad="false"
|
|
|
65 |
slideshowInterval="1" fixedHeight="true"></div>
|
|
|
66 |
|
|
|
67 |
</body>
|
|
|
68 |
</html>
|