Debian Codegraph @

dojox/mvc/tests/1.7/mobile/demo/demo-async.html

raw symbols SCIP
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3 <head>
4 <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no"/>
5 <meta name="apple-mobile-web-app-capable" content="yes" />
6 <title>Mobile MVC</title>
7 <link rel="stylesheet" type="text/css" href="demo.css"/>
8 <style>
9 html, body{
10 height: 100%;
11 overflow: hidden;
12 }
13 .mblEdgeToEdgeList {
14 background-color: #DBDDE2;
15 }
16 </style>
17
18 <!--<script type="text/javascript" src="../../../../../../dojo/dojo.js" djConfig="parseOnLoad: false"></script> -->
19 <script type="text/javascript" djConfig="parseOnLoad:0,isDebug:1,async:1" src="../../../../../../dojo/dojo.js"></script>
20 <script type="text/javascript" src="src-async.js" charset="utf-8"></script>
21
22 </head>
23 <body>
24 <div id="wholepage" style="display:none">
25 <div id="foo" dojoType="dojox.mobile.View" selected="true">
26 <h1 dojoType="dojox.mobile.Heading">Mobile MVC Demo</h1>
27 <ul dojoType="dojox.mobile.RoundRectList">
28 <li id="sdb" dojoType="dojox.mobile.ListItem" transition="slide" moveTo="settings">
29 Simple Data Binding
30 </li>
31 <li id="rdb" dojoType="dojox.mobile.ListItem" transition="slide" moveTo="repeat">
32 Repeat Data Binding
33 </li>
34 <li id="sfg" dojoType="dojox.mobile.ListItem" transition="slide" moveTo="generate">
35 Generate Simple Form
36 </li>
37 </ul>
38 </div>
39
40 <div id="settings" dojoType="dojox.mobile.ScrollableView">
41 <h1 id="home" dojoType="dojox.mobile.Heading" back="Back" moveTo="foo">Data Binding Example</h1>
42 <form name="testForm" id="testForm">
43 <div class="field-title">Ship to - Bill to Address</div>
44 <div class="fieldset" dojoType="dojox.mvc.Group" ref="model">
45 <div class="field-row">
46 <span>Order #</span>
47 <input id="lastnameInput" dojoType="dojox.mobile.TextBox"
48 placeholder="Order #" ref="'rel:Serial'"/>
49 </div>
50 <div class="field-row">
51 <span>Last</span>
52 <input id="serialInput" dojoType="dojox.mobile.TextBox"
53 placeholder="Last" ref="'rel:Last'"/>
54 </div>
55 <div class="field-row">
56 <span>Email</span>
57 <input id="emailInput1" dojoType="dojox.mobile.TextBox"
58 placeholder="Last" ref="'rel:Email'"/>
59 </div>
60 </div>
61 <div class="spacer"></div>
62 <button id="shipto" type="button" dojoType="dojox.mobile.Button" class="mblBlueButton" onclick="setRef('addrGroup', model.ShipTo)">Ship To</button>
63 <button id="billto" type="button" dojoType="dojox.mobile.Button" class="mblBlueButton" onclick="setRef('addrGroup', model.BillTo)">Bill To</button>
64 <br/>
65 <div class="fieldset" id="addrGroup" dojoType="dojox.mvc.Group" ref="model.ShipTo">
66 <div class="field-row">
67 <span>Street</span>
68 <input id="streetInput" dojoType="dojox.mobile.TextBox"
69 placeholder="Street" ref="'rel:Street'"/>
70 </div>
71 <div class="field-row">
72 <span>City</span>
73 <input id="cityInput" dojoType="dojox.mobile.TextBox"
74 placeholder="City" ref="'rel:City'"/>
75 </div>
76 <div class="field-row">
77 <span>State</span>
78 <input id="stateInput" dojoType="dojox.mobile.TextBox"
79 placeholder="State" ref="'rel:State'"/>
80 </div>
81 <div class="field-row">
82 <span>ZIP Code</span>
83 <input id="zipInput" dojoType="dojox.mobile.TextBox"
84 placeholder="ZIP Code" ref="'rel:Zip'"/>
85 </div>
86 </div>
87 <div class="spacer"></div>
88 <button id="reset1" type="button" dojoType="dojox.mobile.Button" class="mblBlueButton" onclick="model.reset()">Reset</button>
89 </form>
90 </div>
91
92 <div id="repeat" dojoType="dojox.mobile.ScrollableView">
93 <h1 dojoType="dojox.mobile.Heading" back="Back" moveTo="foo">Repeat Data Binding Example</h1>
94 <form name="repeatTestForm" id="repeatTestForm">
95 <div class="field-title">Search Results</div>
96 <div class="fieldset" dojoType="dojox.mvc.Repeat" class="row" ref="repeatmodel">
97 <div dojoType="dojox.mvc.Group" ref="'rel:${this.index}'">
98 <div class="row">
99 <input dojoType="dojox.mobile.TextBox"
100 id="nameInput${this.index}" ref="'rel:First'" placeHolder="First Name"/>
101 <button id="details${this.index}" type="button" dojoType="dojox.mobile.Button" class="mblBlueButton" onclick="setDetailsContext('${this.index}')">Details</button>
102 </div>
103 </div>
104 </div>
105 <div class="spacer"></div>
106 <div dojoType="dojox.mvc.Group" ref="repeatmodel">
107 <div id="detailsBanner">Details for selected index:</div>
108 <div class="fieldset" id="detailsGroup" dojoType="dojox.mvc.Group" ref="'rel:0'">
109 <div class="field-row">
110 <span>First Name</span>
111 <input id="firstInput" dojoType="dojox.mobile.TextBox"
112 placeholder="First Name" ref="'rel:First'"/>
113 </div>
114 <div class="field-row">
115 <span>Last Name</span>
116 <input id="lastInput" dojoType="dojox.mobile.TextBox"
117 placeholder="Last Name" ref="'rel:Last'"/>
118 </div>
119 <div class="field-row">
120 <span>Email</span>
121 <input id="emailInput2" dojoType="dojox.mobile.TextBox"
122 placeholder="Email" ref="'rel:Email'"/>
123 </div>
124 <div class="field-row">
125 <span>Telephone</span>
126 <input id="telInput" dojoType="dojox.mobile.TextBox"
127 placeholder="Telephone" ref="'rel:Tel'"/>
128 </div>
129 </div>
130 </div>
131 <div class="spacer"></div>
132 <button id="add" type="button" dojoType="dojox.mobile.Button" class="mblBlueButton" onclick="insertResult(nextIndexToAdd)">Add</button>
133 <button id="save" type="button" dojoType="dojox.mobile.Button" class="mblBlueButton" onclick="console.log(repeatmodel[selectedIndex].toPlainObject());repeatmodel[selectedIndex].commit()">Save</button>
134 <button id="reset2" type="button" dojoType="dojox.mobile.Button" class="mblBlueButton" onclick="repeatmodel.reset()">Reset</button>
135 </form>
136
137 </div>
138
139 <div id="generate" data-dojo-type="dojox.mobile.ScrollableView">
140 <h1 data-dojo-type="dojox.mobile.Heading" back="Back" moveTo="foo">Simple Form Generate Example</h1>
141 <div class="field-title"></div>
142 <div id="main">
143 <div id="leftNav"></div>
144 <div id="mainContent" class="generate-maincontent">
145 <div id="outerModelArea">
146 <div id="generateModel">Model</div>
147 <div class="generate-textarea-row">
148 <textarea class="generate-textarea-cell" data-dojo-type="dojox.mobile.TextArea" id="modelArea">
149 {
150 "Serial": "11111",
151 "First": "John",
152 "Last": "Doe",
153 "Email": "[email protected]",
154 "Phones": [
155 {
156 "Office": "111-111-1111"
157 },
158 {
159 "Mobile": "222-222-2222"
160 }
161 ]
162 }
163 </textarea>
164 </div>
165 <div class="fieldset">
166 <div class="spacer"></div>
167 <button id="generate1" type="button" data-dojo-type="dojox.mobile.Button" class="mblBlueButton" onclick="updateView()">Generate Form</button>
168 </div>
169 </div>
170 <div id="viewArea" style="display:none">
171 <div id="generateView">Generated View</div>
172 <div class="fieldset">
173 <div id="view" data-dojo-type="dojox.mvc.Generate" data-dojo-props="widgetMapping:{'String' : 'dojox.mobile.TextBox'}, idNameMapping:{'String' : 'TB'}"></div>
174 </div>
175 <div class="fieldset">
176 <div class="spacer"></div>
177 <button id="updateModel" type="button" data-dojo-type="dojox.mobile.Button" class="mblBlueButton" onclick="updateModel()">Update Model</button>
178 </div>
179 </div>
180 </div>
181 </div>
182 <textarea style="display:none" data-dojo-type="dojox.mobile.TextArea" id="modelArea2">
183 {
184 "Serial": "11111",
185 "First": "John",
186 "Middle": "J",
187 "Last": "Doe",
188 "Email": "[email protected]",
189 "Phones": [
190 {
191 "Office": "111-111-1111"
192 },
193 {
194 "Mobile": "222-222-2222"
195 }
196 ]
197 }
198 </textarea>
199
200 </div>
201 </div>
202 </body>
203 </html>