1 | <!DOCTYPE html> |
---|
2 | <html> |
---|
3 | <head> |
---|
4 | <meta http-equiv="Content-type" content="text/html; charset=utf-8"/> |
---|
5 | <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no"/> |
---|
6 | <meta name="apple-mobile-web-app-capable" content="yes"/> |
---|
7 | <title>Carousel - widgets</title> |
---|
8 | |
---|
9 | <link href="../../../dijit/themes/tundra/tundra.css" rel="stylesheet"/> |
---|
10 | <script type="text/javascript" src="../deviceTheme.js" data-dojo-config="mblThemeFiles: ['base','Carousel','PageIndicator','SimpleDialog']"></script> |
---|
11 | <script type="text/javascript" src="../../../dojo/dojo.js" data-dojo-config="async: true, parseOnLoad: true, mblAlwaysHideAddressBar: true"></script> |
---|
12 | |
---|
13 | <script type="text/javascript"> |
---|
14 | require([ |
---|
15 | "dojo/_base/connect", |
---|
16 | "dojo/store/JsonRest", |
---|
17 | "dojo/ready", |
---|
18 | "dijit/registry", |
---|
19 | "dojox/mobile/parser", |
---|
20 | "dojox/mobile", |
---|
21 | "dojox/mobile/compat", |
---|
22 | "dojox/mobile/ScrollableView", |
---|
23 | "dojox/mobile/StoreCarousel" |
---|
24 | ], function(connect, JsonRest, ready, registry){ |
---|
25 | store1 = new JsonRest({target: "data/carousel-widget.json"}); |
---|
26 | ready(function(){ |
---|
27 | connect.subscribe("/dojox/mobile/carouselSelect", function(carousel, itemWidget, item, idx){ |
---|
28 | if(carousel.id == "carousel1"){ |
---|
29 | console.log("selected: "+itemWidget); |
---|
30 | } |
---|
31 | }); |
---|
32 | }); |
---|
33 | }); |
---|
34 | </script> |
---|
35 | <style> |
---|
36 | .dijitCalendar { |
---|
37 | color: black; |
---|
38 | } |
---|
39 | </style> |
---|
40 | </head> |
---|
41 | <body class="tundra" style="visibility:hidden;background-color:#6D6D6D"> |
---|
42 | <div id="foo" data-dojo-type="dojox.mobile.ScrollableView"> |
---|
43 | <div id="carousel1" data-dojo-type="dojox.mobile.StoreCarousel" |
---|
44 | data-dojo-props='height:"250px", store:store1, numVisible:"1", title:"Category", selectable:false'></div> |
---|
45 | </div> |
---|
46 | </body> |
---|
47 | </html> |
---|