Debian Codegraph @

dojox/mvc/tests/1.7/mobile/demo/demo-async-store.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 <title>Async Mobile MVC</title>
6 <link rel="stylesheet" type="text/css" href="demo.css"/>
7 <style>
8
9 html, body{
10 height: 100%;
11 overflow: hidden;
12 position: relative;
13 }
14 .mblEdgeToEdgeList {
15 background-color: #DBDDE2;
16 }
17 </style>
18
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-store.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 <h2 dojoType="dojox.mobile.RoundRectCategory">Mobile MVC Views</h2>
28 <ul dojoType="dojox.mobile.RoundRectList">
29 <li id="sdb" dojoType="dojox.mobile.ListItem" icon="images/i-icon-1.png" transition="slide" moveTo="settings">
30 Simple Data Binding
31 </li>
32 <li id="rdb" dojoType="dojox.mobile.ListItem" icon="images/i-icon-2.png" transition="slide" moveTo="repeat">
33 Repeat Data Binding
34 </li>
35 <li id="sfg" dojoType="dojox.mobile.ListItem" icon="images/i-icon-3.png" transition="slide" moveTo="generate">
36 Simple Form Generate
37 </li>
38 </ul>
39 </div>
40
41 <div id="settings" dojoType="dojox.mobile.ScrollableView">
42 <h1 id="home" dojoType="dojox.mobile.Heading" back="Home" moveTo="foo">Data Binding Example</h1>
43 <form name="testForm" id="testForm">
44 <div class="field-title">Ship to - Bill to Address</div>
45 <div class="fieldset" dojoType="dojox.mvc.Group" ref="model">
46 <div class="field-row">
47 <span>Order #</span>
48 <input id="lastnameInput" dojoType="dojox.mobile.TextBox"
49 placeholder="Order #" ref="'rel:Serial'"/>
50 </div>
51 <div class="field-row">
52 <span>Last</span>
53 <input id="serialInput" dojoType="dojox.mobile.TextBox"
54 placeholder="Last" ref="'rel:Last'"/>
55 </div>
56 <div class="field-row">
57 <span>Email</span>
58 <input id="emailInput1" dojoType="dojox.mobile.TextBox"
59 placeholder="Last" ref="'rel:Email'"/>
60 </div>
61 </div>
62 <div class="spacer"></div>
63 <button id="shipto" type="button" dojoType="dojox.mobile.Button" class="mblBlueButton" onclick="setRef('addrGroup', model.ShipTo)">Ship To</button>
64 <button id="billto" type="button" dojoType="dojox.mobile.Button" class="mblBlueButton" onclick="setRef('addrGroup', model.BillTo)">Bill To</button>
65 <br/>
66 <div class="fieldset" id="addrGroup" dojoType="dojox.mvc.Group" ref="model.ShipTo">
67 <div class="field-row">
68 <span>Street</span>
69 <input id="streetInput" dojoType="dojox.mobile.TextBox"
70 placeholder="Street" ref="'rel:Street'"/>
71 </div>
72 <div class="field-row">
73 <span>City</span>
74 <input id="cityInput" dojoType="dojox.mobile.TextBox"
75 placeholder="City" ref="'rel:City'"/>
76 </div>
77 <div class="field-row">
78 <span>State</span>
79 <input id="stateInput" dojoType="dojox.mobile.TextBox"
80 placeholder="State" ref="'rel:State'"/>
81 </div>
82 <div class="field-row">
83 <span>ZIP Code</span>
84 <input id="zipInput" dojoType="dojox.mobile.TextBox"
85 placeholder="ZIP Code" ref="'rel:Zip'"/>
86 </div>
87 </div>
88 <div class="spacer"></div>
89 <button id="reset1" type="button" dojoType="dojox.mobile.Button" class="mblBlueButton" onclick="model.reset()">Reset</button>
90 </form>
91 </div>
92
93 <div id="repeat" dojoType="dojox.mobile.ScrollableView">
94 <h1 dojoType="dojox.mobile.Heading" back="Home" moveTo="foo">Repeat Data Binding Example</h1>
95 <form name="repeatTestForm" id="repeatTestForm">
96 <div class="field-title">Search Results</div>
97 <div class="fieldset" dojoType="dojox.mvc.Repeat" class="row" ref="repeatmodel">
98 <div dojoType="dojox.mvc.Group" ref="'rel:${this.index}'">
99 <div class="row">
100 <input dojoType="dojox.mobile.TextBox"
101 id="nameInput${this.index}" ref="'rel:First'" placeHolder="First Name"/>
102 <button id="details${this.index}" type="button" dojoType="dojox.mobile.Button" class="mblBlueButton" onclick="setDetailsContext('${this.index}')">Details</button>
103 </div>
104 </div>
105 </div>
106 <div class="spacer"></div>
107 <div dojoType="dojox.mvc.Group" ref="repeatmodel">
108 <div id="detailsBanner">Details for selected index:</div>
109 <div class="fieldset" id="detailsGroup" dojoType="dojox.mvc.Group" ref="'rel:0'">
110 <div class="field-row">
111 <span>First Name</span>
112 <input id="firstInput" dojoType="dojox.mobile.TextBox"
113 placeholder="First Name" ref="'rel:First'"/>
114 </div>
115 <div class="field-row">
116 <span>Last Name</span>
117 <input id="lastInput" dojoType="dojox.mobile.TextBox"
118 placeholder="Last Name" ref="'rel:Last'"/>
119 </div>
120 <div class="field-row">
121 <span>Email</span>
122 <input id="emailInput2" dojoType="dojox.mobile.TextBox"
123 placeholder="Email" ref="'rel:Email'"/>
124 </div>
125 <div class="field-row">
126 <span>Telephone</span>
127 <input id="telInput" dojoType="dojox.mobile.TextBox"
128 placeholder="Telephone" ref="'rel:Tel'"/>
129 </div>
130 </div>
131 </div>
132 <div class="spacer"></div>
133 <button id="add" type="button" dojoType="dojox.mobile.Button" class="mblBlueButton" onclick="insertResult(nextIndexToAdd)">Add</button>
134 <button id="save" type="button" dojoType="dojox.mobile.Button" class="mblBlueButton" onclick="console.log(repeatmodel[selectedIndex].toPlainObject());repeatmodel[selectedIndex].commit()">Save</button>
135 <button id="reset2" type="button" dojoType="dojox.mobile.Button" class="mblBlueButton" onclick="repeatmodel.reset()">Reset</button>
136 </form>
137
138 </div>
139
140 <div id="generate" data-dojo-type="dojox.mobile.ScrollableView">
141 <h1 data-dojo-type="dojox.mobile.Heading" back="Home" moveTo="foo">Simple Form Generate Example</h1>
142 <div class="field-title"></div>
143 <div id="main">
144 <div id="leftNav"></div>
145 <div id="mainContent" class="generate-maincontent">
146 <div id="outerModelArea">
147 <h3 data-dojo-type="dojox.mobile.RoundRectCategory">Model</h3>
148 <div class="generate-textarea-row">
149 <textarea class="generate-textarea-cell" data-dojo-type="dojox.mobile.TextArea" id="modelArea">
150 {
151 "Serial": "11111",
152 "First": "John",
153 "Last": "Doe",
154 "Email": "[email protected]",
155 "Phones": [
156 {
157 "Office": "111-111-1111"
158 },
159 {
160 "Mobile": "222-222-2222"
161 }
162 ]
163 }
164 </textarea>
165 </div>
166 <div class="fieldset">
167 <div class="spacer"></div>
168 <button id="generate1" type="button" data-dojo-type="dojox.mobile.Button" class="mblBlueButton" onclick="updateView()">Generate Form</button>
169 </div>
170 </div>
171 <div id="viewArea" style="display:none">
172 <h3 data-dojo-type="dojox.mobile.RoundRectCategory">Generated View</h3>
173 <div class="fieldset">
174 <div id="view" data-dojo-type="dojox.mvc.Generate" data-dojo-props="widgetMapping:{'String' : 'dojox.mobile.TextBox'}, idNameMapping:{'String' : 'TB'}"></div>
175 </div>
176 <div class="fieldset">
177 <div class="spacer"></div>
178 <button id="updateModel" type="button" data-dojo-type="dojox.mobile.Button" class="mblBlueButton" onclick="updateModel()">Update Model</button>
179 </div>
180 </div>
181 </div>
182 </div>
183 </div>
184 </div>
185 </body>
186 </html>