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>Icon (Highlight)</title> |
---|
8 | |
---|
9 | <link href="../themes/common/domButtons/DomButtonRedBadge.css" rel="stylesheet"/> |
---|
10 | <script type="text/javascript" src="../deviceTheme.js" data-dojo-config="mblThemeFiles: ['base','IconContainer']"></script> |
---|
11 | <script type="text/javascript" src="../../../dojo/dojo.js" data-dojo-config="async: true, parseOnLoad: true"></script> |
---|
12 | |
---|
13 | <script type="text/javascript"> |
---|
14 | require([ |
---|
15 | "dojo/dom", |
---|
16 | "dijit/registry", |
---|
17 | "dojox/mobile/parser", |
---|
18 | "dojox/mobile", |
---|
19 | "dojox/mobile/compat", |
---|
20 | "dojox/mobile/IconContainer", |
---|
21 | "dojox/mobile/ScrollableView" |
---|
22 | ], function(dom, registry){ |
---|
23 | highlight = function(i){ |
---|
24 | var w = registry.byId("icon"+i); |
---|
25 | w.unhighlight(); |
---|
26 | w.highlight(dom.byId("val").value); |
---|
27 | } |
---|
28 | }); |
---|
29 | </script> |
---|
30 | |
---|
31 | <style> |
---|
32 | .box { |
---|
33 | border: 1px solid #A7C0E0; |
---|
34 | width: 300px; |
---|
35 | height: 250px; |
---|
36 | background-image: url(images/widget-bg.png); |
---|
37 | background-repeat: no-repeat; |
---|
38 | background-color: white; |
---|
39 | } |
---|
40 | </style> |
---|
41 | </head> |
---|
42 | <body style="visibility:hidden;"> |
---|
43 | <div id="view1" data-dojo-type="dojox.mobile.ScrollableView"> |
---|
44 | <h1 data-dojo-type="dojox.mobile.Heading">Icon (Highlight)</h1> |
---|
45 | <ul id="iconContainer" data-dojo-type="dojox.mobile.IconContainer"> |
---|
46 | <li id="icon0" data-dojo-type="dojox.mobile.IconItem" data-dojo-props='label:"app1", icon:"images/icon-1.png", lazy:true, badge:"55"'><div class="box"></div></li> |
---|
47 | <li id="icon1" data-dojo-type="dojox.mobile.IconItem" data-dojo-props='label:"app2", icon:"images/icon-1.png", lazy:true'><div class="box"></div></li> |
---|
48 | <li id="icon2" data-dojo-type="dojox.mobile.IconItem" data-dojo-props='label:"app3", icon:"images/icon-1.png", lazy:true'><div class="box"></div></li> |
---|
49 | <li id="icon3" data-dojo-type="dojox.mobile.IconItem" data-dojo-props='label:"moveTo", icon:"images/icon-1.png", moveTo:"about", transition:"slide"'></li> |
---|
50 | <li id="icon4" data-dojo-type="dojox.mobile.IconItem" data-dojo-props='label:"href", icon:"images/icon-1.png", href:"test_RoundRectList.html", transition:"slide"'></li> |
---|
51 | <li id="icon5" data-dojo-type="dojox.mobile.IconItem" data-dojo-props='label:"url", icon:"images/icon-1.png", url:"data/view-sample.html", transition:"slide"'></li> |
---|
52 | <li id="icon6" data-dojo-type="dojox.mobile.IconItem" data-dojo-props='label:"url-async", icon:"images/icon-1.png", url:"data/view-sample.html", transition:"slide", sync:false'></li> |
---|
53 | </ul> |
---|
54 | <div style="margin-bottom:10px;">Duration (second): <input id="val" type="text" value="2"></div> |
---|
55 | <input type="button" onclick="highlight(0)" value="app1"> |
---|
56 | <input type="button" onclick="highlight(1)" value="app2"> |
---|
57 | <input type="button" onclick="highlight(2)" value="app3"> |
---|
58 | <input type="button" onclick="highlight(3)" value="moveTo"> |
---|
59 | <input type="button" onclick="highlight(4)" value="href"> |
---|
60 | <input type="button" onclick="highlight(5)" value="url"> |
---|
61 | <input type="button" onclick="highlight(6)" value="url-async"> |
---|
62 | </div> |
---|
63 | |
---|
64 | <div id="about" data-dojo-type="dojox.mobile.View"> |
---|
65 | <h1 data-dojo-type="dojox.mobile.Heading" data-dojo-props='back:"Icon Container", moveTo:"view1"'>About</h1> |
---|
66 | <h2 data-dojo-type="dojox.mobile.RoundRectCategory">My Phone</h2> |
---|
67 | <ul data-dojo-type="dojox.mobile.RoundRectList"> |
---|
68 | <li data-dojo-type="dojox.mobile.ListItem" data-dojo-props='rightText:"AcmePhone"'> |
---|
69 | Network |
---|
70 | </li> |
---|
71 | <li data-dojo-type="dojox.mobile.ListItem" data-dojo-props='rightText:"AcmePhone"'> |
---|
72 | Line |
---|
73 | </li> |
---|
74 | <li data-dojo-type="dojox.mobile.ListItem" data-dojo-props='rightText:"1024"'> |
---|
75 | Songs |
---|
76 | </li> |
---|
77 | </ul> |
---|
78 | </div> |
---|
79 | </body> |
---|
80 | </html> |
---|