Debian Codegraph @

dojox/mobile/tests/test_EdgeToEdgeStoreList-categ.html

raw symbols SCIP
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>EdgeToEdgeStoreList - Categorized List</title>
8
9 <script type="text/javascript" src="../deviceTheme.js" data-dojo-config="mblThemeFiles: ['base']"></script>
10 <script type="text/javascript" src="../../../dojo/dojo.js" data-dojo-config="async: true, parseOnLoad: true"></script>
11
12 <script type="text/javascript">
13 require([
14 "dojo/_base/Deferred",
15 "dojo/store/Cache",
16 "dojo/store/JsonRest",
17 "dojo/store/Memory",
18 "dojo/store/Observable",
19 "dijit/registry",
20 "dojox/mobile/parser",
21 "dojox/mobile",
22 "dojox/mobile/compat",
23 "dojox/mobile/EdgeToEdgeStoreList"
24 ], function(Deferred, Cache, JsonRest, Memory, Observable, registry){
25 var static_data1 = [
26 { label: "Category 1", header: true,
27 children: [
28 { label: "Wi-Fi", icon: "images/i-icon-1.png", moveTo: "wifi" },
29 { label: "Brightness & Wallpaper", icon: "images/i-icon-2.png", moveTo: "bright" },
30 { label: "Picture Frame", icon: "images/i-icon-3.png", moveTo: "picture" },
31 { label: "General", icon: "images/i-icon-4.png", moveTo: "general", "selected": "true" },
32 { label: "Mail, Contacts, Calendars", icon: "images/i-icon-5.png", moveTo: "wifi" },
33 { label: "Safari", icon: "images/i-icon-6.png", moveTo: "bright" },
34 { label: "iPod", icon: "images/i-icon-7.png", moveTo: "picture" }
35 ]
36 },
37 { label: "Category 2", header: true,
38 children: [
39 { label: "Video", icon: "images/i-icon-8.png", moveTo: "general" },
40 { label: "Photos", icon: "images/i-icon-9.png", moveTo: "wifi" },
41 { label: "Store", icon: "images/i-icon-10.png", moveTo: "bright" }
42 ]
43 }
44 ];
45
46 var static_data2 = [
47 {label: "Apple", moveTo: "dummy"},
48 {label: "Banana", moveTo: "dummy"},
49 {label: "Cherry", moveTo: "dummy"},
50 {label: "Grape", moveTo: "dummy"},
51 {label: "Kiwi", moveTo: "dummy"},
52 {label: "Lemon", moveTo: "dummy"},
53 {label: "Melon", moveTo: "dummy"},
54 {label: "Orange", moveTo: "dummy"},
55 {label: "Peach", moveTo: "dummy"}
56 ];
57 store1 = Observable(new Memory({idProperty:"label", data: static_data1}));
58 store2 = Observable(new Memory({idProperty:"label", data: static_data2}));
59 store1.__counter = store2.__counter = 1;
60 store = store1;
61
62 // switch to the selected store
63 switchTo = function(store){
64 window.store = store;
65 registry.byId("list").setStore(store);
66 };
67 });
68 </script>
69 </head>
70 <body style="visibility:hidden;">
71 <div data-dojo-type="dojox.mobile.View">
72 <h1 data-dojo-type="dojox.mobile.Heading">EdgeToEdgeStoreList</h1>
73 <ul data-dojo-type="dojox.mobile.EdgeToEdgeStoreList" id="list" data-dojo-props='store:store, query:{}'></ul>
74 <p>show the different set:<br>
75 <input type="button" value="Set1" onclick="switchTo(store1)">
76 <input type="button" value="Set2" onclick="switchTo(store2)">
77 </div>
78 </body>
79 </html>