-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathauto-complete-issue-01.xhtml
229 lines (225 loc) · 9.33 KB
/
auto-complete-issue-01.xhtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xxf="http://orbeon.org/oxf/xml/xforms"
xmlns:fr="http://orbeon.org/oxf/xml/form-runner"
xmlns:f="http://orbeon.org/oxf/xml/formatting"
xmlns:xf="http://www.w3.org/2002/xforms">
<head>
<meta name="ROBOTS" CONTENT="NONE,NOARCHIVE,NOFOLLOW" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>Test-Auto-Complete-Issue</title>
<xf:model id="coreModel">
<xf:instance xmlns:xxf="http://orbeon.org/oxf/xml/xforms" xmlns:xf="http://www.w3.org/2002/xforms" id="constants" xxf:readonly="true">
<constants xmlns="">
<diaryStatus>
<status>
<name>Booked</name>
<value>Booked</value>
<color>GREY</color>
</status>
<status>
<name>Arrived</name>
<value>Arrived</value>
<color>RED</color>
</status>
<status>
<name>Did Not Show</name>
<value>DidNotShow</value>
<color>YELLOW</color>
</status>
<status>
<name>Blocked</name>
<value>Blocked</value>
<color>GREY</color>
</status>
<status>
<name>Cancelled</name>
<value>Cancelled</value>
<color>WHITE</color>
</status>
</diaryStatus>
</constants>
</xf:instance>
<xf:instance xmlns:xf="http://www.w3.org/2002/xforms" id="appointmentList">
<examinations xmlns="">
<descriptions>
<name>Introduction</name>
</descriptions>
<descriptions>
<name>Follow-up</name>
</descriptions>
<descriptions>
<name>Revision</name>
</descriptions>
</examinations>
</xf:instance>
</xf:model>
<xf:model id="diaryModel">
<xf:instance id="booking">
<booking xmlns="">
<slotKey/>
<location1/>
<location2/>
<location3/>
<gSummary/>
<gdStart/>
<gtStart/>
<gtEnd/>
<dstart/>
<tstart/>
<dend/>
<tend/>
<summary/>
<attendee/>
<attendeeName/>
<contact/>
<description/>
<status/>
<ftype/>
</booking>
</xf:instance>
<xf:bind nodeset="instance('booking')">
<xf:bind nodeset="tstart" required="true()"/>
<xf:bind nodeset="tend" required="true()"/>
<xf:bind nodeset="gdStart" type="xs:date" readonly="false()" calculate="if (xs:string(.) = '') then xs:date(substring(xs:string(current-date()),1,10)) else ." />
<xf:bind nodeset="dstart" required="true()" type="xs:date" readonly="false()" calculate="if (xs:string(.) = '') then xs:date(substring(xs:string(current-date()),1,10)) else ." />
<xf:bind nodeset="dend" required="true()" type="xs:date" readonly="false()" calculate="if (xs:string(.) = '') then xs:date(substring(xs:string(current-date()),1,10)) else ." />
</xf:bind>
<xf:instance id="diaries">
<Diaries xmlns="">
<IND>
<diary><name>Do not Book Individual</name><value>IGNORE</value></diary>
<diary><name>Dave Jones</name><value>1</value></diary>
<diary><name>Robert Smith</name><value>2</value></diary>
</IND>
<FAC>
<diary><name>Do not Book Room</name><value>IGNORE</value></diary>
<diary><name>Lecture Theatre 1</name><value>L1</value></diary>
<diary><name>Lecture Theatre 2</name><value>L2</value></diary>
</FAC>
</Diaries>
</xf:instance>
</xf:model>
</head>
<body>
<xxf:dialog id="dialogAppointment" draggable="true" model="diaryModel" appearance="full" level="modal"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:xxf="http://orbeon.org/oxf/xml/xforms"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xf="http://www.w3.org/2002/xforms"
xmlns:fr="http://orbeon.org/oxf/xml/form-runner"
xmlns:f="http://orbeon.org/oxf/xml/formatting">
<f:label>Booking</f:label>
<div style="width: 450px; height: 500px;" class="screenBlock">
<br />
<div style="font-weight: bold; line-height: 28px; height: 440px; width: 125px; float: left;">
Director<br /> Assistant<br /> Room<br /> Start Session<br /> End Session<br /> Appointment<br />
Attendee<br /> Contact<br /> Description<br /><br /><br /> Status<br />
</div>
<xf:group ref="instance('booking')">
<div style="line-height: 28px; height: 440px; width: 300px; float: left; verticalAlign: middle;">
<xf:select1 ref="location1">
<xf:label/>
<xf:itemset nodeset="instance('diaries')/IND/diary">
<xf:label ref="name"/>
<xf:value ref="value"/>
</xf:itemset>
</xf:select1>
<br />
<xf:select1 ref="location2">
<xf:label/>
<xf:itemset nodeset="instance('diaries')/IND/diary">
<xf:label ref="name"/>
<xf:value ref="value"/>
</xf:itemset>
</xf:select1>
<br />
<xf:select1 ref="location3">
<xf:label/>
<xf:itemset nodeset="instance('diaries')/FAC/diary">
<xf:label ref="name"/>
<xf:value ref="value"/>
</xf:itemset>
</xf:select1>
<br />
<xf:input ref="dstart" xxf:size="10">
<xf:label>
<xf:output ref="dstart" xxf:format="format-date(xs:date(.), '[FNn]')" />
</xf:label>
<xf:action ev:event="DOMFocusOut">
<xf:setvalue ref="instance('booking')/dend" value="instance('booking')/dstart"/>
</xf:action>
</xf:input>
<xf:input ref="tstart" xxf:size="5" >
<xf:label> at </xf:label>
<xf:action ev:event="DOMFocusOut">
<xf:setvalue ref="instance('booking')/dend" value="instance('booking')/dstart"/>
</xf:action>
</xf:input>
<br />
<xf:input ref="dend" xxf:size="10">
<xf:label>
<xf:output ref="dend" xxf:format="format-date(xs:date(.), '[FNn]')" />
</xf:label>
</xf:input>
<xf:input ref="tend" xxf:size="5" >
<xf:label> at </xf:label>
</xf:input>
<br />
<fr:autocomplete id="bookingDescription" ref="summary" dynamic-itemset="false" max-results-displayed="25" show-full-itemset-dropdown="true">
<xf:label></xf:label>
<xf:itemset model="coreModel" nodeset="instance('appointmentList')/descriptions">
<xf:label ref="name"/>
<xf:value ref="name"/>
</xf:itemset>
</fr:autocomplete>
<xf:input ref="attendeeName" xxf:size="40em;">
<xf:label/>
</xf:input>
<xf:trigger appearance="compact">
<xf:label>^</xf:label>
<xf:action ev:event="DOMActivate">
</xf:action>
</xf:trigger>
<br />
<xf:input ref="contact">
<xf:label/>
</xf:input>
<br />
<xf:textarea ref="description" xxf:cols="50" xxf:rows="5" style="resize: none;" />
<br />
<xf:select1 ref="status">
<xf:label/>
<xf:itemset model="coreModel" nodeset="instance('constants')/diaryStatus/status">
<xf:label ref="name"/>
<xf:value ref="value"/>
</xf:itemset>
</xf:select1>
<br />
<br />
<div style="width: 60px;" class="PrimaryButton">
<xf:trigger appearance="minimal">
<xf:label>Save</xf:label>
<xf:action ev:event="DOMActivate">
<xxf:hide dialog="dialogAppointment"/>
</xf:action>
</xf:trigger>
</div>
<br />
</div>
</xf:group>
<div style="clear: both;"></div>
<br />
</div>
</xxf:dialog>
<xf:trigger appearance="full">
<xf:label>Enable Dialog</xf:label>
<xf:action ev:event="DOMActivate">
<xxf:show dialog="dialogAppointment"/>
</xf:action>
</xf:trigger>
</body>
</html>