-
Notifications
You must be signed in to change notification settings - Fork 0
/
module.xml
249 lines (219 loc) · 7.24 KB
/
module.xml
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
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
<?xml version="1.0" encoding="utf-8"?>
<!--@POSTPROC: ./postproc.sh-->
<module suppressWarnings="true">
<Login f="nodata">
<Login f="noscroll">
<User t="list" f="user" l="General"/>
</Login>
</Login>
<General f="nodata">
<General f="noscroll">
<Create_New_Job t="button" l="Site_Admin"/>
<List_of_Existing_Jobs t="list" e="Site_Admin"/>
</General>
<search/>
</General>
<Site_Admin>
<Admin_Info>
<DoE_Site_School f="id notnull">
DoE Site (School)
<str>
<fmt>$2: </fmt>
<pos>1</pos>
</str>
</DoE_Site_School>
<School_Code f="id notnull">
<str>
<fmt>$2</fmt>
<pos>2</pos>
</str>
</School_Code>
<Principal_s_delegate_name>
Principal's delegate (name)
</Principal_s_delegate_name>
<Contractor_business_name>
Contractor (business name)
</Contractor_business_name>
<Contractor_site_supervisor>
Contractor (site supervisor)
</Contractor_site_supervisor>
<Record_Arrival_Time t="button"/>
<Arrival_first_day f="readonly">
Arrival (first day)
</Arrival_first_day>
<Personnel/>
</Admin_Info>
<Deliverable f="noscroll">
<Add_Task t="button" lc="Task"/>
<List_of_Tasks t="list" ec="Task"/>
</Deliverable>
<Recommendations>
<Recommendations t="checkbox">
<opts>
<opt>Maintain this area by current practices</opt>
<opt>Vegetation in the entire area must be maintained to the IPA Standard</opt>
<opt>Additional trees, shrubs and other plants not to be planted to exceed the IPA Standard</opt>
<opt>Fuel hazard must not be removed and maintained to the IPA Standard</opt>
<opt>Other</opt>
</opts>
</Recommendations>
<Recommendation_Notes/>
<Record_Departure_Time t="button"/>
<Departure_last_day f="readonly">
Departure (last day)
</Departure_last_day>
<Date_of_APZ_Completion/>
<Time_of_APZ_Completion/>
<Date_of_APZ_Handover/>
<Time_of_APZ_Handover/>
<Items_Items_to_be_resolved>
Items/Items to be resolved
</Items_Items_to_be_resolved>
<Cultural_Inspection_Notes/>
</Recommendations>
</Site_Admin>
<Task>
<Task>
<Task_Type f="id notnull">
<str>
<fmt>$1: </fmt>
<pos>2</pos>
</str>
<opts>
<opt>Deadwooding of limbs</opt>
<opt>Leaf Litter Removal</opt>
<opt>Tree Identification & Removal</opt>
<opt>Stump Grinding (new & existing)</opt>
<opt>Mulching</opt>
<opt>Seed Collection</opt>
<opt>Controlled Burn of zone/s</opt>
<opt>Future APZ recommendations</opt>
<opt>Other</opt>
</opts>
</Task_Type>
<Location_Description f="id notnull">
<str>
<fmt>$2: </fmt>
<pos>3</pos>
</str>
</Location_Description>
<gps/>
<Before_Photo t="camera"/>
<State_of_Completion>
<opts>
<opt>Complete</opt>
<opt>Partially Complete</opt>
<opt>Not Attempted</opt>
</opts>
</State_of_Completion>
<After_Photo t="camera"/>
<Task_Closed t="button"/>
<Task_Closed_at f="id notnull readonly">
<str>
<fmt>$2</fmt>
<pos>4</pos>
</str>
</Task_Closed_at>
<Notes_Comments>
Notes/Comments
</Notes_Comments>
</Task>
<Vars f="hidden">
<Task_DoE_Site_School f="id">
<!--Inherited-->
<str>
<pos>1</pos>
<fmt>$2 </fmt>
</str>
</Task_DoE_Site_School>
</Vars>
</Task>
<logic><![CDATA[
/**************************** TIMESTAMP POPULATION ****************************/
void recordArrivalTime(String val) {
String ref = "Site_Admin/Admin_Info/Arrival_first_day";
if (val == null) setToTimestampNow(ref);
else setFieldValue (ref, val);
}
void recordDepartureTime(String val) {
String ref = "Site_Admin/Recommendations/Departure_last_day";
if (val == null) setToTimestampNow(ref);
else setFieldValue (ref, val);
}
void recordTaskClosedAt(String val) {
String ref = "Task/Task/Task_Closed_at";
if (val == null) setToTimestampNow(ref);
else setFieldValue (ref, val);
}
void recordArrivalTime() { recordArrivalTime (null); }
void recordDepartureTime() { recordDepartureTime(null); }
void recordTaskClosedAt() { recordTaskClosedAt (null); }
void clearArrivalTime() { recordArrivalTime (""); }
void clearDepartureTime() { recordDepartureTime(""); }
void clearTaskClosedAt() { recordTaskClosedAt (""); }
addOnEvent("Site_Admin/Admin_Info/Record_Arrival_Time", "click", "recordArrivalTime()");
addOnEvent("Site_Admin/Recommendations/Record_Departure_Time", "click", "recordDepartureTime()");
addOnEvent("Task/Task/Task_Closed", "click", "recordTaskClosedAt()");
addOnEvent("Site_Admin", "copy", "clearArrivalTime()");
addOnEvent("Site_Admin", "copy", "clearDepartureTime()");
addOnEvent("Task", "copy", "clearTaskClosedAt()");
/************************ DATE/TIME PICKER POPULATION *************************/
void setFieldToLastDateInput(String ref) {
String date = getLastDateAlertInput();
setFieldValue(ref, date);
}
void setFieldToLastTimeInput(String ref) {
String date = getLastTimeAlertInput();
setFieldValue(ref, date);
}
void showDatePickerActions(String ref) {
String head = "Select Date";
String body = "";
String cbOk = "setFieldToLastDateInput(\"" + ref + "\")";
String cbBad = "";
showDateAlert(head, body, cbOk, cbBad);
}
void showTimePickerActions(String ref) {
String head = "Select Time";
String body = "";
String cbOk = "setFieldToLastTimeInput(\"" + ref + "\")";
String cbBad = "";
showTimeAlert(head, body, cbOk, cbBad);
}
void bindDatePicker(String ref) {
String cb = "showDatePickerActions(\"" + ref + "\")";
addOnEvent(ref, "focus", cb);
}
void bindTimePicker(String ref) {
String cb = "showTimePickerActions(\"" + ref + "\")";
addOnEvent(ref, "focus", cb);
}
List getDateTimeRefs() {
List refs = new ArrayList();
refs.add("Site_Admin/Recommendations/Date_of_APZ_Completion");
refs.add("Site_Admin/Recommendations/Date_of_APZ_Handover");
refs.add("Site_Admin/Recommendations/Time_of_APZ_Completion");
refs.add("Site_Admin/Recommendations/Time_of_APZ_Handover");
return refs;
}
bindDatePicker("Site_Admin/Recommendations/Date_of_APZ_Completion");
bindDatePicker("Site_Admin/Recommendations/Date_of_APZ_Handover");
bindTimePicker("Site_Admin/Recommendations/Time_of_APZ_Completion");
bindTimePicker("Site_Admin/Recommendations/Time_of_APZ_Handover");
// Clear the value at `ref` when the entity containing it is duplicated
for (String ref : getDateTimeRefs()) {
String tg = getTabGroupRef(ref);
String evt = "copy";
String cb = "setFieldValue(\"%s\", \"\")";
cb = replaceFirst(cb, ref);
addOnEvent(tg, evt, cb);
}
/******************************** INHERITANCE *********************************/
void copyTaskDoeSiteSchool () {
String src = "Site_Admin/Admin_Info/DoE_Site_School";
String dst = "Task/Vars/Task_DoE_Site_School";
copyFieldValue(src, dst, false);
}
addOnEvent("Task", "create", "copyTaskDoeSiteSchool()");
]]></logic>
</module>