Debian Codegraph @

dojox/mobile/tests/bidi/Bidi_EdgeToEdgeDataList.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>Bidi Mobile test - EdgeToEdgeDataList</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, mblAlwaysHideAddressBar: true, has: { 'dojo-bidi': true }"></script>
11
12 <script type="text/javascript">
13 require([
14 "dojo/data/ItemFileWriteStore",
15 "dijit/registry",
16 "doh/runner",
17 "dojo/dom",
18 "dojo/ready",
19 "dojo/query",
20 "dojo/_base/lang",
21 "dojox/mobile/parser",
22 "dojox/mobile",
23 "dojox/mobile/compat",
24 "dojox/mobile/ScrollableView",
25 "dojox/mobile/RoundRectDataList",
26 "dojox/mobile/EdgeToEdgeDataList"
27 ], function(ItemFileWriteStore, registry, runner, dom, ready, query, lang){
28 var static_data1 = {
29 items: [
30 { label: "Hello world!", icon: "../images/i-icon-1.png", moveTo: "wifi" },
31 { label: "&#1513;&#1500;&#1493;&#1501; &#1506;&#1493;&#1500;&#1501;!", icon: "../images/i-icon-2.png", moveTo: "bright" },
32 { label: "Hello &#1506;&#1493;&#1500;&#1501;!", icon: "../images/i-icon-3.png", moveTo: "picture" },
33 { label: "&#1513;&#1500;&#1493;&#1501; World!", icon: "../images/i-icon-5.png", moveTo: "wifi" }
34 ]
35 };
36
37 var static_data2 = {
38 items: [
39 {label: "&#1513;&#1500;&#1493;&#1501; World!", moveTo: "dummy"},
40 {label: "Hello &#1506;&#1493;&#1500;&#1501;!", moveTo: "dummy"},
41 {label: "&#1513;&#1500;&#1493;&#1501; &#1506;&#1493;&#1500;&#1501;!", moveTo: "dummy"},
42 {label: "Hello world!", moveTo: "dummy"}
43 ]
44 };
45 store1 = new ItemFileWriteStore({data: lang.clone(static_data1), clearOnClose: true});
46 store2 = new ItemFileWriteStore({data: lang.clone(static_data2), clearOnClose: true});
47 store = store1;
48 var newItems = [[],[]];
49
50 // switch to the selected store
51 switchTo = function(store){
52 window.store = store;
53 registry.byId("roundrect_list1").setStore(store);
54 registry.byId("edgetoedge_list1").setStore(store);
55 registry.byId("roundrect_list2").setStore(store);
56 registry.byId("edgetoedge_list2").setStore(store);
57 registry.byId("roundrect_list3").setStore(store);
58 registry.byId("edgetoedge_list3").setStore(store);
59 registry.byId("roundrect_list4").setStore(store);
60 registry.byId("edgetoedge_list4").setStore(store);
61 registry.byId("roundrect_list5").setStore(store);
62 registry.byId("edgetoedge_list5").setStore(store);
63 registry.byId("roundrect_list6").setStore(store);
64 registry.byId("edgetoedge_list6").setStore(store);
65 };
66 // add a new item
67 add1 = function(){
68 var item = store.newItem({label: "&#1513;&#1500;&#1493;&#1501; World (new)!", moveTo: "dummy"});
69 newItems[(store == store1) ? 1 : 0].push(item);
70 };
71 });
72 </script>
73 </head>
74
75 <body style="visibility:hidden;">
76 <div id="group1" data-dojo-type="dojox.mobile.View" data-dojo-props='keepScrollPos:false'><!-- keepScrollPos=false is to improve performance --> <div id="view0" data-dojo-type="dojox.mobile.ScrollableView">
77 <h2 data-dojo-type="dojox.mobile.Heading">EdgeToEdgeDataList widget</h2>
78 <h1 data-dojo-type="dojox.mobile.Heading">dir LTR</h1>
79 <ul data-dojo-type="dojox.mobile.EdgeToEdgeList" >
80 <li id="l1" data-dojo-type="dojox.mobile.ListItem" data-dojo-props='icon:"../images/LTR.png", moveTo:"view1"'>Tex Dir LTR</li>
81 <li id="l2" data-dojo-type="dojox.mobile.ListItem" data-dojo-props='icon:"../images/RTL.png", moveTo:"view2"'>Tex Dir RTL</li>
82 <li id="l3" data-dojo-type="dojox.mobile.ListItem" data-dojo-props='icon:"../images/auto.png", moveTo:"view3"'>Tex Dir AUTO</li>
83 </ul>
84 <h1 data-dojo-type="dojox.mobile.Heading">dir RTL</h1>
85 <ul data-dojo-type="dojox.mobile.EdgeToEdgeList" >
86 <li id="l4" data-dojo-type="dojox.mobile.ListItem" data-dojo-props='icon:"../images/LTR.png", moveTo:"view4"'>Tex Dir LTR</li>
87 <li id="l5" data-dojo-type="dojox.mobile.ListItem" data-dojo-props='icon:"../images/RTL.png", moveTo:"view5"'>Tex Dir RTL</li>
88 <li id="l6" data-dojo-type="dojox.mobile.ListItem" data-dojo-props='icon:"../images/auto.png", moveTo:"view6"'>Tex Dir AUTO</li>
89 </ul>
90 </div>
91
92
93 <div id="view1" data-dojo-type="dojox.mobile.ScrollableView">
94 <h1 data-dojo-type="dojox.mobile.Heading" data-dojo-props='back:"Back", moveTo:"view0"'>Dir LTR | textDir LTR</h1>
95
96 <h2 data-dojo-type="dojox.mobile.Heading">RoundRectDataList</h2>
97 <ul data-dojo-type="dojox.mobile.RoundRectDataList" id="roundrect_list1" data-dojo-props='textDir:"ltr", store:store, query:{label: "*"}'></ul>
98 <h2 data-dojo-type="dojox.mobile.Heading">EdgeToEdgeDataList</h2>
99 <ul data-dojo-type="dojox.mobile.EdgeToEdgeDataList" id="edgetoedge_list1" data-dojo-props='textDir:"ltr", store:store, query:{label: "*"}'></ul>
100 <table border="1">
101 <tr><th>Show the different set</th><th>Alter the object store</th></tr>
102 <tr><td>
103 <input type="button" value="Set1" onclick="switchTo(store1)">
104 <input type="button" value="Set2" onclick="switchTo(store2)">
105 </td><td>
106 <input type="button" value="Add" onclick="add1()">
107 </td></tr></table>
108
109
110
111 </div>
112
113
114 <div id="view2" data-dojo-type="dojox.mobile.ScrollableView">
115 <h1 data-dojo-type="dojox.mobile.Heading" data-dojo-props='back:"Back", moveTo:"view0"'>Dir LTR | textDir RTL</h1>
116
117 <h2 data-dojo-type="dojox.mobile.Heading">RoundRectDataList</h2>
118 <ul data-dojo-type="dojox.mobile.RoundRectDataList" id="roundrect_list2" data-dojo-props='textDir:"rtl", store:store, query:{label: "*"}'></ul>
119 <h2 data-dojo-type="dojox.mobile.Heading">EdgeToEdgeDataList</h2>
120 <ul data-dojo-type="dojox.mobile.EdgeToEdgeDataList" id="edgetoedge_list2" data-dojo-props='textDir:"rtl", store:store, query:{label: "*"}'></ul>
121 <table border="1">
122 <tr><th>Show the different set</th><th>Alter the object store</th></tr>
123 <tr><td>
124 <input type="button" value="Set1" onclick="switchTo(store1)">
125 <input type="button" value="Set2" onclick="switchTo(store2)">
126 </td><td>
127 <input type="button" value="Add" onclick="add1()">
128 </td></tr></table>
129
130 </div>
131
132 <div id="view3" data-dojo-type="dojox.mobile.ScrollableView">
133 <h1 data-dojo-type="dojox.mobile.Heading" data-dojo-props='back:"Back", moveTo:"view0"'>Dir LTR | textDir AUTO</h1>
134 <h2 data-dojo-type="dojox.mobile.Heading">RoundRectDataList</h2>
135 <ul data-dojo-type="dojox.mobile.RoundRectDataList" id="roundrect_list3" data-dojo-props='textDir:"auto", store:store, query:{label: "*"}'></ul>
136 <h2 data-dojo-type="dojox.mobile.Heading">EdgeToEdgeDataList</h2>
137 <ul data-dojo-type="dojox.mobile.EdgeToEdgeDataList" id="edgetoedge_list3" data-dojo-props='textDir:"auto", store:store, query:{label: "*"}'></ul>
138 <table border="1">
139 <tr><th>Show the different set</th><th>Alter the object store</th></tr>
140 <tr><td>
141 <input type="button" value="Set1" onclick="switchTo(store1)">
142 <input type="button" value="Set2" onclick="switchTo(store2)">
143 </td><td>
144 <input type="button" value="Add" onclick="add1()">
145 </td></tr></table>
146
147 </div>
148
149
150 <div id="view4" data-dojo-type="dojox.mobile.ScrollableView">
151 <h1 data-dojo-type="dojox.mobile.Heading" data-dojo-props='back:"Back", moveTo:"view0"'>Dir RTL | textDir LTR</h1>
152
153 <h2 data-dojo-type="dojox.mobile.Heading">RoundRectDataList</h2>
154 <ul data-dojo-type="dojox.mobile.RoundRectDataList" dir=rtl id="roundrect_list4" data-dojo-props='textDir:"ltr", store:store, query:{label: "*"}'></ul>
155 <h2 data-dojo-type="dojox.mobile.Heading">EdgeToEdgeDataList</h2>
156 <ul data-dojo-type="dojox.mobile.EdgeToEdgeDataList" dir=rtl id="edgetoedge_list4" data-dojo-props='textDir:"ltr", store:store, query:{label: "*"}'></ul>
157 <table border="1">
158 <tr><th>Show the different set</th><th>Alter the object store</th></tr>
159 <tr><td>
160 <input type="button" value="Set1" onclick="switchTo(store1)">
161 <input type="button" value="Set2" onclick="switchTo(store2)">
162 </td><td>
163 <input type="button" value="Add" onclick="add1()">
164 </td></tr></table>
165
166
167 </div>
168
169
170
171 <div dir="rtl" id="view5" data-dojo-type="dojox.mobile.ScrollableView">
172 <h1 data-dojo-type="dojox.mobile.Heading" data-dojo-props='back:"Back", moveTo:"view0"'>Dir RTL | textDir RTL</h1>
173
174 <h2 data-dojo-type="dojox.mobile.Heading">RoundRectDataList</h2>
175 <ul data-dojo-type="dojox.mobile.RoundRectDataList" id="roundrect_list5" data-dojo-props='textDir:"rtl", store:store, query:{label: "*"}'></ul>
176 <h2 data-dojo-type="dojox.mobile.Heading">EdgeToEdgeDataList</h2>
177 <ul data-dojo-type="dojox.mobile.EdgeToEdgeDataList" id="edgetoedge_list5" data-dojo-props='textDir:"rtl", store:store, query:{label: "*"}'></ul>
178 <table border="1">
179 <tr><th>Show the different set</th><th>Alter the object store</th></tr>
180 <tr><td>
181 <input type="button" value="Set1" onclick="switchTo(store1)">
182 <input type="button" value="Set2" onclick="switchTo(store2)">
183 </td><td>
184 <input type="button" value="Add" onclick="add1()">
185 </td></tr></table>
186
187
188 </div>
189
190 <div id="view6" dir="rtl" data-dojo-type="dojox.mobile.ScrollableView">
191 <h1 data-dojo-type="dojox.mobile.Heading" data-dojo-props='back:"Back", moveTo:"view0"'>Dir RTL | textDir AUTO</h1>
192
193 <h2 data-dojo-type="dojox.mobile.Heading">RoundRectDataList</h2>
194 <ul data-dojo-type="dojox.mobile.RoundRectDataList" id="roundrect_list6" data-dojo-props='textDir:"auto", store:store, query:{label: "*"}'></ul>
195 <h2 data-dojo-type="dojox.mobile.Heading">EdgeToEdgeDataList</h2>
196 <ul data-dojo-type="dojox.mobile.EdgeToEdgeDataList" id="edgetoedge_list6" data-dojo-props='textDir:"auto", store:store, query:{label: "*"}'></ul>
197 <table border="1">
198 <tr><th>Show the different set</th><th>Alter the object store</th></tr>
199 <tr><td>
200 <input type="button" value="Set1" onclick="switchTo(store1)">
201 <input type="button" value="Set2" onclick="switchTo(store2)">
202 </td><td>
203 <input type="button" value="Add" onclick="add1()">
204 </td></tr></table>
205
206
207
208 </div>
209
210
211 </div>
212 </body>
213 </html>