deploy: 21a518cb1adcaa8d8d23af38c86cb19527c54c5c
[project/luci.git] / jsapi / form.js.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <title>Source: form.js</title>
6
7
8 <script src="scripts/prettify/prettify.js"></script>
9 <script src="scripts/prettify/lang-css.js"></script>
10 <script src="scripts/jquery.min.js"></script>
11 <!--[if lt IE 9]>
12 <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
13 <![endif]-->
14 <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
15 <link type="text/css" rel="stylesheet" href="styles/bootstrap.min.css">
16 <link type="text/css" rel="stylesheet" href="styles/jaguar.css">
17
18
19 <script>
20 var config = {"monospaceLinks":true,"cleverLinks":true,"default":{"outputSourceFiles":true}};
21 </script>
22
23
24
25 </head>
26 <body>
27 <div id="wrap" class="clearfix">
28
29 <div class="navigation">
30 <h3 class="applicationName"><a href="index.html"></a></h3>
31
32 <div class="search">
33 <input id="search" type="text" class="form-control input-sm" placeholder="Search Documentations">
34 </div>
35 <ul class="list">
36
37 <li class="item" data-name="LuCI">
38 <span class="title">
39 <a href="LuCI.html">LuCI</a>
40
41 </span>
42 <ul class="members itemMembers">
43
44 <span class="subtitle">Members</span>
45
46 <li data-name="LuCI#Class"><a href="LuCI.html#Class">Class</a></li>
47
48 <li data-name="LuCI#dom"><a href="LuCI.html#dom">dom</a></li>
49
50 <li data-name="LuCI#env"><a href="LuCI.html#env">env</a></li>
51
52 <li data-name="LuCI#naturalCompare"><a href="LuCI.html#naturalCompare">naturalCompare</a></li>
53
54 <li data-name="LuCI#Poll"><a href="LuCI.html#Poll">Poll</a></li>
55
56 <li data-name="LuCI#Request"><a href="LuCI.html#Request">Request</a></li>
57
58 <li data-name="LuCI#view"><a href="LuCI.html#view">view</a></li>
59
60 </ul>
61 <ul class="typedefs itemMembers">
62
63 <span class="subtitle">Typedefs</span>
64
65 <li data-name="LuCI.requestCallbackFn"><a href="LuCI.html#.requestCallbackFn">requestCallbackFn</a></li>
66
67 </ul>
68 <ul class="typedefs itemMembers">
69
70 </ul>
71 <ul class="methods itemMembers">
72
73 <span class="subtitle">Methods</span>
74
75 <li data-name="LuCI#bind"><a href="LuCI.html#bind">bind</a></li>
76
77 <li data-name="LuCI#error"><a href="LuCI.html#error">error</a></li>
78
79 <li data-name="LuCI#fspath"><a href="LuCI.html#fspath">fspath</a></li>
80
81 <li data-name="LuCI#get"><a href="LuCI.html#get">get</a></li>
82
83 <li data-name="LuCI#halt"><a href="LuCI.html#halt">halt</a></li>
84
85 <li data-name="LuCI#hasSystemFeature"><a href="LuCI.html#hasSystemFeature">hasSystemFeature</a></li>
86
87 <li data-name="LuCI#hasViewPermission"><a href="LuCI.html#hasViewPermission">hasViewPermission</a></li>
88
89 <li data-name="LuCI#isObject"><a href="LuCI.html#isObject">isObject</a></li>
90
91 <li data-name="LuCI#location"><a href="LuCI.html#location">location</a></li>
92
93 <li data-name="LuCI#media"><a href="LuCI.html#media">media</a></li>
94
95 <li data-name="LuCI#path"><a href="LuCI.html#path">path</a></li>
96
97 <li data-name="LuCI#poll"><a href="LuCI.html#poll">poll</a></li>
98
99 <li data-name="LuCI#post"><a href="LuCI.html#post">post</a></li>
100
101 <li data-name="LuCI#raise"><a href="LuCI.html#raise">raise</a></li>
102
103 <li data-name="LuCI#require"><a href="LuCI.html#require">require</a></li>
104
105 <li data-name="LuCI#resolveDefault"><a href="LuCI.html#resolveDefault">resolveDefault</a></li>
106
107 <li data-name="LuCI#resource"><a href="LuCI.html#resource">resource</a></li>
108
109 <li data-name="LuCI#run"><a href="LuCI.html#run">run</a></li>
110
111 <li data-name="LuCI#sortedArray"><a href="LuCI.html#sortedArray">sortedArray</a></li>
112
113 <li data-name="LuCI#sortedKeys"><a href="LuCI.html#sortedKeys">sortedKeys</a></li>
114
115 <li data-name="LuCI#stop"><a href="LuCI.html#stop">stop</a></li>
116
117 <li data-name="LuCI#toArray"><a href="LuCI.html#toArray">toArray</a></li>
118
119 <li data-name="LuCI#url"><a href="LuCI.html#url">url</a></li>
120
121 </ul>
122 <ul class="events itemMembers">
123
124 </ul>
125 </li>
126
127 <li class="item" data-name="LuCI.baseclass">
128 <span class="title">
129 <a href="LuCI.baseclass.html">LuCI.baseclass</a>
130
131 </span>
132 <ul class="members itemMembers">
133
134 </ul>
135 <ul class="typedefs itemMembers">
136
137 </ul>
138 <ul class="typedefs itemMembers">
139
140 </ul>
141 <ul class="methods itemMembers">
142
143 <span class="subtitle">Methods</span>
144
145 <li data-name="LuCI.baseclass.extend"><a href="LuCI.baseclass.html#.extend">extend</a></li>
146
147 <li data-name="LuCI.baseclass.instantiate"><a href="LuCI.baseclass.html#.instantiate">instantiate</a></li>
148
149 <li data-name="LuCI.baseclass.isSubclass"><a href="LuCI.baseclass.html#.isSubclass">isSubclass</a></li>
150
151 <li data-name="LuCI.baseclass.singleton"><a href="LuCI.baseclass.html#.singleton">singleton</a></li>
152
153 <li data-name="LuCI.baseclass#super"><a href="LuCI.baseclass.html#super">super</a></li>
154
155 <li data-name="LuCI.baseclass#varargs"><a href="LuCI.baseclass.html#varargs">varargs</a></li>
156
157 </ul>
158 <ul class="events itemMembers">
159
160 </ul>
161 </li>
162
163 <li class="item" data-name="LuCI.dom">
164 <span class="title">
165 <a href="LuCI.dom.html">LuCI.dom</a>
166
167 </span>
168 <ul class="members itemMembers">
169
170 </ul>
171 <ul class="typedefs itemMembers">
172
173 <span class="subtitle">Typedefs</span>
174
175 <li data-name="LuCI.dom~ignoreCallbackFn"><a href="LuCI.dom.html#~ignoreCallbackFn">ignoreCallbackFn</a></li>
176
177 </ul>
178 <ul class="typedefs itemMembers">
179
180 </ul>
181 <ul class="methods itemMembers">
182
183 <span class="subtitle">Methods</span>
184
185 <li data-name="LuCI.dom#append"><a href="LuCI.dom.html#append">append</a></li>
186
187 <li data-name="LuCI.dom#attr"><a href="LuCI.dom.html#attr">attr</a></li>
188
189 <li data-name="LuCI.dom#bindClassInstance"><a href="LuCI.dom.html#bindClassInstance">bindClassInstance</a></li>
190
191 <li data-name="LuCI.dom#callClassMethod"><a href="LuCI.dom.html#callClassMethod">callClassMethod</a></li>
192
193 <li data-name="LuCI.dom#content"><a href="LuCI.dom.html#content">content</a></li>
194
195 <li data-name="LuCI.dom#create"><a href="LuCI.dom.html#create">create</a></li>
196
197 <li data-name="LuCI.dom#data"><a href="LuCI.dom.html#data">data</a></li>
198
199 <li data-name="LuCI.dom#elem"><a href="LuCI.dom.html#elem">elem</a></li>
200
201 <li data-name="LuCI.dom#findClassInstance"><a href="LuCI.dom.html#findClassInstance">findClassInstance</a></li>
202
203 <li data-name="LuCI.dom#isEmpty"><a href="LuCI.dom.html#isEmpty">isEmpty</a></li>
204
205 <li data-name="LuCI.dom#matches"><a href="LuCI.dom.html#matches">matches</a></li>
206
207 <li data-name="LuCI.dom#parent"><a href="LuCI.dom.html#parent">parent</a></li>
208
209 <li data-name="LuCI.dom#parse"><a href="LuCI.dom.html#parse">parse</a></li>
210
211 </ul>
212 <ul class="events itemMembers">
213
214 </ul>
215 </li>
216
217 <li class="item" data-name="LuCI.form">
218 <span class="title">
219 <a href="LuCI.form.html">LuCI.form</a>
220
221 </span>
222 <ul class="members itemMembers">
223
224 </ul>
225 <ul class="typedefs itemMembers">
226
227 </ul>
228 <ul class="typedefs itemMembers">
229
230 </ul>
231 <ul class="methods itemMembers">
232
233 </ul>
234 <ul class="events itemMembers">
235
236 </ul>
237 </li>
238
239 <li class="item" data-name="LuCI.form.AbstractElement">
240 <span class="title">
241 <a href="LuCI.form.AbstractElement.html">LuCI.form.AbstractElement</a>
242
243 </span>
244 <ul class="members itemMembers">
245
246 </ul>
247 <ul class="typedefs itemMembers">
248
249 </ul>
250 <ul class="typedefs itemMembers">
251
252 </ul>
253 <ul class="methods itemMembers">
254
255 <span class="subtitle">Methods</span>
256
257 <li data-name="LuCI.form.AbstractElement#append"><a href="LuCI.form.AbstractElement.html#append">append</a></li>
258
259 <li data-name="LuCI.form.AbstractElement#parse"><a href="LuCI.form.AbstractElement.html#parse">parse</a></li>
260
261 <li data-name="LuCI.form.AbstractElement#render"><a href="LuCI.form.AbstractElement.html#render">render</a></li>
262
263 <li data-name="LuCI.form.AbstractElement#stripTags"><a href="LuCI.form.AbstractElement.html#stripTags">stripTags</a></li>
264
265 <li data-name="LuCI.form.AbstractElement#titleFn"><a href="LuCI.form.AbstractElement.html#titleFn">titleFn</a></li>
266
267 </ul>
268 <ul class="events itemMembers">
269
270 </ul>
271 </li>
272
273 <li class="item" data-name="LuCI.form.AbstractSection">
274 <span class="title">
275 <a href="LuCI.form.AbstractSection.html">LuCI.form.AbstractSection</a>
276
277 </span>
278 <ul class="members itemMembers">
279
280 <span class="subtitle">Members</span>
281
282 <li data-name="LuCI.form.AbstractSection##parentoption"><a href="LuCI.form.AbstractSection.html#parentoption">parentoption</a></li>
283
284 </ul>
285 <ul class="typedefs itemMembers">
286
287 </ul>
288 <ul class="typedefs itemMembers">
289
290 </ul>
291 <ul class="methods itemMembers">
292
293 <span class="subtitle">Methods</span>
294
295 <li data-name="LuCI.form.AbstractSection#append"><a href="LuCI.form.AbstractSection.html#append">append</a></li>
296
297 <li data-name="LuCI.form.AbstractSection#cfgsections"><a href="LuCI.form.AbstractSection.html#cfgsections">cfgsections</a></li>
298
299 <li data-name="LuCI.form.AbstractSection#cfgvalue"><a href="LuCI.form.AbstractSection.html#cfgvalue">cfgvalue</a></li>
300
301 <li data-name="LuCI.form.AbstractSection#filter"><a href="LuCI.form.AbstractSection.html#filter">filter</a></li>
302
303 <li data-name="LuCI.form.AbstractSection#formvalue"><a href="LuCI.form.AbstractSection.html#formvalue">formvalue</a></li>
304
305 <li data-name="LuCI.form.AbstractSection#getOption"><a href="LuCI.form.AbstractSection.html#getOption">getOption</a></li>
306
307 <li data-name="LuCI.form.AbstractSection#getUIElement"><a href="LuCI.form.AbstractSection.html#getUIElement">getUIElement</a></li>
308
309 <li data-name="LuCI.form.AbstractSection#load"><a href="LuCI.form.AbstractSection.html#load">load</a></li>
310
311 <li data-name="LuCI.form.AbstractSection#option"><a href="LuCI.form.AbstractSection.html#option">option</a></li>
312
313 <li data-name="LuCI.form.AbstractSection#parse"><a href="LuCI.form.AbstractSection.html#parse">parse</a></li>
314
315 <li data-name="LuCI.form.AbstractSection#render"><a href="LuCI.form.AbstractSection.html#render">render</a></li>
316
317 <li data-name="LuCI.form.AbstractSection#stripTags"><a href="LuCI.form.AbstractSection.html#stripTags">stripTags</a></li>
318
319 <li data-name="LuCI.form.AbstractSection#tab"><a href="LuCI.form.AbstractSection.html#tab">tab</a></li>
320
321 <li data-name="LuCI.form.AbstractSection#taboption"><a href="LuCI.form.AbstractSection.html#taboption">taboption</a></li>
322
323 <li data-name="LuCI.form.AbstractSection#titleFn"><a href="LuCI.form.AbstractSection.html#titleFn">titleFn</a></li>
324
325 </ul>
326 <ul class="events itemMembers">
327
328 </ul>
329 </li>
330
331 <li class="item" data-name="LuCI.form.AbstractValue">
332 <span class="title">
333 <a href="LuCI.form.AbstractValue.html">LuCI.form.AbstractValue</a>
334
335 </span>
336 <ul class="members itemMembers">
337
338 <span class="subtitle">Members</span>
339
340 <li data-name="LuCI.form.AbstractValue##datatype"><a href="LuCI.form.AbstractValue.html#datatype">datatype</a></li>
341
342 <li data-name="LuCI.form.AbstractValue##default"><a href="LuCI.form.AbstractValue.html#default">default</a></li>
343
344 <li data-name="LuCI.form.AbstractValue##editable"><a href="LuCI.form.AbstractValue.html#editable">editable</a></li>
345
346 <li data-name="LuCI.form.AbstractValue##modalonly"><a href="LuCI.form.AbstractValue.html#modalonly">modalonly</a></li>
347
348 <li data-name="LuCI.form.AbstractValue##onchange"><a href="LuCI.form.AbstractValue.html#onchange">onchange</a></li>
349
350 <li data-name="LuCI.form.AbstractValue##optional"><a href="LuCI.form.AbstractValue.html#optional">optional</a></li>
351
352 <li data-name="LuCI.form.AbstractValue##readonly"><a href="LuCI.form.AbstractValue.html#readonly">readonly</a></li>
353
354 <li data-name="LuCI.form.AbstractValue##retain"><a href="LuCI.form.AbstractValue.html#retain">retain</a></li>
355
356 <li data-name="LuCI.form.AbstractValue##rmempty"><a href="LuCI.form.AbstractValue.html#rmempty">rmempty</a></li>
357
358 <li data-name="LuCI.form.AbstractValue##uciconfig"><a href="LuCI.form.AbstractValue.html#uciconfig">uciconfig</a></li>
359
360 <li data-name="LuCI.form.AbstractValue##ucioption"><a href="LuCI.form.AbstractValue.html#ucioption">ucioption</a></li>
361
362 <li data-name="LuCI.form.AbstractValue##ucisection"><a href="LuCI.form.AbstractValue.html#ucisection">ucisection</a></li>
363
364 <li data-name="LuCI.form.AbstractValue##validate"><a href="LuCI.form.AbstractValue.html#validate">validate</a></li>
365
366 <li data-name="LuCI.form.AbstractValue##width"><a href="LuCI.form.AbstractValue.html#width">width</a></li>
367
368 </ul>
369 <ul class="typedefs itemMembers">
370
371 </ul>
372 <ul class="typedefs itemMembers">
373
374 </ul>
375 <ul class="methods itemMembers">
376
377 <span class="subtitle">Methods</span>
378
379 <li data-name="LuCI.form.AbstractValue#append"><a href="LuCI.form.AbstractValue.html#append">append</a></li>
380
381 <li data-name="LuCI.form.AbstractValue#cbid"><a href="LuCI.form.AbstractValue.html#cbid">cbid</a></li>
382
383 <li data-name="LuCI.form.AbstractValue#cfgvalue"><a href="LuCI.form.AbstractValue.html#cfgvalue">cfgvalue</a></li>
384
385 <li data-name="LuCI.form.AbstractValue#depends"><a href="LuCI.form.AbstractValue.html#depends">depends</a></li>
386
387 <li data-name="LuCI.form.AbstractValue#formvalue"><a href="LuCI.form.AbstractValue.html#formvalue">formvalue</a></li>
388
389 <li data-name="LuCI.form.AbstractValue#getUIElement"><a href="LuCI.form.AbstractValue.html#getUIElement">getUIElement</a></li>
390
391 <li data-name="LuCI.form.AbstractValue#getValidationError"><a href="LuCI.form.AbstractValue.html#getValidationError">getValidationError</a></li>
392
393 <li data-name="LuCI.form.AbstractValue#isActive"><a href="LuCI.form.AbstractValue.html#isActive">isActive</a></li>
394
395 <li data-name="LuCI.form.AbstractValue#isValid"><a href="LuCI.form.AbstractValue.html#isValid">isValid</a></li>
396
397 <li data-name="LuCI.form.AbstractValue#load"><a href="LuCI.form.AbstractValue.html#load">load</a></li>
398
399 <li data-name="LuCI.form.AbstractValue#parse"><a href="LuCI.form.AbstractValue.html#parse">parse</a></li>
400
401 <li data-name="LuCI.form.AbstractValue#remove"><a href="LuCI.form.AbstractValue.html#remove">remove</a></li>
402
403 <li data-name="LuCI.form.AbstractValue#render"><a href="LuCI.form.AbstractValue.html#render">render</a></li>
404
405 <li data-name="LuCI.form.AbstractValue#stripTags"><a href="LuCI.form.AbstractValue.html#stripTags">stripTags</a></li>
406
407 <li data-name="LuCI.form.AbstractValue#textvalue"><a href="LuCI.form.AbstractValue.html#textvalue">textvalue</a></li>
408
409 <li data-name="LuCI.form.AbstractValue#titleFn"><a href="LuCI.form.AbstractValue.html#titleFn">titleFn</a></li>
410
411 <li data-name="LuCI.form.AbstractValue#validate"><a href="LuCI.form.AbstractValue.html#validate">validate</a></li>
412
413 <li data-name="LuCI.form.AbstractValue#write"><a href="LuCI.form.AbstractValue.html#write">write</a></li>
414
415 </ul>
416 <ul class="events itemMembers">
417
418 </ul>
419 </li>
420
421 <li class="item" data-name="LuCI.form.ButtonValue">
422 <span class="title">
423 <a href="LuCI.form.ButtonValue.html">LuCI.form.ButtonValue</a>
424
425 </span>
426 <ul class="members itemMembers">
427
428 <span class="subtitle">Members</span>
429
430 <li data-name="LuCI.form.ButtonValue##inputstyle"><a href="LuCI.form.ButtonValue.html#inputstyle">inputstyle</a></li>
431
432 <li data-name="LuCI.form.ButtonValue##inputtitle"><a href="LuCI.form.ButtonValue.html#inputtitle">inputtitle</a></li>
433
434 <li data-name="LuCI.form.ButtonValue##onclick"><a href="LuCI.form.ButtonValue.html#onclick">onclick</a></li>
435
436 <li data-name="LuCI.form.ButtonValue#datatype"><a href="LuCI.form.ButtonValue.html#datatype">datatype</a></li>
437
438 <li data-name="LuCI.form.ButtonValue#default"><a href="LuCI.form.ButtonValue.html#default">default</a></li>
439
440 <li data-name="LuCI.form.ButtonValue#editable"><a href="LuCI.form.ButtonValue.html#editable">editable</a></li>
441
442 <li data-name="LuCI.form.ButtonValue#modalonly"><a href="LuCI.form.ButtonValue.html#modalonly">modalonly</a></li>
443
444 <li data-name="LuCI.form.ButtonValue#onchange"><a href="LuCI.form.ButtonValue.html#onchange">onchange</a></li>
445
446 <li data-name="LuCI.form.ButtonValue#optional"><a href="LuCI.form.ButtonValue.html#optional">optional</a></li>
447
448 <li data-name="LuCI.form.ButtonValue#password"><a href="LuCI.form.ButtonValue.html#password">password</a></li>
449
450 <li data-name="LuCI.form.ButtonValue#placeholder"><a href="LuCI.form.ButtonValue.html#placeholder">placeholder</a></li>
451
452 <li data-name="LuCI.form.ButtonValue#readonly"><a href="LuCI.form.ButtonValue.html#readonly">readonly</a></li>
453
454 <li data-name="LuCI.form.ButtonValue#retain"><a href="LuCI.form.ButtonValue.html#retain">retain</a></li>
455
456 <li data-name="LuCI.form.ButtonValue#rmempty"><a href="LuCI.form.ButtonValue.html#rmempty">rmempty</a></li>
457
458 <li data-name="LuCI.form.ButtonValue#uciconfig"><a href="LuCI.form.ButtonValue.html#uciconfig">uciconfig</a></li>
459
460 <li data-name="LuCI.form.ButtonValue#ucioption"><a href="LuCI.form.ButtonValue.html#ucioption">ucioption</a></li>
461
462 <li data-name="LuCI.form.ButtonValue#ucisection"><a href="LuCI.form.ButtonValue.html#ucisection">ucisection</a></li>
463
464 <li data-name="LuCI.form.ButtonValue#validate"><a href="LuCI.form.ButtonValue.html#validate">validate</a></li>
465
466 <li data-name="LuCI.form.ButtonValue#width"><a href="LuCI.form.ButtonValue.html#width">width</a></li>
467
468 </ul>
469 <ul class="typedefs itemMembers">
470
471 </ul>
472 <ul class="typedefs itemMembers">
473
474 </ul>
475 <ul class="methods itemMembers">
476
477 <span class="subtitle">Methods</span>
478
479 <li data-name="LuCI.form.ButtonValue#append"><a href="LuCI.form.ButtonValue.html#append">append</a></li>
480
481 <li data-name="LuCI.form.ButtonValue#cbid"><a href="LuCI.form.ButtonValue.html#cbid">cbid</a></li>
482
483 <li data-name="LuCI.form.ButtonValue#cfgvalue"><a href="LuCI.form.ButtonValue.html#cfgvalue">cfgvalue</a></li>
484
485 <li data-name="LuCI.form.ButtonValue#depends"><a href="LuCI.form.ButtonValue.html#depends">depends</a></li>
486
487 <li data-name="LuCI.form.ButtonValue#formvalue"><a href="LuCI.form.ButtonValue.html#formvalue">formvalue</a></li>
488
489 <li data-name="LuCI.form.ButtonValue#getUIElement"><a href="LuCI.form.ButtonValue.html#getUIElement">getUIElement</a></li>
490
491 <li data-name="LuCI.form.ButtonValue#getValidationError"><a href="LuCI.form.ButtonValue.html#getValidationError">getValidationError</a></li>
492
493 <li data-name="LuCI.form.ButtonValue#isActive"><a href="LuCI.form.ButtonValue.html#isActive">isActive</a></li>
494
495 <li data-name="LuCI.form.ButtonValue#isValid"><a href="LuCI.form.ButtonValue.html#isValid">isValid</a></li>
496
497 <li data-name="LuCI.form.ButtonValue#load"><a href="LuCI.form.ButtonValue.html#load">load</a></li>
498
499 <li data-name="LuCI.form.ButtonValue#parse"><a href="LuCI.form.ButtonValue.html#parse">parse</a></li>
500
501 <li data-name="LuCI.form.ButtonValue#remove"><a href="LuCI.form.ButtonValue.html#remove">remove</a></li>
502
503 <li data-name="LuCI.form.ButtonValue#stripTags"><a href="LuCI.form.ButtonValue.html#stripTags">stripTags</a></li>
504
505 <li data-name="LuCI.form.ButtonValue#textvalue"><a href="LuCI.form.ButtonValue.html#textvalue">textvalue</a></li>
506
507 <li data-name="LuCI.form.ButtonValue#titleFn"><a href="LuCI.form.ButtonValue.html#titleFn">titleFn</a></li>
508
509 <li data-name="LuCI.form.ButtonValue#value"><a href="LuCI.form.ButtonValue.html#value">value</a></li>
510
511 <li data-name="LuCI.form.ButtonValue#write"><a href="LuCI.form.ButtonValue.html#write">write</a></li>
512
513 </ul>
514 <ul class="events itemMembers">
515
516 </ul>
517 </li>
518
519 <li class="item" data-name="LuCI.form.DummyValue">
520 <span class="title">
521 <a href="LuCI.form.DummyValue.html">LuCI.form.DummyValue</a>
522
523 </span>
524 <ul class="members itemMembers">
525
526 <span class="subtitle">Members</span>
527
528 <li data-name="LuCI.form.DummyValue##hidden"><a href="LuCI.form.DummyValue.html#hidden">hidden</a></li>
529
530 <li data-name="LuCI.form.DummyValue##href"><a href="LuCI.form.DummyValue.html#href">href</a></li>
531
532 <li data-name="LuCI.form.DummyValue##rawhtml"><a href="LuCI.form.DummyValue.html#rawhtml">rawhtml</a></li>
533
534 <li data-name="LuCI.form.DummyValue#datatype"><a href="LuCI.form.DummyValue.html#datatype">datatype</a></li>
535
536 <li data-name="LuCI.form.DummyValue#default"><a href="LuCI.form.DummyValue.html#default">default</a></li>
537
538 <li data-name="LuCI.form.DummyValue#editable"><a href="LuCI.form.DummyValue.html#editable">editable</a></li>
539
540 <li data-name="LuCI.form.DummyValue#modalonly"><a href="LuCI.form.DummyValue.html#modalonly">modalonly</a></li>
541
542 <li data-name="LuCI.form.DummyValue#onchange"><a href="LuCI.form.DummyValue.html#onchange">onchange</a></li>
543
544 <li data-name="LuCI.form.DummyValue#optional"><a href="LuCI.form.DummyValue.html#optional">optional</a></li>
545
546 <li data-name="LuCI.form.DummyValue#password"><a href="LuCI.form.DummyValue.html#password">password</a></li>
547
548 <li data-name="LuCI.form.DummyValue#placeholder"><a href="LuCI.form.DummyValue.html#placeholder">placeholder</a></li>
549
550 <li data-name="LuCI.form.DummyValue#readonly"><a href="LuCI.form.DummyValue.html#readonly">readonly</a></li>
551
552 <li data-name="LuCI.form.DummyValue#retain"><a href="LuCI.form.DummyValue.html#retain">retain</a></li>
553
554 <li data-name="LuCI.form.DummyValue#rmempty"><a href="LuCI.form.DummyValue.html#rmempty">rmempty</a></li>
555
556 <li data-name="LuCI.form.DummyValue#uciconfig"><a href="LuCI.form.DummyValue.html#uciconfig">uciconfig</a></li>
557
558 <li data-name="LuCI.form.DummyValue#ucioption"><a href="LuCI.form.DummyValue.html#ucioption">ucioption</a></li>
559
560 <li data-name="LuCI.form.DummyValue#ucisection"><a href="LuCI.form.DummyValue.html#ucisection">ucisection</a></li>
561
562 <li data-name="LuCI.form.DummyValue#validate"><a href="LuCI.form.DummyValue.html#validate">validate</a></li>
563
564 <li data-name="LuCI.form.DummyValue#width"><a href="LuCI.form.DummyValue.html#width">width</a></li>
565
566 </ul>
567 <ul class="typedefs itemMembers">
568
569 </ul>
570 <ul class="typedefs itemMembers">
571
572 </ul>
573 <ul class="methods itemMembers">
574
575 <span class="subtitle">Methods</span>
576
577 <li data-name="LuCI.form.DummyValue#append"><a href="LuCI.form.DummyValue.html#append">append</a></li>
578
579 <li data-name="LuCI.form.DummyValue#cbid"><a href="LuCI.form.DummyValue.html#cbid">cbid</a></li>
580
581 <li data-name="LuCI.form.DummyValue#cfgvalue"><a href="LuCI.form.DummyValue.html#cfgvalue">cfgvalue</a></li>
582
583 <li data-name="LuCI.form.DummyValue#depends"><a href="LuCI.form.DummyValue.html#depends">depends</a></li>
584
585 <li data-name="LuCI.form.DummyValue#formvalue"><a href="LuCI.form.DummyValue.html#formvalue">formvalue</a></li>
586
587 <li data-name="LuCI.form.DummyValue#getUIElement"><a href="LuCI.form.DummyValue.html#getUIElement">getUIElement</a></li>
588
589 <li data-name="LuCI.form.DummyValue#getValidationError"><a href="LuCI.form.DummyValue.html#getValidationError">getValidationError</a></li>
590
591 <li data-name="LuCI.form.DummyValue#isActive"><a href="LuCI.form.DummyValue.html#isActive">isActive</a></li>
592
593 <li data-name="LuCI.form.DummyValue#isValid"><a href="LuCI.form.DummyValue.html#isValid">isValid</a></li>
594
595 <li data-name="LuCI.form.DummyValue#load"><a href="LuCI.form.DummyValue.html#load">load</a></li>
596
597 <li data-name="LuCI.form.DummyValue#parse"><a href="LuCI.form.DummyValue.html#parse">parse</a></li>
598
599 <li data-name="LuCI.form.DummyValue#remove"><a href="LuCI.form.DummyValue.html#remove">remove</a></li>
600
601 <li data-name="LuCI.form.DummyValue#stripTags"><a href="LuCI.form.DummyValue.html#stripTags">stripTags</a></li>
602
603 <li data-name="LuCI.form.DummyValue#textvalue"><a href="LuCI.form.DummyValue.html#textvalue">textvalue</a></li>
604
605 <li data-name="LuCI.form.DummyValue#titleFn"><a href="LuCI.form.DummyValue.html#titleFn">titleFn</a></li>
606
607 <li data-name="LuCI.form.DummyValue#value"><a href="LuCI.form.DummyValue.html#value">value</a></li>
608
609 <li data-name="LuCI.form.DummyValue#write"><a href="LuCI.form.DummyValue.html#write">write</a></li>
610
611 </ul>
612 <ul class="events itemMembers">
613
614 </ul>
615 </li>
616
617 <li class="item" data-name="LuCI.form.DynamicList">
618 <span class="title">
619 <a href="LuCI.form.DynamicList.html">LuCI.form.DynamicList</a>
620
621 </span>
622 <ul class="members itemMembers">
623
624 <span class="subtitle">Members</span>
625
626 <li data-name="LuCI.form.DynamicList#datatype"><a href="LuCI.form.DynamicList.html#datatype">datatype</a></li>
627
628 <li data-name="LuCI.form.DynamicList#default"><a href="LuCI.form.DynamicList.html#default">default</a></li>
629
630 <li data-name="LuCI.form.DynamicList#editable"><a href="LuCI.form.DynamicList.html#editable">editable</a></li>
631
632 <li data-name="LuCI.form.DynamicList#modalonly"><a href="LuCI.form.DynamicList.html#modalonly">modalonly</a></li>
633
634 <li data-name="LuCI.form.DynamicList#onchange"><a href="LuCI.form.DynamicList.html#onchange">onchange</a></li>
635
636 <li data-name="LuCI.form.DynamicList#optional"><a href="LuCI.form.DynamicList.html#optional">optional</a></li>
637
638 <li data-name="LuCI.form.DynamicList#password"><a href="LuCI.form.DynamicList.html#password">password</a></li>
639
640 <li data-name="LuCI.form.DynamicList#placeholder"><a href="LuCI.form.DynamicList.html#placeholder">placeholder</a></li>
641
642 <li data-name="LuCI.form.DynamicList#readonly"><a href="LuCI.form.DynamicList.html#readonly">readonly</a></li>
643
644 <li data-name="LuCI.form.DynamicList#retain"><a href="LuCI.form.DynamicList.html#retain">retain</a></li>
645
646 <li data-name="LuCI.form.DynamicList#rmempty"><a href="LuCI.form.DynamicList.html#rmempty">rmempty</a></li>
647
648 <li data-name="LuCI.form.DynamicList#uciconfig"><a href="LuCI.form.DynamicList.html#uciconfig">uciconfig</a></li>
649
650 <li data-name="LuCI.form.DynamicList#ucioption"><a href="LuCI.form.DynamicList.html#ucioption">ucioption</a></li>
651
652 <li data-name="LuCI.form.DynamicList#ucisection"><a href="LuCI.form.DynamicList.html#ucisection">ucisection</a></li>
653
654 <li data-name="LuCI.form.DynamicList#validate"><a href="LuCI.form.DynamicList.html#validate">validate</a></li>
655
656 <li data-name="LuCI.form.DynamicList#width"><a href="LuCI.form.DynamicList.html#width">width</a></li>
657
658 </ul>
659 <ul class="typedefs itemMembers">
660
661 </ul>
662 <ul class="typedefs itemMembers">
663
664 </ul>
665 <ul class="methods itemMembers">
666
667 <span class="subtitle">Methods</span>
668
669 <li data-name="LuCI.form.DynamicList#append"><a href="LuCI.form.DynamicList.html#append">append</a></li>
670
671 <li data-name="LuCI.form.DynamicList#cbid"><a href="LuCI.form.DynamicList.html#cbid">cbid</a></li>
672
673 <li data-name="LuCI.form.DynamicList#cfgvalue"><a href="LuCI.form.DynamicList.html#cfgvalue">cfgvalue</a></li>
674
675 <li data-name="LuCI.form.DynamicList#depends"><a href="LuCI.form.DynamicList.html#depends">depends</a></li>
676
677 <li data-name="LuCI.form.DynamicList#formvalue"><a href="LuCI.form.DynamicList.html#formvalue">formvalue</a></li>
678
679 <li data-name="LuCI.form.DynamicList#getUIElement"><a href="LuCI.form.DynamicList.html#getUIElement">getUIElement</a></li>
680
681 <li data-name="LuCI.form.DynamicList#getValidationError"><a href="LuCI.form.DynamicList.html#getValidationError">getValidationError</a></li>
682
683 <li data-name="LuCI.form.DynamicList#isActive"><a href="LuCI.form.DynamicList.html#isActive">isActive</a></li>
684
685 <li data-name="LuCI.form.DynamicList#isValid"><a href="LuCI.form.DynamicList.html#isValid">isValid</a></li>
686
687 <li data-name="LuCI.form.DynamicList#load"><a href="LuCI.form.DynamicList.html#load">load</a></li>
688
689 <li data-name="LuCI.form.DynamicList#parse"><a href="LuCI.form.DynamicList.html#parse">parse</a></li>
690
691 <li data-name="LuCI.form.DynamicList#remove"><a href="LuCI.form.DynamicList.html#remove">remove</a></li>
692
693 <li data-name="LuCI.form.DynamicList#stripTags"><a href="LuCI.form.DynamicList.html#stripTags">stripTags</a></li>
694
695 <li data-name="LuCI.form.DynamicList#textvalue"><a href="LuCI.form.DynamicList.html#textvalue">textvalue</a></li>
696
697 <li data-name="LuCI.form.DynamicList#titleFn"><a href="LuCI.form.DynamicList.html#titleFn">titleFn</a></li>
698
699 <li data-name="LuCI.form.DynamicList#value"><a href="LuCI.form.DynamicList.html#value">value</a></li>
700
701 <li data-name="LuCI.form.DynamicList#write"><a href="LuCI.form.DynamicList.html#write">write</a></li>
702
703 </ul>
704 <ul class="events itemMembers">
705
706 </ul>
707 </li>
708
709 <li class="item" data-name="LuCI.form.FileUpload">
710 <span class="title">
711 <a href="LuCI.form.FileUpload.html">LuCI.form.FileUpload</a>
712
713 </span>
714 <ul class="members itemMembers">
715
716 <span class="subtitle">Members</span>
717
718 <li data-name="LuCI.form.FileUpload##enable_remove"><a href="LuCI.form.FileUpload.html#enable_remove">enable_remove</a></li>
719
720 <li data-name="LuCI.form.FileUpload##enable_upload"><a href="LuCI.form.FileUpload.html#enable_upload">enable_upload</a></li>
721
722 <li data-name="LuCI.form.FileUpload##root_directory"><a href="LuCI.form.FileUpload.html#root_directory">root_directory</a></li>
723
724 <li data-name="LuCI.form.FileUpload##show_hidden"><a href="LuCI.form.FileUpload.html#show_hidden">show_hidden</a></li>
725
726 <li data-name="LuCI.form.FileUpload#datatype"><a href="LuCI.form.FileUpload.html#datatype">datatype</a></li>
727
728 <li data-name="LuCI.form.FileUpload#default"><a href="LuCI.form.FileUpload.html#default">default</a></li>
729
730 <li data-name="LuCI.form.FileUpload#editable"><a href="LuCI.form.FileUpload.html#editable">editable</a></li>
731
732 <li data-name="LuCI.form.FileUpload#modalonly"><a href="LuCI.form.FileUpload.html#modalonly">modalonly</a></li>
733
734 <li data-name="LuCI.form.FileUpload#onchange"><a href="LuCI.form.FileUpload.html#onchange">onchange</a></li>
735
736 <li data-name="LuCI.form.FileUpload#optional"><a href="LuCI.form.FileUpload.html#optional">optional</a></li>
737
738 <li data-name="LuCI.form.FileUpload#password"><a href="LuCI.form.FileUpload.html#password">password</a></li>
739
740 <li data-name="LuCI.form.FileUpload#placeholder"><a href="LuCI.form.FileUpload.html#placeholder">placeholder</a></li>
741
742 <li data-name="LuCI.form.FileUpload#readonly"><a href="LuCI.form.FileUpload.html#readonly">readonly</a></li>
743
744 <li data-name="LuCI.form.FileUpload#retain"><a href="LuCI.form.FileUpload.html#retain">retain</a></li>
745
746 <li data-name="LuCI.form.FileUpload#rmempty"><a href="LuCI.form.FileUpload.html#rmempty">rmempty</a></li>
747
748 <li data-name="LuCI.form.FileUpload#uciconfig"><a href="LuCI.form.FileUpload.html#uciconfig">uciconfig</a></li>
749
750 <li data-name="LuCI.form.FileUpload#ucioption"><a href="LuCI.form.FileUpload.html#ucioption">ucioption</a></li>
751
752 <li data-name="LuCI.form.FileUpload#ucisection"><a href="LuCI.form.FileUpload.html#ucisection">ucisection</a></li>
753
754 <li data-name="LuCI.form.FileUpload#validate"><a href="LuCI.form.FileUpload.html#validate">validate</a></li>
755
756 <li data-name="LuCI.form.FileUpload#width"><a href="LuCI.form.FileUpload.html#width">width</a></li>
757
758 </ul>
759 <ul class="typedefs itemMembers">
760
761 </ul>
762 <ul class="typedefs itemMembers">
763
764 </ul>
765 <ul class="methods itemMembers">
766
767 <span class="subtitle">Methods</span>
768
769 <li data-name="LuCI.form.FileUpload#append"><a href="LuCI.form.FileUpload.html#append">append</a></li>
770
771 <li data-name="LuCI.form.FileUpload#cbid"><a href="LuCI.form.FileUpload.html#cbid">cbid</a></li>
772
773 <li data-name="LuCI.form.FileUpload#cfgvalue"><a href="LuCI.form.FileUpload.html#cfgvalue">cfgvalue</a></li>
774
775 <li data-name="LuCI.form.FileUpload#depends"><a href="LuCI.form.FileUpload.html#depends">depends</a></li>
776
777 <li data-name="LuCI.form.FileUpload#formvalue"><a href="LuCI.form.FileUpload.html#formvalue">formvalue</a></li>
778
779 <li data-name="LuCI.form.FileUpload#getUIElement"><a href="LuCI.form.FileUpload.html#getUIElement">getUIElement</a></li>
780
781 <li data-name="LuCI.form.FileUpload#getValidationError"><a href="LuCI.form.FileUpload.html#getValidationError">getValidationError</a></li>
782
783 <li data-name="LuCI.form.FileUpload#isActive"><a href="LuCI.form.FileUpload.html#isActive">isActive</a></li>
784
785 <li data-name="LuCI.form.FileUpload#isValid"><a href="LuCI.form.FileUpload.html#isValid">isValid</a></li>
786
787 <li data-name="LuCI.form.FileUpload#load"><a href="LuCI.form.FileUpload.html#load">load</a></li>
788
789 <li data-name="LuCI.form.FileUpload#parse"><a href="LuCI.form.FileUpload.html#parse">parse</a></li>
790
791 <li data-name="LuCI.form.FileUpload#remove"><a href="LuCI.form.FileUpload.html#remove">remove</a></li>
792
793 <li data-name="LuCI.form.FileUpload#stripTags"><a href="LuCI.form.FileUpload.html#stripTags">stripTags</a></li>
794
795 <li data-name="LuCI.form.FileUpload#textvalue"><a href="LuCI.form.FileUpload.html#textvalue">textvalue</a></li>
796
797 <li data-name="LuCI.form.FileUpload#titleFn"><a href="LuCI.form.FileUpload.html#titleFn">titleFn</a></li>
798
799 <li data-name="LuCI.form.FileUpload#value"><a href="LuCI.form.FileUpload.html#value">value</a></li>
800
801 <li data-name="LuCI.form.FileUpload#write"><a href="LuCI.form.FileUpload.html#write">write</a></li>
802
803 </ul>
804 <ul class="events itemMembers">
805
806 </ul>
807 </li>
808
809 <li class="item" data-name="LuCI.form.FlagValue">
810 <span class="title">
811 <a href="LuCI.form.FlagValue.html">LuCI.form.FlagValue</a>
812
813 </span>
814 <ul class="members itemMembers">
815
816 <span class="subtitle">Members</span>
817
818 <li data-name="LuCI.form.FlagValue##disabled"><a href="LuCI.form.FlagValue.html#disabled">disabled</a></li>
819
820 <li data-name="LuCI.form.FlagValue##enabled"><a href="LuCI.form.FlagValue.html#enabled">enabled</a></li>
821
822 <li data-name="LuCI.form.FlagValue##tooltip"><a href="LuCI.form.FlagValue.html#tooltip">tooltip</a></li>
823
824 <li data-name="LuCI.form.FlagValue##tooltipicon"><a href="LuCI.form.FlagValue.html#tooltipicon">tooltipicon</a></li>
825
826 <li data-name="LuCI.form.FlagValue#datatype"><a href="LuCI.form.FlagValue.html#datatype">datatype</a></li>
827
828 <li data-name="LuCI.form.FlagValue#default"><a href="LuCI.form.FlagValue.html#default">default</a></li>
829
830 <li data-name="LuCI.form.FlagValue#editable"><a href="LuCI.form.FlagValue.html#editable">editable</a></li>
831
832 <li data-name="LuCI.form.FlagValue#modalonly"><a href="LuCI.form.FlagValue.html#modalonly">modalonly</a></li>
833
834 <li data-name="LuCI.form.FlagValue#onchange"><a href="LuCI.form.FlagValue.html#onchange">onchange</a></li>
835
836 <li data-name="LuCI.form.FlagValue#optional"><a href="LuCI.form.FlagValue.html#optional">optional</a></li>
837
838 <li data-name="LuCI.form.FlagValue#password"><a href="LuCI.form.FlagValue.html#password">password</a></li>
839
840 <li data-name="LuCI.form.FlagValue#placeholder"><a href="LuCI.form.FlagValue.html#placeholder">placeholder</a></li>
841
842 <li data-name="LuCI.form.FlagValue#readonly"><a href="LuCI.form.FlagValue.html#readonly">readonly</a></li>
843
844 <li data-name="LuCI.form.FlagValue#retain"><a href="LuCI.form.FlagValue.html#retain">retain</a></li>
845
846 <li data-name="LuCI.form.FlagValue#rmempty"><a href="LuCI.form.FlagValue.html#rmempty">rmempty</a></li>
847
848 <li data-name="LuCI.form.FlagValue#uciconfig"><a href="LuCI.form.FlagValue.html#uciconfig">uciconfig</a></li>
849
850 <li data-name="LuCI.form.FlagValue#ucioption"><a href="LuCI.form.FlagValue.html#ucioption">ucioption</a></li>
851
852 <li data-name="LuCI.form.FlagValue#ucisection"><a href="LuCI.form.FlagValue.html#ucisection">ucisection</a></li>
853
854 <li data-name="LuCI.form.FlagValue#validate"><a href="LuCI.form.FlagValue.html#validate">validate</a></li>
855
856 <li data-name="LuCI.form.FlagValue#width"><a href="LuCI.form.FlagValue.html#width">width</a></li>
857
858 </ul>
859 <ul class="typedefs itemMembers">
860
861 </ul>
862 <ul class="typedefs itemMembers">
863
864 </ul>
865 <ul class="methods itemMembers">
866
867 <span class="subtitle">Methods</span>
868
869 <li data-name="LuCI.form.FlagValue#append"><a href="LuCI.form.FlagValue.html#append">append</a></li>
870
871 <li data-name="LuCI.form.FlagValue#cbid"><a href="LuCI.form.FlagValue.html#cbid">cbid</a></li>
872
873 <li data-name="LuCI.form.FlagValue#cfgvalue"><a href="LuCI.form.FlagValue.html#cfgvalue">cfgvalue</a></li>
874
875 <li data-name="LuCI.form.FlagValue#depends"><a href="LuCI.form.FlagValue.html#depends">depends</a></li>
876
877 <li data-name="LuCI.form.FlagValue#formvalue"><a href="LuCI.form.FlagValue.html#formvalue">formvalue</a></li>
878
879 <li data-name="LuCI.form.FlagValue#getUIElement"><a href="LuCI.form.FlagValue.html#getUIElement">getUIElement</a></li>
880
881 <li data-name="LuCI.form.FlagValue#getValidationError"><a href="LuCI.form.FlagValue.html#getValidationError">getValidationError</a></li>
882
883 <li data-name="LuCI.form.FlagValue#isActive"><a href="LuCI.form.FlagValue.html#isActive">isActive</a></li>
884
885 <li data-name="LuCI.form.FlagValue#isValid"><a href="LuCI.form.FlagValue.html#isValid">isValid</a></li>
886
887 <li data-name="LuCI.form.FlagValue#load"><a href="LuCI.form.FlagValue.html#load">load</a></li>
888
889 <li data-name="LuCI.form.FlagValue#parse"><a href="LuCI.form.FlagValue.html#parse">parse</a></li>
890
891 <li data-name="LuCI.form.FlagValue#remove"><a href="LuCI.form.FlagValue.html#remove">remove</a></li>
892
893 <li data-name="LuCI.form.FlagValue#stripTags"><a href="LuCI.form.FlagValue.html#stripTags">stripTags</a></li>
894
895 <li data-name="LuCI.form.FlagValue#textvalue"><a href="LuCI.form.FlagValue.html#textvalue">textvalue</a></li>
896
897 <li data-name="LuCI.form.FlagValue#titleFn"><a href="LuCI.form.FlagValue.html#titleFn">titleFn</a></li>
898
899 <li data-name="LuCI.form.FlagValue#value"><a href="LuCI.form.FlagValue.html#value">value</a></li>
900
901 <li data-name="LuCI.form.FlagValue#write"><a href="LuCI.form.FlagValue.html#write">write</a></li>
902
903 </ul>
904 <ul class="events itemMembers">
905
906 </ul>
907 </li>
908
909 <li class="item" data-name="LuCI.form.GridSection">
910 <span class="title">
911 <a href="LuCI.form.GridSection.html">LuCI.form.GridSection</a>
912
913 </span>
914 <ul class="members itemMembers">
915
916 <span class="subtitle">Members</span>
917
918 <li data-name="LuCI.form.GridSection#addbtntitle"><a href="LuCI.form.GridSection.html#addbtntitle">addbtntitle</a></li>
919
920 <li data-name="LuCI.form.GridSection#addremove"><a href="LuCI.form.GridSection.html#addremove">addremove</a></li>
921
922 <li data-name="LuCI.form.GridSection#anonymous"><a href="LuCI.form.GridSection.html#anonymous">anonymous</a></li>
923
924 <li data-name="LuCI.form.GridSection#extedit"><a href="LuCI.form.GridSection.html#extedit">extedit</a></li>
925
926 <li data-name="LuCI.form.GridSection#max_cols"><a href="LuCI.form.GridSection.html#max_cols">max_cols</a></li>
927
928 <li data-name="LuCI.form.GridSection#modaltitle"><a href="LuCI.form.GridSection.html#modaltitle">modaltitle</a></li>
929
930 <li data-name="LuCI.form.GridSection#nodescriptions"><a href="LuCI.form.GridSection.html#nodescriptions">nodescriptions</a></li>
931
932 <li data-name="LuCI.form.GridSection#parentoption"><a href="LuCI.form.GridSection.html#parentoption">parentoption</a></li>
933
934 <li data-name="LuCI.form.GridSection#rowcolors"><a href="LuCI.form.GridSection.html#rowcolors">rowcolors</a></li>
935
936 <li data-name="LuCI.form.GridSection#sectiontitle"><a href="LuCI.form.GridSection.html#sectiontitle">sectiontitle</a></li>
937
938 <li data-name="LuCI.form.GridSection#sortable"><a href="LuCI.form.GridSection.html#sortable">sortable</a></li>
939
940 <li data-name="LuCI.form.GridSection#tabbed"><a href="LuCI.form.GridSection.html#tabbed">tabbed</a></li>
941
942 <li data-name="LuCI.form.GridSection#uciconfig"><a href="LuCI.form.GridSection.html#uciconfig">uciconfig</a></li>
943
944 </ul>
945 <ul class="typedefs itemMembers">
946
947 </ul>
948 <ul class="typedefs itemMembers">
949
950 </ul>
951 <ul class="methods itemMembers">
952
953 <span class="subtitle">Methods</span>
954
955 <li data-name="LuCI.form.GridSection#addModalOptions"><a href="LuCI.form.GridSection.html#addModalOptions">addModalOptions</a></li>
956
957 <li data-name="LuCI.form.GridSection#append"><a href="LuCI.form.GridSection.html#append">append</a></li>
958
959 <li data-name="LuCI.form.GridSection#cfgvalue"><a href="LuCI.form.GridSection.html#cfgvalue">cfgvalue</a></li>
960
961 <li data-name="LuCI.form.GridSection#filter"><a href="LuCI.form.GridSection.html#filter">filter</a></li>
962
963 <li data-name="LuCI.form.GridSection#formvalue"><a href="LuCI.form.GridSection.html#formvalue">formvalue</a></li>
964
965 <li data-name="LuCI.form.GridSection#getOption"><a href="LuCI.form.GridSection.html#getOption">getOption</a></li>
966
967 <li data-name="LuCI.form.GridSection#getUIElement"><a href="LuCI.form.GridSection.html#getUIElement">getUIElement</a></li>
968
969 <li data-name="LuCI.form.GridSection#load"><a href="LuCI.form.GridSection.html#load">load</a></li>
970
971 <li data-name="LuCI.form.GridSection#option"><a href="LuCI.form.GridSection.html#option">option</a></li>
972
973 <li data-name="LuCI.form.GridSection#parse"><a href="LuCI.form.GridSection.html#parse">parse</a></li>
974
975 <li data-name="LuCI.form.GridSection#stripTags"><a href="LuCI.form.GridSection.html#stripTags">stripTags</a></li>
976
977 <li data-name="LuCI.form.GridSection#tab"><a href="LuCI.form.GridSection.html#tab">tab</a></li>
978
979 <li data-name="LuCI.form.GridSection#taboption"><a href="LuCI.form.GridSection.html#taboption">taboption</a></li>
980
981 <li data-name="LuCI.form.GridSection#titleFn"><a href="LuCI.form.GridSection.html#titleFn">titleFn</a></li>
982
983 </ul>
984 <ul class="events itemMembers">
985
986 </ul>
987 </li>
988
989 <li class="item" data-name="LuCI.form.HiddenValue">
990 <span class="title">
991 <a href="LuCI.form.HiddenValue.html">LuCI.form.HiddenValue</a>
992
993 </span>
994 <ul class="members itemMembers">
995
996 <span class="subtitle">Members</span>
997
998 <li data-name="LuCI.form.HiddenValue#datatype"><a href="LuCI.form.HiddenValue.html#datatype">datatype</a></li>
999
1000 <li data-name="LuCI.form.HiddenValue#default"><a href="LuCI.form.HiddenValue.html#default">default</a></li>
1001
1002 <li data-name="LuCI.form.HiddenValue#editable"><a href="LuCI.form.HiddenValue.html#editable">editable</a></li>
1003
1004 <li data-name="LuCI.form.HiddenValue#modalonly"><a href="LuCI.form.HiddenValue.html#modalonly">modalonly</a></li>
1005
1006 <li data-name="LuCI.form.HiddenValue#onchange"><a href="LuCI.form.HiddenValue.html#onchange">onchange</a></li>
1007
1008 <li data-name="LuCI.form.HiddenValue#optional"><a href="LuCI.form.HiddenValue.html#optional">optional</a></li>
1009
1010 <li data-name="LuCI.form.HiddenValue#password"><a href="LuCI.form.HiddenValue.html#password">password</a></li>
1011
1012 <li data-name="LuCI.form.HiddenValue#placeholder"><a href="LuCI.form.HiddenValue.html#placeholder">placeholder</a></li>
1013
1014 <li data-name="LuCI.form.HiddenValue#readonly"><a href="LuCI.form.HiddenValue.html#readonly">readonly</a></li>
1015
1016 <li data-name="LuCI.form.HiddenValue#retain"><a href="LuCI.form.HiddenValue.html#retain">retain</a></li>
1017
1018 <li data-name="LuCI.form.HiddenValue#rmempty"><a href="LuCI.form.HiddenValue.html#rmempty">rmempty</a></li>
1019
1020 <li data-name="LuCI.form.HiddenValue#uciconfig"><a href="LuCI.form.HiddenValue.html#uciconfig">uciconfig</a></li>
1021
1022 <li data-name="LuCI.form.HiddenValue#ucioption"><a href="LuCI.form.HiddenValue.html#ucioption">ucioption</a></li>
1023
1024 <li data-name="LuCI.form.HiddenValue#ucisection"><a href="LuCI.form.HiddenValue.html#ucisection">ucisection</a></li>
1025
1026 <li data-name="LuCI.form.HiddenValue#validate"><a href="LuCI.form.HiddenValue.html#validate">validate</a></li>
1027
1028 <li data-name="LuCI.form.HiddenValue#width"><a href="LuCI.form.HiddenValue.html#width">width</a></li>
1029
1030 </ul>
1031 <ul class="typedefs itemMembers">
1032
1033 </ul>
1034 <ul class="typedefs itemMembers">
1035
1036 </ul>
1037 <ul class="methods itemMembers">
1038
1039 <span class="subtitle">Methods</span>
1040
1041 <li data-name="LuCI.form.HiddenValue#append"><a href="LuCI.form.HiddenValue.html#append">append</a></li>
1042
1043 <li data-name="LuCI.form.HiddenValue#cbid"><a href="LuCI.form.HiddenValue.html#cbid">cbid</a></li>
1044
1045 <li data-name="LuCI.form.HiddenValue#cfgvalue"><a href="LuCI.form.HiddenValue.html#cfgvalue">cfgvalue</a></li>
1046
1047 <li data-name="LuCI.form.HiddenValue#depends"><a href="LuCI.form.HiddenValue.html#depends">depends</a></li>
1048
1049 <li data-name="LuCI.form.HiddenValue#formvalue"><a href="LuCI.form.HiddenValue.html#formvalue">formvalue</a></li>
1050
1051 <li data-name="LuCI.form.HiddenValue#getUIElement"><a href="LuCI.form.HiddenValue.html#getUIElement">getUIElement</a></li>
1052
1053 <li data-name="LuCI.form.HiddenValue#getValidationError"><a href="LuCI.form.HiddenValue.html#getValidationError">getValidationError</a></li>
1054
1055 <li data-name="LuCI.form.HiddenValue#isActive"><a href="LuCI.form.HiddenValue.html#isActive">isActive</a></li>
1056
1057 <li data-name="LuCI.form.HiddenValue#isValid"><a href="LuCI.form.HiddenValue.html#isValid">isValid</a></li>
1058
1059 <li data-name="LuCI.form.HiddenValue#load"><a href="LuCI.form.HiddenValue.html#load">load</a></li>
1060
1061 <li data-name="LuCI.form.HiddenValue#parse"><a href="LuCI.form.HiddenValue.html#parse">parse</a></li>
1062
1063 <li data-name="LuCI.form.HiddenValue#remove"><a href="LuCI.form.HiddenValue.html#remove">remove</a></li>
1064
1065 <li data-name="LuCI.form.HiddenValue#stripTags"><a href="LuCI.form.HiddenValue.html#stripTags">stripTags</a></li>
1066
1067 <li data-name="LuCI.form.HiddenValue#textvalue"><a href="LuCI.form.HiddenValue.html#textvalue">textvalue</a></li>
1068
1069 <li data-name="LuCI.form.HiddenValue#titleFn"><a href="LuCI.form.HiddenValue.html#titleFn">titleFn</a></li>
1070
1071 <li data-name="LuCI.form.HiddenValue#value"><a href="LuCI.form.HiddenValue.html#value">value</a></li>
1072
1073 <li data-name="LuCI.form.HiddenValue#write"><a href="LuCI.form.HiddenValue.html#write">write</a></li>
1074
1075 </ul>
1076 <ul class="events itemMembers">
1077
1078 </ul>
1079 </li>
1080
1081 <li class="item" data-name="LuCI.form.JSONMap">
1082 <span class="title">
1083 <a href="LuCI.form.JSONMap.html">LuCI.form.JSONMap</a>
1084
1085 </span>
1086 <ul class="members itemMembers">
1087
1088 <span class="subtitle">Members</span>
1089
1090 <li data-name="LuCI.form.JSONMap#readonly"><a href="LuCI.form.JSONMap.html#readonly">readonly</a></li>
1091
1092 </ul>
1093 <ul class="typedefs itemMembers">
1094
1095 </ul>
1096 <ul class="typedefs itemMembers">
1097
1098 </ul>
1099 <ul class="methods itemMembers">
1100
1101 <span class="subtitle">Methods</span>
1102
1103 <li data-name="LuCI.form.JSONMap#append"><a href="LuCI.form.JSONMap.html#append">append</a></li>
1104
1105 <li data-name="LuCI.form.JSONMap#chain"><a href="LuCI.form.JSONMap.html#chain">chain</a></li>
1106
1107 <li data-name="LuCI.form.JSONMap#findElement"><a href="LuCI.form.JSONMap.html#findElement">findElement</a></li>
1108
1109 <li data-name="LuCI.form.JSONMap#findElements"><a href="LuCI.form.JSONMap.html#findElements">findElements</a></li>
1110
1111 <li data-name="LuCI.form.JSONMap#load"><a href="LuCI.form.JSONMap.html#load">load</a></li>
1112
1113 <li data-name="LuCI.form.JSONMap#lookupOption"><a href="LuCI.form.JSONMap.html#lookupOption">lookupOption</a></li>
1114
1115 <li data-name="LuCI.form.JSONMap#parse"><a href="LuCI.form.JSONMap.html#parse">parse</a></li>
1116
1117 <li data-name="LuCI.form.JSONMap#render"><a href="LuCI.form.JSONMap.html#render">render</a></li>
1118
1119 <li data-name="LuCI.form.JSONMap#reset"><a href="LuCI.form.JSONMap.html#reset">reset</a></li>
1120
1121 <li data-name="LuCI.form.JSONMap#save"><a href="LuCI.form.JSONMap.html#save">save</a></li>
1122
1123 <li data-name="LuCI.form.JSONMap#section"><a href="LuCI.form.JSONMap.html#section">section</a></li>
1124
1125 <li data-name="LuCI.form.JSONMap#stripTags"><a href="LuCI.form.JSONMap.html#stripTags">stripTags</a></li>
1126
1127 <li data-name="LuCI.form.JSONMap#titleFn"><a href="LuCI.form.JSONMap.html#titleFn">titleFn</a></li>
1128
1129 </ul>
1130 <ul class="events itemMembers">
1131
1132 </ul>
1133 </li>
1134
1135 <li class="item" data-name="LuCI.form.ListValue">
1136 <span class="title">
1137 <a href="LuCI.form.ListValue.html">LuCI.form.ListValue</a>
1138
1139 </span>
1140 <ul class="members itemMembers">
1141
1142 <span class="subtitle">Members</span>
1143
1144 <li data-name="LuCI.form.ListValue##orientation"><a href="LuCI.form.ListValue.html#orientation">orientation</a></li>
1145
1146 <li data-name="LuCI.form.ListValue##size"><a href="LuCI.form.ListValue.html#size">size</a></li>
1147
1148 <li data-name="LuCI.form.ListValue##widget"><a href="LuCI.form.ListValue.html#widget">widget</a></li>
1149
1150 <li data-name="LuCI.form.ListValue#datatype"><a href="LuCI.form.ListValue.html#datatype">datatype</a></li>
1151
1152 <li data-name="LuCI.form.ListValue#default"><a href="LuCI.form.ListValue.html#default">default</a></li>
1153
1154 <li data-name="LuCI.form.ListValue#editable"><a href="LuCI.form.ListValue.html#editable">editable</a></li>
1155
1156 <li data-name="LuCI.form.ListValue#modalonly"><a href="LuCI.form.ListValue.html#modalonly">modalonly</a></li>
1157
1158 <li data-name="LuCI.form.ListValue#onchange"><a href="LuCI.form.ListValue.html#onchange">onchange</a></li>
1159
1160 <li data-name="LuCI.form.ListValue#optional"><a href="LuCI.form.ListValue.html#optional">optional</a></li>
1161
1162 <li data-name="LuCI.form.ListValue#password"><a href="LuCI.form.ListValue.html#password">password</a></li>
1163
1164 <li data-name="LuCI.form.ListValue#placeholder"><a href="LuCI.form.ListValue.html#placeholder">placeholder</a></li>
1165
1166 <li data-name="LuCI.form.ListValue#readonly"><a href="LuCI.form.ListValue.html#readonly">readonly</a></li>
1167
1168 <li data-name="LuCI.form.ListValue#retain"><a href="LuCI.form.ListValue.html#retain">retain</a></li>
1169
1170 <li data-name="LuCI.form.ListValue#rmempty"><a href="LuCI.form.ListValue.html#rmempty">rmempty</a></li>
1171
1172 <li data-name="LuCI.form.ListValue#uciconfig"><a href="LuCI.form.ListValue.html#uciconfig">uciconfig</a></li>
1173
1174 <li data-name="LuCI.form.ListValue#ucioption"><a href="LuCI.form.ListValue.html#ucioption">ucioption</a></li>
1175
1176 <li data-name="LuCI.form.ListValue#ucisection"><a href="LuCI.form.ListValue.html#ucisection">ucisection</a></li>
1177
1178 <li data-name="LuCI.form.ListValue#validate"><a href="LuCI.form.ListValue.html#validate">validate</a></li>
1179
1180 <li data-name="LuCI.form.ListValue#width"><a href="LuCI.form.ListValue.html#width">width</a></li>
1181
1182 </ul>
1183 <ul class="typedefs itemMembers">
1184
1185 </ul>
1186 <ul class="typedefs itemMembers">
1187
1188 </ul>
1189 <ul class="methods itemMembers">
1190
1191 <span class="subtitle">Methods</span>
1192
1193 <li data-name="LuCI.form.ListValue#append"><a href="LuCI.form.ListValue.html#append">append</a></li>
1194
1195 <li data-name="LuCI.form.ListValue#cbid"><a href="LuCI.form.ListValue.html#cbid">cbid</a></li>
1196
1197 <li data-name="LuCI.form.ListValue#cfgvalue"><a href="LuCI.form.ListValue.html#cfgvalue">cfgvalue</a></li>
1198
1199 <li data-name="LuCI.form.ListValue#depends"><a href="LuCI.form.ListValue.html#depends">depends</a></li>
1200
1201 <li data-name="LuCI.form.ListValue#formvalue"><a href="LuCI.form.ListValue.html#formvalue">formvalue</a></li>
1202
1203 <li data-name="LuCI.form.ListValue#getUIElement"><a href="LuCI.form.ListValue.html#getUIElement">getUIElement</a></li>
1204
1205 <li data-name="LuCI.form.ListValue#getValidationError"><a href="LuCI.form.ListValue.html#getValidationError">getValidationError</a></li>
1206
1207 <li data-name="LuCI.form.ListValue#isActive"><a href="LuCI.form.ListValue.html#isActive">isActive</a></li>
1208
1209 <li data-name="LuCI.form.ListValue#isValid"><a href="LuCI.form.ListValue.html#isValid">isValid</a></li>
1210
1211 <li data-name="LuCI.form.ListValue#load"><a href="LuCI.form.ListValue.html#load">load</a></li>
1212
1213 <li data-name="LuCI.form.ListValue#parse"><a href="LuCI.form.ListValue.html#parse">parse</a></li>
1214
1215 <li data-name="LuCI.form.ListValue#remove"><a href="LuCI.form.ListValue.html#remove">remove</a></li>
1216
1217 <li data-name="LuCI.form.ListValue#stripTags"><a href="LuCI.form.ListValue.html#stripTags">stripTags</a></li>
1218
1219 <li data-name="LuCI.form.ListValue#textvalue"><a href="LuCI.form.ListValue.html#textvalue">textvalue</a></li>
1220
1221 <li data-name="LuCI.form.ListValue#titleFn"><a href="LuCI.form.ListValue.html#titleFn">titleFn</a></li>
1222
1223 <li data-name="LuCI.form.ListValue#value"><a href="LuCI.form.ListValue.html#value">value</a></li>
1224
1225 <li data-name="LuCI.form.ListValue#write"><a href="LuCI.form.ListValue.html#write">write</a></li>
1226
1227 </ul>
1228 <ul class="events itemMembers">
1229
1230 </ul>
1231 </li>
1232
1233 <li class="item" data-name="LuCI.form.Map">
1234 <span class="title">
1235 <a href="LuCI.form.Map.html">LuCI.form.Map</a>
1236
1237 </span>
1238 <ul class="members itemMembers">
1239
1240 <span class="subtitle">Members</span>
1241
1242 <li data-name="LuCI.form.Map##readonly"><a href="LuCI.form.Map.html#readonly">readonly</a></li>
1243
1244 </ul>
1245 <ul class="typedefs itemMembers">
1246
1247 </ul>
1248 <ul class="typedefs itemMembers">
1249
1250 </ul>
1251 <ul class="methods itemMembers">
1252
1253 <span class="subtitle">Methods</span>
1254
1255 <li data-name="LuCI.form.Map#append"><a href="LuCI.form.Map.html#append">append</a></li>
1256
1257 <li data-name="LuCI.form.Map#chain"><a href="LuCI.form.Map.html#chain">chain</a></li>
1258
1259 <li data-name="LuCI.form.Map#findElement"><a href="LuCI.form.Map.html#findElement">findElement</a></li>
1260
1261 <li data-name="LuCI.form.Map#findElements"><a href="LuCI.form.Map.html#findElements">findElements</a></li>
1262
1263 <li data-name="LuCI.form.Map#load"><a href="LuCI.form.Map.html#load">load</a></li>
1264
1265 <li data-name="LuCI.form.Map#lookupOption"><a href="LuCI.form.Map.html#lookupOption">lookupOption</a></li>
1266
1267 <li data-name="LuCI.form.Map#parse"><a href="LuCI.form.Map.html#parse">parse</a></li>
1268
1269 <li data-name="LuCI.form.Map#render"><a href="LuCI.form.Map.html#render">render</a></li>
1270
1271 <li data-name="LuCI.form.Map#reset"><a href="LuCI.form.Map.html#reset">reset</a></li>
1272
1273 <li data-name="LuCI.form.Map#save"><a href="LuCI.form.Map.html#save">save</a></li>
1274
1275 <li data-name="LuCI.form.Map#section"><a href="LuCI.form.Map.html#section">section</a></li>
1276
1277 <li data-name="LuCI.form.Map#stripTags"><a href="LuCI.form.Map.html#stripTags">stripTags</a></li>
1278
1279 <li data-name="LuCI.form.Map#titleFn"><a href="LuCI.form.Map.html#titleFn">titleFn</a></li>
1280
1281 </ul>
1282 <ul class="events itemMembers">
1283
1284 </ul>
1285 </li>
1286
1287 <li class="item" data-name="LuCI.form.MultiValue">
1288 <span class="title">
1289 <a href="LuCI.form.MultiValue.html">LuCI.form.MultiValue</a>
1290
1291 </span>
1292 <ul class="members itemMembers">
1293
1294 <span class="subtitle">Members</span>
1295
1296 <li data-name="LuCI.form.MultiValue##display_size"><a href="LuCI.form.MultiValue.html#display_size">display_size</a></li>
1297
1298 <li data-name="LuCI.form.MultiValue##dropdown_size"><a href="LuCI.form.MultiValue.html#dropdown_size">dropdown_size</a></li>
1299
1300 <li data-name="LuCI.form.MultiValue#datatype"><a href="LuCI.form.MultiValue.html#datatype">datatype</a></li>
1301
1302 <li data-name="LuCI.form.MultiValue#default"><a href="LuCI.form.MultiValue.html#default">default</a></li>
1303
1304 <li data-name="LuCI.form.MultiValue#editable"><a href="LuCI.form.MultiValue.html#editable">editable</a></li>
1305
1306 <li data-name="LuCI.form.MultiValue#modalonly"><a href="LuCI.form.MultiValue.html#modalonly">modalonly</a></li>
1307
1308 <li data-name="LuCI.form.MultiValue#onchange"><a href="LuCI.form.MultiValue.html#onchange">onchange</a></li>
1309
1310 <li data-name="LuCI.form.MultiValue#optional"><a href="LuCI.form.MultiValue.html#optional">optional</a></li>
1311
1312 <li data-name="LuCI.form.MultiValue#password"><a href="LuCI.form.MultiValue.html#password">password</a></li>
1313
1314 <li data-name="LuCI.form.MultiValue#placeholder"><a href="LuCI.form.MultiValue.html#placeholder">placeholder</a></li>
1315
1316 <li data-name="LuCI.form.MultiValue#readonly"><a href="LuCI.form.MultiValue.html#readonly">readonly</a></li>
1317
1318 <li data-name="LuCI.form.MultiValue#retain"><a href="LuCI.form.MultiValue.html#retain">retain</a></li>
1319
1320 <li data-name="LuCI.form.MultiValue#rmempty"><a href="LuCI.form.MultiValue.html#rmempty">rmempty</a></li>
1321
1322 <li data-name="LuCI.form.MultiValue#uciconfig"><a href="LuCI.form.MultiValue.html#uciconfig">uciconfig</a></li>
1323
1324 <li data-name="LuCI.form.MultiValue#ucioption"><a href="LuCI.form.MultiValue.html#ucioption">ucioption</a></li>
1325
1326 <li data-name="LuCI.form.MultiValue#ucisection"><a href="LuCI.form.MultiValue.html#ucisection">ucisection</a></li>
1327
1328 <li data-name="LuCI.form.MultiValue#validate"><a href="LuCI.form.MultiValue.html#validate">validate</a></li>
1329
1330 <li data-name="LuCI.form.MultiValue#width"><a href="LuCI.form.MultiValue.html#width">width</a></li>
1331
1332 </ul>
1333 <ul class="typedefs itemMembers">
1334
1335 </ul>
1336 <ul class="typedefs itemMembers">
1337
1338 </ul>
1339 <ul class="methods itemMembers">
1340
1341 <span class="subtitle">Methods</span>
1342
1343 <li data-name="LuCI.form.MultiValue#append"><a href="LuCI.form.MultiValue.html#append">append</a></li>
1344
1345 <li data-name="LuCI.form.MultiValue#cbid"><a href="LuCI.form.MultiValue.html#cbid">cbid</a></li>
1346
1347 <li data-name="LuCI.form.MultiValue#cfgvalue"><a href="LuCI.form.MultiValue.html#cfgvalue">cfgvalue</a></li>
1348
1349 <li data-name="LuCI.form.MultiValue#depends"><a href="LuCI.form.MultiValue.html#depends">depends</a></li>
1350
1351 <li data-name="LuCI.form.MultiValue#formvalue"><a href="LuCI.form.MultiValue.html#formvalue">formvalue</a></li>
1352
1353 <li data-name="LuCI.form.MultiValue#getUIElement"><a href="LuCI.form.MultiValue.html#getUIElement">getUIElement</a></li>
1354
1355 <li data-name="LuCI.form.MultiValue#getValidationError"><a href="LuCI.form.MultiValue.html#getValidationError">getValidationError</a></li>
1356
1357 <li data-name="LuCI.form.MultiValue#isActive"><a href="LuCI.form.MultiValue.html#isActive">isActive</a></li>
1358
1359 <li data-name="LuCI.form.MultiValue#isValid"><a href="LuCI.form.MultiValue.html#isValid">isValid</a></li>
1360
1361 <li data-name="LuCI.form.MultiValue#load"><a href="LuCI.form.MultiValue.html#load">load</a></li>
1362
1363 <li data-name="LuCI.form.MultiValue#parse"><a href="LuCI.form.MultiValue.html#parse">parse</a></li>
1364
1365 <li data-name="LuCI.form.MultiValue#remove"><a href="LuCI.form.MultiValue.html#remove">remove</a></li>
1366
1367 <li data-name="LuCI.form.MultiValue#stripTags"><a href="LuCI.form.MultiValue.html#stripTags">stripTags</a></li>
1368
1369 <li data-name="LuCI.form.MultiValue#textvalue"><a href="LuCI.form.MultiValue.html#textvalue">textvalue</a></li>
1370
1371 <li data-name="LuCI.form.MultiValue#titleFn"><a href="LuCI.form.MultiValue.html#titleFn">titleFn</a></li>
1372
1373 <li data-name="LuCI.form.MultiValue#value"><a href="LuCI.form.MultiValue.html#value">value</a></li>
1374
1375 <li data-name="LuCI.form.MultiValue#write"><a href="LuCI.form.MultiValue.html#write">write</a></li>
1376
1377 </ul>
1378 <ul class="events itemMembers">
1379
1380 </ul>
1381 </li>
1382
1383 <li class="item" data-name="LuCI.form.NamedSection">
1384 <span class="title">
1385 <a href="LuCI.form.NamedSection.html">LuCI.form.NamedSection</a>
1386
1387 </span>
1388 <ul class="members itemMembers">
1389
1390 <span class="subtitle">Members</span>
1391
1392 <li data-name="LuCI.form.NamedSection##addremove"><a href="LuCI.form.NamedSection.html#addremove">addremove</a></li>
1393
1394 <li data-name="LuCI.form.NamedSection##uciconfig"><a href="LuCI.form.NamedSection.html#uciconfig">uciconfig</a></li>
1395
1396 <li data-name="LuCI.form.NamedSection#parentoption"><a href="LuCI.form.NamedSection.html#parentoption">parentoption</a></li>
1397
1398 </ul>
1399 <ul class="typedefs itemMembers">
1400
1401 </ul>
1402 <ul class="typedefs itemMembers">
1403
1404 </ul>
1405 <ul class="methods itemMembers">
1406
1407 <span class="subtitle">Methods</span>
1408
1409 <li data-name="LuCI.form.NamedSection#append"><a href="LuCI.form.NamedSection.html#append">append</a></li>
1410
1411 <li data-name="LuCI.form.NamedSection#cfgsections"><a href="LuCI.form.NamedSection.html#cfgsections">cfgsections</a></li>
1412
1413 <li data-name="LuCI.form.NamedSection#cfgvalue"><a href="LuCI.form.NamedSection.html#cfgvalue">cfgvalue</a></li>
1414
1415 <li data-name="LuCI.form.NamedSection#filter"><a href="LuCI.form.NamedSection.html#filter">filter</a></li>
1416
1417 <li data-name="LuCI.form.NamedSection#formvalue"><a href="LuCI.form.NamedSection.html#formvalue">formvalue</a></li>
1418
1419 <li data-name="LuCI.form.NamedSection#getOption"><a href="LuCI.form.NamedSection.html#getOption">getOption</a></li>
1420
1421 <li data-name="LuCI.form.NamedSection#getUIElement"><a href="LuCI.form.NamedSection.html#getUIElement">getUIElement</a></li>
1422
1423 <li data-name="LuCI.form.NamedSection#load"><a href="LuCI.form.NamedSection.html#load">load</a></li>
1424
1425 <li data-name="LuCI.form.NamedSection#option"><a href="LuCI.form.NamedSection.html#option">option</a></li>
1426
1427 <li data-name="LuCI.form.NamedSection#parse"><a href="LuCI.form.NamedSection.html#parse">parse</a></li>
1428
1429 <li data-name="LuCI.form.NamedSection#render"><a href="LuCI.form.NamedSection.html#render">render</a></li>
1430
1431 <li data-name="LuCI.form.NamedSection#stripTags"><a href="LuCI.form.NamedSection.html#stripTags">stripTags</a></li>
1432
1433 <li data-name="LuCI.form.NamedSection#tab"><a href="LuCI.form.NamedSection.html#tab">tab</a></li>
1434
1435 <li data-name="LuCI.form.NamedSection#taboption"><a href="LuCI.form.NamedSection.html#taboption">taboption</a></li>
1436
1437 <li data-name="LuCI.form.NamedSection#titleFn"><a href="LuCI.form.NamedSection.html#titleFn">titleFn</a></li>
1438
1439 </ul>
1440 <ul class="events itemMembers">
1441
1442 </ul>
1443 </li>
1444
1445 <li class="item" data-name="LuCI.form.SectionValue">
1446 <span class="title">
1447 <a href="LuCI.form.SectionValue.html">LuCI.form.SectionValue</a>
1448
1449 </span>
1450 <ul class="members itemMembers">
1451
1452 <span class="subtitle">Members</span>
1453
1454 <li data-name="LuCI.form.SectionValue##subsection"><a href="LuCI.form.SectionValue.html#subsection">subsection</a></li>
1455
1456 <li data-name="LuCI.form.SectionValue#datatype"><a href="LuCI.form.SectionValue.html#datatype">datatype</a></li>
1457
1458 <li data-name="LuCI.form.SectionValue#default"><a href="LuCI.form.SectionValue.html#default">default</a></li>
1459
1460 <li data-name="LuCI.form.SectionValue#editable"><a href="LuCI.form.SectionValue.html#editable">editable</a></li>
1461
1462 <li data-name="LuCI.form.SectionValue#modalonly"><a href="LuCI.form.SectionValue.html#modalonly">modalonly</a></li>
1463
1464 <li data-name="LuCI.form.SectionValue#onchange"><a href="LuCI.form.SectionValue.html#onchange">onchange</a></li>
1465
1466 <li data-name="LuCI.form.SectionValue#optional"><a href="LuCI.form.SectionValue.html#optional">optional</a></li>
1467
1468 <li data-name="LuCI.form.SectionValue#password"><a href="LuCI.form.SectionValue.html#password">password</a></li>
1469
1470 <li data-name="LuCI.form.SectionValue#placeholder"><a href="LuCI.form.SectionValue.html#placeholder">placeholder</a></li>
1471
1472 <li data-name="LuCI.form.SectionValue#readonly"><a href="LuCI.form.SectionValue.html#readonly">readonly</a></li>
1473
1474 <li data-name="LuCI.form.SectionValue#retain"><a href="LuCI.form.SectionValue.html#retain">retain</a></li>
1475
1476 <li data-name="LuCI.form.SectionValue#rmempty"><a href="LuCI.form.SectionValue.html#rmempty">rmempty</a></li>
1477
1478 <li data-name="LuCI.form.SectionValue#uciconfig"><a href="LuCI.form.SectionValue.html#uciconfig">uciconfig</a></li>
1479
1480 <li data-name="LuCI.form.SectionValue#ucioption"><a href="LuCI.form.SectionValue.html#ucioption">ucioption</a></li>
1481
1482 <li data-name="LuCI.form.SectionValue#ucisection"><a href="LuCI.form.SectionValue.html#ucisection">ucisection</a></li>
1483
1484 <li data-name="LuCI.form.SectionValue#validate"><a href="LuCI.form.SectionValue.html#validate">validate</a></li>
1485
1486 <li data-name="LuCI.form.SectionValue#width"><a href="LuCI.form.SectionValue.html#width">width</a></li>
1487
1488 </ul>
1489 <ul class="typedefs itemMembers">
1490
1491 </ul>
1492 <ul class="typedefs itemMembers">
1493
1494 </ul>
1495 <ul class="methods itemMembers">
1496
1497 <span class="subtitle">Methods</span>
1498
1499 <li data-name="LuCI.form.SectionValue#append"><a href="LuCI.form.SectionValue.html#append">append</a></li>
1500
1501 <li data-name="LuCI.form.SectionValue#cbid"><a href="LuCI.form.SectionValue.html#cbid">cbid</a></li>
1502
1503 <li data-name="LuCI.form.SectionValue#cfgvalue"><a href="LuCI.form.SectionValue.html#cfgvalue">cfgvalue</a></li>
1504
1505 <li data-name="LuCI.form.SectionValue#depends"><a href="LuCI.form.SectionValue.html#depends">depends</a></li>
1506
1507 <li data-name="LuCI.form.SectionValue#formvalue"><a href="LuCI.form.SectionValue.html#formvalue">formvalue</a></li>
1508
1509 <li data-name="LuCI.form.SectionValue#getUIElement"><a href="LuCI.form.SectionValue.html#getUIElement">getUIElement</a></li>
1510
1511 <li data-name="LuCI.form.SectionValue#getValidationError"><a href="LuCI.form.SectionValue.html#getValidationError">getValidationError</a></li>
1512
1513 <li data-name="LuCI.form.SectionValue#isActive"><a href="LuCI.form.SectionValue.html#isActive">isActive</a></li>
1514
1515 <li data-name="LuCI.form.SectionValue#isValid"><a href="LuCI.form.SectionValue.html#isValid">isValid</a></li>
1516
1517 <li data-name="LuCI.form.SectionValue#load"><a href="LuCI.form.SectionValue.html#load">load</a></li>
1518
1519 <li data-name="LuCI.form.SectionValue#parse"><a href="LuCI.form.SectionValue.html#parse">parse</a></li>
1520
1521 <li data-name="LuCI.form.SectionValue#remove"><a href="LuCI.form.SectionValue.html#remove">remove</a></li>
1522
1523 <li data-name="LuCI.form.SectionValue#stripTags"><a href="LuCI.form.SectionValue.html#stripTags">stripTags</a></li>
1524
1525 <li data-name="LuCI.form.SectionValue#textvalue"><a href="LuCI.form.SectionValue.html#textvalue">textvalue</a></li>
1526
1527 <li data-name="LuCI.form.SectionValue#titleFn"><a href="LuCI.form.SectionValue.html#titleFn">titleFn</a></li>
1528
1529 <li data-name="LuCI.form.SectionValue#value"><a href="LuCI.form.SectionValue.html#value">value</a></li>
1530
1531 <li data-name="LuCI.form.SectionValue#write"><a href="LuCI.form.SectionValue.html#write">write</a></li>
1532
1533 </ul>
1534 <ul class="events itemMembers">
1535
1536 </ul>
1537 </li>
1538
1539 <li class="item" data-name="LuCI.form.TableSection">
1540 <span class="title">
1541 <a href="LuCI.form.TableSection.html">LuCI.form.TableSection</a>
1542
1543 </span>
1544 <ul class="members itemMembers">
1545
1546 <span class="subtitle">Members</span>
1547
1548 <li data-name="LuCI.form.TableSection##extedit"><a href="LuCI.form.TableSection.html#extedit">extedit</a></li>
1549
1550 <li data-name="LuCI.form.TableSection##max_cols"><a href="LuCI.form.TableSection.html#max_cols">max_cols</a></li>
1551
1552 <li data-name="LuCI.form.TableSection##modaltitle"><a href="LuCI.form.TableSection.html#modaltitle">modaltitle</a></li>
1553
1554 <li data-name="LuCI.form.TableSection##nodescriptions"><a href="LuCI.form.TableSection.html#nodescriptions">nodescriptions</a></li>
1555
1556 <li data-name="LuCI.form.TableSection##rowcolors"><a href="LuCI.form.TableSection.html#rowcolors">rowcolors</a></li>
1557
1558 <li data-name="LuCI.form.TableSection##sectiontitle"><a href="LuCI.form.TableSection.html#sectiontitle">sectiontitle</a></li>
1559
1560 <li data-name="LuCI.form.TableSection##sortable"><a href="LuCI.form.TableSection.html#sortable">sortable</a></li>
1561
1562 <li data-name="LuCI.form.TableSection#addbtntitle"><a href="LuCI.form.TableSection.html#addbtntitle">addbtntitle</a></li>
1563
1564 <li data-name="LuCI.form.TableSection#addremove"><a href="LuCI.form.TableSection.html#addremove">addremove</a></li>
1565
1566 <li data-name="LuCI.form.TableSection#anonymous"><a href="LuCI.form.TableSection.html#anonymous">anonymous</a></li>
1567
1568 <li data-name="LuCI.form.TableSection#parentoption"><a href="LuCI.form.TableSection.html#parentoption">parentoption</a></li>
1569
1570 <li data-name="LuCI.form.TableSection#tabbed"><a href="LuCI.form.TableSection.html#tabbed">tabbed</a></li>
1571
1572 <li data-name="LuCI.form.TableSection#uciconfig"><a href="LuCI.form.TableSection.html#uciconfig">uciconfig</a></li>
1573
1574 </ul>
1575 <ul class="typedefs itemMembers">
1576
1577 </ul>
1578 <ul class="typedefs itemMembers">
1579
1580 </ul>
1581 <ul class="methods itemMembers">
1582
1583 <span class="subtitle">Methods</span>
1584
1585 <li data-name="LuCI.form.TableSection#addModalOptions"><a href="LuCI.form.TableSection.html#addModalOptions">addModalOptions</a></li>
1586
1587 <li data-name="LuCI.form.TableSection#append"><a href="LuCI.form.TableSection.html#append">append</a></li>
1588
1589 <li data-name="LuCI.form.TableSection#cfgvalue"><a href="LuCI.form.TableSection.html#cfgvalue">cfgvalue</a></li>
1590
1591 <li data-name="LuCI.form.TableSection#filter"><a href="LuCI.form.TableSection.html#filter">filter</a></li>
1592
1593 <li data-name="LuCI.form.TableSection#formvalue"><a href="LuCI.form.TableSection.html#formvalue">formvalue</a></li>
1594
1595 <li data-name="LuCI.form.TableSection#getOption"><a href="LuCI.form.TableSection.html#getOption">getOption</a></li>
1596
1597 <li data-name="LuCI.form.TableSection#getUIElement"><a href="LuCI.form.TableSection.html#getUIElement">getUIElement</a></li>
1598
1599 <li data-name="LuCI.form.TableSection#load"><a href="LuCI.form.TableSection.html#load">load</a></li>
1600
1601 <li data-name="LuCI.form.TableSection#option"><a href="LuCI.form.TableSection.html#option">option</a></li>
1602
1603 <li data-name="LuCI.form.TableSection#parse"><a href="LuCI.form.TableSection.html#parse">parse</a></li>
1604
1605 <li data-name="LuCI.form.TableSection#stripTags"><a href="LuCI.form.TableSection.html#stripTags">stripTags</a></li>
1606
1607 <li data-name="LuCI.form.TableSection#tab"><a href="LuCI.form.TableSection.html#tab">tab</a></li>
1608
1609 <li data-name="LuCI.form.TableSection#taboption"><a href="LuCI.form.TableSection.html#taboption">taboption</a></li>
1610
1611 <li data-name="LuCI.form.TableSection#titleFn"><a href="LuCI.form.TableSection.html#titleFn">titleFn</a></li>
1612
1613 </ul>
1614 <ul class="events itemMembers">
1615
1616 </ul>
1617 </li>
1618
1619 <li class="item" data-name="LuCI.form.TextValue">
1620 <span class="title">
1621 <a href="LuCI.form.TextValue.html">LuCI.form.TextValue</a>
1622
1623 </span>
1624 <ul class="members itemMembers">
1625
1626 <span class="subtitle">Members</span>
1627
1628 <li data-name="LuCI.form.TextValue##cols"><a href="LuCI.form.TextValue.html#cols">cols</a></li>
1629
1630 <li data-name="LuCI.form.TextValue##monospace"><a href="LuCI.form.TextValue.html#monospace">monospace</a></li>
1631
1632 <li data-name="LuCI.form.TextValue##rows"><a href="LuCI.form.TextValue.html#rows">rows</a></li>
1633
1634 <li data-name="LuCI.form.TextValue##wrap"><a href="LuCI.form.TextValue.html#wrap">wrap</a></li>
1635
1636 <li data-name="LuCI.form.TextValue#datatype"><a href="LuCI.form.TextValue.html#datatype">datatype</a></li>
1637
1638 <li data-name="LuCI.form.TextValue#default"><a href="LuCI.form.TextValue.html#default">default</a></li>
1639
1640 <li data-name="LuCI.form.TextValue#editable"><a href="LuCI.form.TextValue.html#editable">editable</a></li>
1641
1642 <li data-name="LuCI.form.TextValue#modalonly"><a href="LuCI.form.TextValue.html#modalonly">modalonly</a></li>
1643
1644 <li data-name="LuCI.form.TextValue#onchange"><a href="LuCI.form.TextValue.html#onchange">onchange</a></li>
1645
1646 <li data-name="LuCI.form.TextValue#optional"><a href="LuCI.form.TextValue.html#optional">optional</a></li>
1647
1648 <li data-name="LuCI.form.TextValue#password"><a href="LuCI.form.TextValue.html#password">password</a></li>
1649
1650 <li data-name="LuCI.form.TextValue#placeholder"><a href="LuCI.form.TextValue.html#placeholder">placeholder</a></li>
1651
1652 <li data-name="LuCI.form.TextValue#readonly"><a href="LuCI.form.TextValue.html#readonly">readonly</a></li>
1653
1654 <li data-name="LuCI.form.TextValue#retain"><a href="LuCI.form.TextValue.html#retain">retain</a></li>
1655
1656 <li data-name="LuCI.form.TextValue#rmempty"><a href="LuCI.form.TextValue.html#rmempty">rmempty</a></li>
1657
1658 <li data-name="LuCI.form.TextValue#uciconfig"><a href="LuCI.form.TextValue.html#uciconfig">uciconfig</a></li>
1659
1660 <li data-name="LuCI.form.TextValue#ucioption"><a href="LuCI.form.TextValue.html#ucioption">ucioption</a></li>
1661
1662 <li data-name="LuCI.form.TextValue#ucisection"><a href="LuCI.form.TextValue.html#ucisection">ucisection</a></li>
1663
1664 <li data-name="LuCI.form.TextValue#validate"><a href="LuCI.form.TextValue.html#validate">validate</a></li>
1665
1666 <li data-name="LuCI.form.TextValue#width"><a href="LuCI.form.TextValue.html#width">width</a></li>
1667
1668 </ul>
1669 <ul class="typedefs itemMembers">
1670
1671 </ul>
1672 <ul class="typedefs itemMembers">
1673
1674 </ul>
1675 <ul class="methods itemMembers">
1676
1677 <span class="subtitle">Methods</span>
1678
1679 <li data-name="LuCI.form.TextValue#append"><a href="LuCI.form.TextValue.html#append">append</a></li>
1680
1681 <li data-name="LuCI.form.TextValue#cbid"><a href="LuCI.form.TextValue.html#cbid">cbid</a></li>
1682
1683 <li data-name="LuCI.form.TextValue#cfgvalue"><a href="LuCI.form.TextValue.html#cfgvalue">cfgvalue</a></li>
1684
1685 <li data-name="LuCI.form.TextValue#depends"><a href="LuCI.form.TextValue.html#depends">depends</a></li>
1686
1687 <li data-name="LuCI.form.TextValue#formvalue"><a href="LuCI.form.TextValue.html#formvalue">formvalue</a></li>
1688
1689 <li data-name="LuCI.form.TextValue#getUIElement"><a href="LuCI.form.TextValue.html#getUIElement">getUIElement</a></li>
1690
1691 <li data-name="LuCI.form.TextValue#getValidationError"><a href="LuCI.form.TextValue.html#getValidationError">getValidationError</a></li>
1692
1693 <li data-name="LuCI.form.TextValue#isActive"><a href="LuCI.form.TextValue.html#isActive">isActive</a></li>
1694
1695 <li data-name="LuCI.form.TextValue#isValid"><a href="LuCI.form.TextValue.html#isValid">isValid</a></li>
1696
1697 <li data-name="LuCI.form.TextValue#load"><a href="LuCI.form.TextValue.html#load">load</a></li>
1698
1699 <li data-name="LuCI.form.TextValue#parse"><a href="LuCI.form.TextValue.html#parse">parse</a></li>
1700
1701 <li data-name="LuCI.form.TextValue#remove"><a href="LuCI.form.TextValue.html#remove">remove</a></li>
1702
1703 <li data-name="LuCI.form.TextValue#stripTags"><a href="LuCI.form.TextValue.html#stripTags">stripTags</a></li>
1704
1705 <li data-name="LuCI.form.TextValue#textvalue"><a href="LuCI.form.TextValue.html#textvalue">textvalue</a></li>
1706
1707 <li data-name="LuCI.form.TextValue#titleFn"><a href="LuCI.form.TextValue.html#titleFn">titleFn</a></li>
1708
1709 <li data-name="LuCI.form.TextValue#write"><a href="LuCI.form.TextValue.html#write">write</a></li>
1710
1711 </ul>
1712 <ul class="events itemMembers">
1713
1714 </ul>
1715 </li>
1716
1717 <li class="item" data-name="LuCI.form.TypedSection">
1718 <span class="title">
1719 <a href="LuCI.form.TypedSection.html">LuCI.form.TypedSection</a>
1720
1721 </span>
1722 <ul class="members itemMembers">
1723
1724 <span class="subtitle">Members</span>
1725
1726 <li data-name="LuCI.form.TypedSection##addbtntitle"><a href="LuCI.form.TypedSection.html#addbtntitle">addbtntitle</a></li>
1727
1728 <li data-name="LuCI.form.TypedSection##addremove"><a href="LuCI.form.TypedSection.html#addremove">addremove</a></li>
1729
1730 <li data-name="LuCI.form.TypedSection##anonymous"><a href="LuCI.form.TypedSection.html#anonymous">anonymous</a></li>
1731
1732 <li data-name="LuCI.form.TypedSection##tabbed"><a href="LuCI.form.TypedSection.html#tabbed">tabbed</a></li>
1733
1734 <li data-name="LuCI.form.TypedSection##uciconfig"><a href="LuCI.form.TypedSection.html#uciconfig">uciconfig</a></li>
1735
1736 <li data-name="LuCI.form.TypedSection#parentoption"><a href="LuCI.form.TypedSection.html#parentoption">parentoption</a></li>
1737
1738 </ul>
1739 <ul class="typedefs itemMembers">
1740
1741 </ul>
1742 <ul class="typedefs itemMembers">
1743
1744 </ul>
1745 <ul class="methods itemMembers">
1746
1747 <span class="subtitle">Methods</span>
1748
1749 <li data-name="LuCI.form.TypedSection#append"><a href="LuCI.form.TypedSection.html#append">append</a></li>
1750
1751 <li data-name="LuCI.form.TypedSection#cfgsections"><a href="LuCI.form.TypedSection.html#cfgsections">cfgsections</a></li>
1752
1753 <li data-name="LuCI.form.TypedSection#cfgvalue"><a href="LuCI.form.TypedSection.html#cfgvalue">cfgvalue</a></li>
1754
1755 <li data-name="LuCI.form.TypedSection#filter"><a href="LuCI.form.TypedSection.html#filter">filter</a></li>
1756
1757 <li data-name="LuCI.form.TypedSection#formvalue"><a href="LuCI.form.TypedSection.html#formvalue">formvalue</a></li>
1758
1759 <li data-name="LuCI.form.TypedSection#getOption"><a href="LuCI.form.TypedSection.html#getOption">getOption</a></li>
1760
1761 <li data-name="LuCI.form.TypedSection#getUIElement"><a href="LuCI.form.TypedSection.html#getUIElement">getUIElement</a></li>
1762
1763 <li data-name="LuCI.form.TypedSection#load"><a href="LuCI.form.TypedSection.html#load">load</a></li>
1764
1765 <li data-name="LuCI.form.TypedSection#option"><a href="LuCI.form.TypedSection.html#option">option</a></li>
1766
1767 <li data-name="LuCI.form.TypedSection#parse"><a href="LuCI.form.TypedSection.html#parse">parse</a></li>
1768
1769 <li data-name="LuCI.form.TypedSection#render"><a href="LuCI.form.TypedSection.html#render">render</a></li>
1770
1771 <li data-name="LuCI.form.TypedSection#stripTags"><a href="LuCI.form.TypedSection.html#stripTags">stripTags</a></li>
1772
1773 <li data-name="LuCI.form.TypedSection#tab"><a href="LuCI.form.TypedSection.html#tab">tab</a></li>
1774
1775 <li data-name="LuCI.form.TypedSection#taboption"><a href="LuCI.form.TypedSection.html#taboption">taboption</a></li>
1776
1777 <li data-name="LuCI.form.TypedSection#titleFn"><a href="LuCI.form.TypedSection.html#titleFn">titleFn</a></li>
1778
1779 </ul>
1780 <ul class="events itemMembers">
1781
1782 </ul>
1783 </li>
1784
1785 <li class="item" data-name="LuCI.form.Value">
1786 <span class="title">
1787 <a href="LuCI.form.Value.html">LuCI.form.Value</a>
1788
1789 </span>
1790 <ul class="members itemMembers">
1791
1792 <span class="subtitle">Members</span>
1793
1794 <li data-name="LuCI.form.Value##password"><a href="LuCI.form.Value.html#password">password</a></li>
1795
1796 <li data-name="LuCI.form.Value##placeholder"><a href="LuCI.form.Value.html#placeholder">placeholder</a></li>
1797
1798 <li data-name="LuCI.form.Value#datatype"><a href="LuCI.form.Value.html#datatype">datatype</a></li>
1799
1800 <li data-name="LuCI.form.Value#default"><a href="LuCI.form.Value.html#default">default</a></li>
1801
1802 <li data-name="LuCI.form.Value#editable"><a href="LuCI.form.Value.html#editable">editable</a></li>
1803
1804 <li data-name="LuCI.form.Value#modalonly"><a href="LuCI.form.Value.html#modalonly">modalonly</a></li>
1805
1806 <li data-name="LuCI.form.Value#onchange"><a href="LuCI.form.Value.html#onchange">onchange</a></li>
1807
1808 <li data-name="LuCI.form.Value#optional"><a href="LuCI.form.Value.html#optional">optional</a></li>
1809
1810 <li data-name="LuCI.form.Value#readonly"><a href="LuCI.form.Value.html#readonly">readonly</a></li>
1811
1812 <li data-name="LuCI.form.Value#retain"><a href="LuCI.form.Value.html#retain">retain</a></li>
1813
1814 <li data-name="LuCI.form.Value#rmempty"><a href="LuCI.form.Value.html#rmempty">rmempty</a></li>
1815
1816 <li data-name="LuCI.form.Value#uciconfig"><a href="LuCI.form.Value.html#uciconfig">uciconfig</a></li>
1817
1818 <li data-name="LuCI.form.Value#ucioption"><a href="LuCI.form.Value.html#ucioption">ucioption</a></li>
1819
1820 <li data-name="LuCI.form.Value#ucisection"><a href="LuCI.form.Value.html#ucisection">ucisection</a></li>
1821
1822 <li data-name="LuCI.form.Value#validate"><a href="LuCI.form.Value.html#validate">validate</a></li>
1823
1824 <li data-name="LuCI.form.Value#width"><a href="LuCI.form.Value.html#width">width</a></li>
1825
1826 </ul>
1827 <ul class="typedefs itemMembers">
1828
1829 </ul>
1830 <ul class="typedefs itemMembers">
1831
1832 </ul>
1833 <ul class="methods itemMembers">
1834
1835 <span class="subtitle">Methods</span>
1836
1837 <li data-name="LuCI.form.Value#append"><a href="LuCI.form.Value.html#append">append</a></li>
1838
1839 <li data-name="LuCI.form.Value#cbid"><a href="LuCI.form.Value.html#cbid">cbid</a></li>
1840
1841 <li data-name="LuCI.form.Value#cfgvalue"><a href="LuCI.form.Value.html#cfgvalue">cfgvalue</a></li>
1842
1843 <li data-name="LuCI.form.Value#depends"><a href="LuCI.form.Value.html#depends">depends</a></li>
1844
1845 <li data-name="LuCI.form.Value#formvalue"><a href="LuCI.form.Value.html#formvalue">formvalue</a></li>
1846
1847 <li data-name="LuCI.form.Value#getUIElement"><a href="LuCI.form.Value.html#getUIElement">getUIElement</a></li>
1848
1849 <li data-name="LuCI.form.Value#getValidationError"><a href="LuCI.form.Value.html#getValidationError">getValidationError</a></li>
1850
1851 <li data-name="LuCI.form.Value#isActive"><a href="LuCI.form.Value.html#isActive">isActive</a></li>
1852
1853 <li data-name="LuCI.form.Value#isValid"><a href="LuCI.form.Value.html#isValid">isValid</a></li>
1854
1855 <li data-name="LuCI.form.Value#load"><a href="LuCI.form.Value.html#load">load</a></li>
1856
1857 <li data-name="LuCI.form.Value#parse"><a href="LuCI.form.Value.html#parse">parse</a></li>
1858
1859 <li data-name="LuCI.form.Value#remove"><a href="LuCI.form.Value.html#remove">remove</a></li>
1860
1861 <li data-name="LuCI.form.Value#render"><a href="LuCI.form.Value.html#render">render</a></li>
1862
1863 <li data-name="LuCI.form.Value#stripTags"><a href="LuCI.form.Value.html#stripTags">stripTags</a></li>
1864
1865 <li data-name="LuCI.form.Value#textvalue"><a href="LuCI.form.Value.html#textvalue">textvalue</a></li>
1866
1867 <li data-name="LuCI.form.Value#titleFn"><a href="LuCI.form.Value.html#titleFn">titleFn</a></li>
1868
1869 <li data-name="LuCI.form.Value#value"><a href="LuCI.form.Value.html#value">value</a></li>
1870
1871 <li data-name="LuCI.form.Value#write"><a href="LuCI.form.Value.html#write">write</a></li>
1872
1873 </ul>
1874 <ul class="events itemMembers">
1875
1876 </ul>
1877 </li>
1878
1879 <li class="item" data-name="LuCI.fs">
1880 <span class="title">
1881 <a href="LuCI.fs.html">LuCI.fs</a>
1882
1883 </span>
1884 <ul class="members itemMembers">
1885
1886 </ul>
1887 <ul class="typedefs itemMembers">
1888
1889 <span class="subtitle">Typedefs</span>
1890
1891 <li data-name="LuCI.fs.FileExecResult"><a href="LuCI.fs.html#.FileExecResult">FileExecResult</a></li>
1892
1893 <li data-name="LuCI.fs.FileStatEntry"><a href="LuCI.fs.html#.FileStatEntry">FileStatEntry</a></li>
1894
1895 </ul>
1896 <ul class="typedefs itemMembers">
1897
1898 </ul>
1899 <ul class="methods itemMembers">
1900
1901 <span class="subtitle">Methods</span>
1902
1903 <li data-name="LuCI.fs#exec"><a href="LuCI.fs.html#exec">exec</a></li>
1904
1905 <li data-name="LuCI.fs#exec_direct"><a href="LuCI.fs.html#exec_direct">exec_direct</a></li>
1906
1907 <li data-name="LuCI.fs#lines"><a href="LuCI.fs.html#lines">lines</a></li>
1908
1909 <li data-name="LuCI.fs#list"><a href="LuCI.fs.html#list">list</a></li>
1910
1911 <li data-name="LuCI.fs#read"><a href="LuCI.fs.html#read">read</a></li>
1912
1913 <li data-name="LuCI.fs#read_direct"><a href="LuCI.fs.html#read_direct">read_direct</a></li>
1914
1915 <li data-name="LuCI.fs#remove"><a href="LuCI.fs.html#remove">remove</a></li>
1916
1917 <li data-name="LuCI.fs#stat"><a href="LuCI.fs.html#stat">stat</a></li>
1918
1919 <li data-name="LuCI.fs#trimmed"><a href="LuCI.fs.html#trimmed">trimmed</a></li>
1920
1921 <li data-name="LuCI.fs#write"><a href="LuCI.fs.html#write">write</a></li>
1922
1923 </ul>
1924 <ul class="events itemMembers">
1925
1926 </ul>
1927 </li>
1928
1929 <li class="item" data-name="LuCI.headers">
1930 <span class="title">
1931 <a href="LuCI.headers.html">LuCI.headers</a>
1932
1933 </span>
1934 <ul class="members itemMembers">
1935
1936 </ul>
1937 <ul class="typedefs itemMembers">
1938
1939 </ul>
1940 <ul class="typedefs itemMembers">
1941
1942 </ul>
1943 <ul class="methods itemMembers">
1944
1945 <span class="subtitle">Methods</span>
1946
1947 <li data-name="LuCI.headers#get"><a href="LuCI.headers.html#get">get</a></li>
1948
1949 <li data-name="LuCI.headers#has"><a href="LuCI.headers.html#has">has</a></li>
1950
1951 </ul>
1952 <ul class="events itemMembers">
1953
1954 </ul>
1955 </li>
1956
1957 <li class="item" data-name="LuCI.network">
1958 <span class="title">
1959 <a href="LuCI.network.html">LuCI.network</a>
1960
1961 </span>
1962 <ul class="members itemMembers">
1963
1964 </ul>
1965 <ul class="typedefs itemMembers">
1966
1967 <span class="subtitle">Typedefs</span>
1968
1969 <li data-name="LuCI.network.SwitchTopology"><a href="LuCI.network.html#.SwitchTopology">SwitchTopology</a></li>
1970
1971 <li data-name="LuCI.network.WifiEncryption"><a href="LuCI.network.html#.WifiEncryption">WifiEncryption</a></li>
1972
1973 <li data-name="LuCI.network.WifiPeerEntry"><a href="LuCI.network.html#.WifiPeerEntry">WifiPeerEntry</a></li>
1974
1975 <li data-name="LuCI.network.WifiRateEntry"><a href="LuCI.network.html#.WifiRateEntry">WifiRateEntry</a></li>
1976
1977 <li data-name="LuCI.network.WifiScanResult"><a href="LuCI.network.html#.WifiScanResult">WifiScanResult</a></li>
1978
1979 </ul>
1980 <ul class="typedefs itemMembers">
1981
1982 </ul>
1983 <ul class="methods itemMembers">
1984
1985 <span class="subtitle">Methods</span>
1986
1987 <li data-name="LuCI.network#addNetwork"><a href="LuCI.network.html#addNetwork">addNetwork</a></li>
1988
1989 <li data-name="LuCI.network#addWifiNetwork"><a href="LuCI.network.html#addWifiNetwork">addWifiNetwork</a></li>
1990
1991 <li data-name="LuCI.network#deleteNetwork"><a href="LuCI.network.html#deleteNetwork">deleteNetwork</a></li>
1992
1993 <li data-name="LuCI.network#deleteWifiNetwork"><a href="LuCI.network.html#deleteWifiNetwork">deleteWifiNetwork</a></li>
1994
1995 <li data-name="LuCI.network#flushCache"><a href="LuCI.network.html#flushCache">flushCache</a></li>
1996
1997 <li data-name="LuCI.network#formatWifiEncryption"><a href="LuCI.network.html#formatWifiEncryption">formatWifiEncryption</a></li>
1998
1999 <li data-name="LuCI.network#getDevice"><a href="LuCI.network.html#getDevice">getDevice</a></li>
2000
2001 <li data-name="LuCI.network#getDevices"><a href="LuCI.network.html#getDevices">getDevices</a></li>
2002
2003 <li data-name="LuCI.network#getDSLModemType"><a href="LuCI.network.html#getDSLModemType">getDSLModemType</a></li>
2004
2005 <li data-name="LuCI.network#getHostHints"><a href="LuCI.network.html#getHostHints">getHostHints</a></li>
2006
2007 <li data-name="LuCI.network#getIfnameOf"><a href="LuCI.network.html#getIfnameOf">getIfnameOf</a></li>
2008
2009 <li data-name="LuCI.network#getNetwork"><a href="LuCI.network.html#getNetwork">getNetwork</a></li>
2010
2011 <li data-name="LuCI.network#getNetworks"><a href="LuCI.network.html#getNetworks">getNetworks</a></li>
2012
2013 <li data-name="LuCI.network#getProtocol"><a href="LuCI.network.html#getProtocol">getProtocol</a></li>
2014
2015 <li data-name="LuCI.network#getProtocols"><a href="LuCI.network.html#getProtocols">getProtocols</a></li>
2016
2017 <li data-name="LuCI.network#getSwitchTopologies"><a href="LuCI.network.html#getSwitchTopologies">getSwitchTopologies</a></li>
2018
2019 <li data-name="LuCI.network#getWAN6Networks"><a href="LuCI.network.html#getWAN6Networks">getWAN6Networks</a></li>
2020
2021 <li data-name="LuCI.network#getWANNetworks"><a href="LuCI.network.html#getWANNetworks">getWANNetworks</a></li>
2022
2023 <li data-name="LuCI.network#getWifiDevice"><a href="LuCI.network.html#getWifiDevice">getWifiDevice</a></li>
2024
2025 <li data-name="LuCI.network#getWifiDevices"><a href="LuCI.network.html#getWifiDevices">getWifiDevices</a></li>
2026
2027 <li data-name="LuCI.network#getWifiNetwork"><a href="LuCI.network.html#getWifiNetwork">getWifiNetwork</a></li>
2028
2029 <li data-name="LuCI.network#getWifiNetworks"><a href="LuCI.network.html#getWifiNetworks">getWifiNetworks</a></li>
2030
2031 <li data-name="LuCI.network#isIgnoredDevice"><a href="LuCI.network.html#isIgnoredDevice">isIgnoredDevice</a></li>
2032
2033 <li data-name="LuCI.network#maskToPrefix"><a href="LuCI.network.html#maskToPrefix">maskToPrefix</a></li>
2034
2035 <li data-name="LuCI.network#prefixToMask"><a href="LuCI.network.html#prefixToMask">prefixToMask</a></li>
2036
2037 <li data-name="LuCI.network#registerErrorCode"><a href="LuCI.network.html#registerErrorCode">registerErrorCode</a></li>
2038
2039 <li data-name="LuCI.network#registerPatternVirtual"><a href="LuCI.network.html#registerPatternVirtual">registerPatternVirtual</a></li>
2040
2041 <li data-name="LuCI.network#registerProtocol"><a href="LuCI.network.html#registerProtocol">registerProtocol</a></li>
2042
2043 <li data-name="LuCI.network#renameNetwork"><a href="LuCI.network.html#renameNetwork">renameNetwork</a></li>
2044
2045 </ul>
2046 <ul class="events itemMembers">
2047
2048 </ul>
2049 </li>
2050
2051 <li class="item" data-name="LuCI.network.Device">
2052 <span class="title">
2053 <a href="LuCI.network.Device.html">LuCI.network.Device</a>
2054
2055 </span>
2056 <ul class="members itemMembers">
2057
2058 </ul>
2059 <ul class="typedefs itemMembers">
2060
2061 </ul>
2062 <ul class="typedefs itemMembers">
2063
2064 </ul>
2065 <ul class="methods itemMembers">
2066
2067 <span class="subtitle">Methods</span>
2068
2069 <li data-name="LuCI.network.Device#getBridgeID"><a href="LuCI.network.Device.html#getBridgeID">getBridgeID</a></li>
2070
2071 <li data-name="LuCI.network.Device#getBridgeSTP"><a href="LuCI.network.Device.html#getBridgeSTP">getBridgeSTP</a></li>
2072
2073 <li data-name="LuCI.network.Device#getCarrier"><a href="LuCI.network.Device.html#getCarrier">getCarrier</a></li>
2074
2075 <li data-name="LuCI.network.Device#getDuplex"><a href="LuCI.network.Device.html#getDuplex">getDuplex</a></li>
2076
2077 <li data-name="LuCI.network.Device#getI18n"><a href="LuCI.network.Device.html#getI18n">getI18n</a></li>
2078
2079 <li data-name="LuCI.network.Device#getIP6Addrs"><a href="LuCI.network.Device.html#getIP6Addrs">getIP6Addrs</a></li>
2080
2081 <li data-name="LuCI.network.Device#getIPAddrs"><a href="LuCI.network.Device.html#getIPAddrs">getIPAddrs</a></li>
2082
2083 <li data-name="LuCI.network.Device#getMAC"><a href="LuCI.network.Device.html#getMAC">getMAC</a></li>
2084
2085 <li data-name="LuCI.network.Device#getMTU"><a href="LuCI.network.Device.html#getMTU">getMTU</a></li>
2086
2087 <li data-name="LuCI.network.Device#getName"><a href="LuCI.network.Device.html#getName">getName</a></li>
2088
2089 <li data-name="LuCI.network.Device#getNetwork"><a href="LuCI.network.Device.html#getNetwork">getNetwork</a></li>
2090
2091 <li data-name="LuCI.network.Device#getNetworks"><a href="LuCI.network.Device.html#getNetworks">getNetworks</a></li>
2092
2093 <li data-name="LuCI.network.Device#getParent"><a href="LuCI.network.Device.html#getParent">getParent</a></li>
2094
2095 <li data-name="LuCI.network.Device#getPorts"><a href="LuCI.network.Device.html#getPorts">getPorts</a></li>
2096
2097 <li data-name="LuCI.network.Device#getRXBytes"><a href="LuCI.network.Device.html#getRXBytes">getRXBytes</a></li>
2098
2099 <li data-name="LuCI.network.Device#getRXPackets"><a href="LuCI.network.Device.html#getRXPackets">getRXPackets</a></li>
2100
2101 <li data-name="LuCI.network.Device#getShortName"><a href="LuCI.network.Device.html#getShortName">getShortName</a></li>
2102
2103 <li data-name="LuCI.network.Device#getSpeed"><a href="LuCI.network.Device.html#getSpeed">getSpeed</a></li>
2104
2105 <li data-name="LuCI.network.Device#getTXBytes"><a href="LuCI.network.Device.html#getTXBytes">getTXBytes</a></li>
2106
2107 <li data-name="LuCI.network.Device#getTXPackets"><a href="LuCI.network.Device.html#getTXPackets">getTXPackets</a></li>
2108
2109 <li data-name="LuCI.network.Device#getType"><a href="LuCI.network.Device.html#getType">getType</a></li>
2110
2111 <li data-name="LuCI.network.Device#getTypeI18n"><a href="LuCI.network.Device.html#getTypeI18n">getTypeI18n</a></li>
2112
2113 <li data-name="LuCI.network.Device#getWifiNetwork"><a href="LuCI.network.Device.html#getWifiNetwork">getWifiNetwork</a></li>
2114
2115 <li data-name="LuCI.network.Device#isBridge"><a href="LuCI.network.Device.html#isBridge">isBridge</a></li>
2116
2117 <li data-name="LuCI.network.Device#isBridgePort"><a href="LuCI.network.Device.html#isBridgePort">isBridgePort</a></li>
2118
2119 <li data-name="LuCI.network.Device#isUp"><a href="LuCI.network.Device.html#isUp">isUp</a></li>
2120
2121 </ul>
2122 <ul class="events itemMembers">
2123
2124 </ul>
2125 </li>
2126
2127 <li class="item" data-name="LuCI.network.Hosts">
2128 <span class="title">
2129 <a href="LuCI.network.Hosts.html">LuCI.network.Hosts</a>
2130
2131 </span>
2132 <ul class="members itemMembers">
2133
2134 </ul>
2135 <ul class="typedefs itemMembers">
2136
2137 </ul>
2138 <ul class="typedefs itemMembers">
2139
2140 </ul>
2141 <ul class="methods itemMembers">
2142
2143 <span class="subtitle">Methods</span>
2144
2145 <li data-name="LuCI.network.Hosts#getHostnameByIP6Addr"><a href="LuCI.network.Hosts.html#getHostnameByIP6Addr">getHostnameByIP6Addr</a></li>
2146
2147 <li data-name="LuCI.network.Hosts#getHostnameByIPAddr"><a href="LuCI.network.Hosts.html#getHostnameByIPAddr">getHostnameByIPAddr</a></li>
2148
2149 <li data-name="LuCI.network.Hosts#getHostnameByMACAddr"><a href="LuCI.network.Hosts.html#getHostnameByMACAddr">getHostnameByMACAddr</a></li>
2150
2151 <li data-name="LuCI.network.Hosts#getIP6AddrByMACAddr"><a href="LuCI.network.Hosts.html#getIP6AddrByMACAddr">getIP6AddrByMACAddr</a></li>
2152
2153 <li data-name="LuCI.network.Hosts#getIPAddrByMACAddr"><a href="LuCI.network.Hosts.html#getIPAddrByMACAddr">getIPAddrByMACAddr</a></li>
2154
2155 <li data-name="LuCI.network.Hosts#getMACAddrByIP6Addr"><a href="LuCI.network.Hosts.html#getMACAddrByIP6Addr">getMACAddrByIP6Addr</a></li>
2156
2157 <li data-name="LuCI.network.Hosts#getMACAddrByIPAddr"><a href="LuCI.network.Hosts.html#getMACAddrByIPAddr">getMACAddrByIPAddr</a></li>
2158
2159 <li data-name="LuCI.network.Hosts#getMACHints"><a href="LuCI.network.Hosts.html#getMACHints">getMACHints</a></li>
2160
2161 </ul>
2162 <ul class="events itemMembers">
2163
2164 </ul>
2165 </li>
2166
2167 <li class="item" data-name="LuCI.network.Protocol">
2168 <span class="title">
2169 <a href="LuCI.network.Protocol.html">LuCI.network.Protocol</a>
2170
2171 </span>
2172 <ul class="members itemMembers">
2173
2174 </ul>
2175 <ul class="typedefs itemMembers">
2176
2177 </ul>
2178 <ul class="typedefs itemMembers">
2179
2180 </ul>
2181 <ul class="methods itemMembers">
2182
2183 <span class="subtitle">Methods</span>
2184
2185 <li data-name="LuCI.network.Protocol#addDevice"><a href="LuCI.network.Protocol.html#addDevice">addDevice</a></li>
2186
2187 <li data-name="LuCI.network.Protocol#containsDevice"><a href="LuCI.network.Protocol.html#containsDevice">containsDevice</a></li>
2188
2189 <li data-name="LuCI.network.Protocol#deleteConfiguration"><a href="LuCI.network.Protocol.html#deleteConfiguration">deleteConfiguration</a></li>
2190
2191 <li data-name="LuCI.network.Protocol#deleteDevice"><a href="LuCI.network.Protocol.html#deleteDevice">deleteDevice</a></li>
2192
2193 <li data-name="LuCI.network.Protocol#get"><a href="LuCI.network.Protocol.html#get">get</a></li>
2194
2195 <li data-name="LuCI.network.Protocol#getDevice"><a href="LuCI.network.Protocol.html#getDevice">getDevice</a></li>
2196
2197 <li data-name="LuCI.network.Protocol#getDevices"><a href="LuCI.network.Protocol.html#getDevices">getDevices</a></li>
2198
2199 <li data-name="LuCI.network.Protocol#getDNS6Addrs"><a href="LuCI.network.Protocol.html#getDNS6Addrs">getDNS6Addrs</a></li>
2200
2201 <li data-name="LuCI.network.Protocol#getDNSAddrs"><a href="LuCI.network.Protocol.html#getDNSAddrs">getDNSAddrs</a></li>
2202
2203 <li data-name="LuCI.network.Protocol#getErrors"><a href="LuCI.network.Protocol.html#getErrors">getErrors</a></li>
2204
2205 <li data-name="LuCI.network.Protocol#getExpiry"><a href="LuCI.network.Protocol.html#getExpiry">getExpiry</a></li>
2206
2207 <li data-name="LuCI.network.Protocol#getGateway6Addr"><a href="LuCI.network.Protocol.html#getGateway6Addr">getGateway6Addr</a></li>
2208
2209 <li data-name="LuCI.network.Protocol#getGatewayAddr"><a href="LuCI.network.Protocol.html#getGatewayAddr">getGatewayAddr</a></li>
2210
2211 <li data-name="LuCI.network.Protocol#getI18n"><a href="LuCI.network.Protocol.html#getI18n">getI18n</a></li>
2212
2213 <li data-name="LuCI.network.Protocol#getIfname"><a href="LuCI.network.Protocol.html#getIfname">getIfname</a></li>
2214
2215 <li data-name="LuCI.network.Protocol#getIP6Addr"><a href="LuCI.network.Protocol.html#getIP6Addr">getIP6Addr</a></li>
2216
2217 <li data-name="LuCI.network.Protocol#getIP6Addrs"><a href="LuCI.network.Protocol.html#getIP6Addrs">getIP6Addrs</a></li>
2218
2219 <li data-name="LuCI.network.Protocol#getIP6Prefix"><a href="LuCI.network.Protocol.html#getIP6Prefix">getIP6Prefix</a></li>
2220
2221 <li data-name="LuCI.network.Protocol#getIPAddr"><a href="LuCI.network.Protocol.html#getIPAddr">getIPAddr</a></li>
2222
2223 <li data-name="LuCI.network.Protocol#getIPAddrs"><a href="LuCI.network.Protocol.html#getIPAddrs">getIPAddrs</a></li>
2224
2225 <li data-name="LuCI.network.Protocol#getL2Device"><a href="LuCI.network.Protocol.html#getL2Device">getL2Device</a></li>
2226
2227 <li data-name="LuCI.network.Protocol#getL3Device"><a href="LuCI.network.Protocol.html#getL3Device">getL3Device</a></li>
2228
2229 <li data-name="LuCI.network.Protocol#getMetric"><a href="LuCI.network.Protocol.html#getMetric">getMetric</a></li>
2230
2231 <li data-name="LuCI.network.Protocol#getName"><a href="LuCI.network.Protocol.html#getName">getName</a></li>
2232
2233 <li data-name="LuCI.network.Protocol#getNetmask"><a href="LuCI.network.Protocol.html#getNetmask">getNetmask</a></li>
2234
2235 <li data-name="LuCI.network.Protocol#getOpkgPackage"><a href="LuCI.network.Protocol.html#getOpkgPackage">getOpkgPackage</a></li>
2236
2237 <li data-name="LuCI.network.Protocol#getProtocol"><a href="LuCI.network.Protocol.html#getProtocol">getProtocol</a></li>
2238
2239 <li data-name="LuCI.network.Protocol#getType"><a href="LuCI.network.Protocol.html#getType">getType</a></li>
2240
2241 <li data-name="LuCI.network.Protocol#getUptime"><a href="LuCI.network.Protocol.html#getUptime">getUptime</a></li>
2242
2243 <li data-name="LuCI.network.Protocol#getZoneName"><a href="LuCI.network.Protocol.html#getZoneName">getZoneName</a></li>
2244
2245 <li data-name="LuCI.network.Protocol#isAlias"><a href="LuCI.network.Protocol.html#isAlias">isAlias</a></li>
2246
2247 <li data-name="LuCI.network.Protocol#isBridge"><a href="LuCI.network.Protocol.html#isBridge">isBridge</a></li>
2248
2249 <li data-name="LuCI.network.Protocol#isCreateable"><a href="LuCI.network.Protocol.html#isCreateable">isCreateable</a></li>
2250
2251 <li data-name="LuCI.network.Protocol#isDynamic"><a href="LuCI.network.Protocol.html#isDynamic">isDynamic</a></li>
2252
2253 <li data-name="LuCI.network.Protocol#isEmpty"><a href="LuCI.network.Protocol.html#isEmpty">isEmpty</a></li>
2254
2255 <li data-name="LuCI.network.Protocol#isFloating"><a href="LuCI.network.Protocol.html#isFloating">isFloating</a></li>
2256
2257 <li data-name="LuCI.network.Protocol#isInstalled"><a href="LuCI.network.Protocol.html#isInstalled">isInstalled</a></li>
2258
2259 <li data-name="LuCI.network.Protocol#isUp"><a href="LuCI.network.Protocol.html#isUp">isUp</a></li>
2260
2261 <li data-name="LuCI.network.Protocol#isVirtual"><a href="LuCI.network.Protocol.html#isVirtual">isVirtual</a></li>
2262
2263 <li data-name="LuCI.network.Protocol#set"><a href="LuCI.network.Protocol.html#set">set</a></li>
2264
2265 </ul>
2266 <ul class="events itemMembers">
2267
2268 </ul>
2269 </li>
2270
2271 <li class="item" data-name="LuCI.network.WifiDevice">
2272 <span class="title">
2273 <a href="LuCI.network.WifiDevice.html">LuCI.network.WifiDevice</a>
2274
2275 </span>
2276 <ul class="members itemMembers">
2277
2278 </ul>
2279 <ul class="typedefs itemMembers">
2280
2281 </ul>
2282 <ul class="typedefs itemMembers">
2283
2284 </ul>
2285 <ul class="methods itemMembers">
2286
2287 <span class="subtitle">Methods</span>
2288
2289 <li data-name="LuCI.network.WifiDevice#addWifiNetwork"><a href="LuCI.network.WifiDevice.html#addWifiNetwork">addWifiNetwork</a></li>
2290
2291 <li data-name="LuCI.network.WifiDevice#deleteWifiNetwork"><a href="LuCI.network.WifiDevice.html#deleteWifiNetwork">deleteWifiNetwork</a></li>
2292
2293 <li data-name="LuCI.network.WifiDevice#get"><a href="LuCI.network.WifiDevice.html#get">get</a></li>
2294
2295 <li data-name="LuCI.network.WifiDevice#getHTModes"><a href="LuCI.network.WifiDevice.html#getHTModes">getHTModes</a></li>
2296
2297 <li data-name="LuCI.network.WifiDevice#getHWModes"><a href="LuCI.network.WifiDevice.html#getHWModes">getHWModes</a></li>
2298
2299 <li data-name="LuCI.network.WifiDevice#getI18n"><a href="LuCI.network.WifiDevice.html#getI18n">getI18n</a></li>
2300
2301 <li data-name="LuCI.network.WifiDevice#getName"><a href="LuCI.network.WifiDevice.html#getName">getName</a></li>
2302
2303 <li data-name="LuCI.network.WifiDevice#getScanList"><a href="LuCI.network.WifiDevice.html#getScanList">getScanList</a></li>
2304
2305 <li data-name="LuCI.network.WifiDevice#getWifiNetwork"><a href="LuCI.network.WifiDevice.html#getWifiNetwork">getWifiNetwork</a></li>
2306
2307 <li data-name="LuCI.network.WifiDevice#getWifiNetworks"><a href="LuCI.network.WifiDevice.html#getWifiNetworks">getWifiNetworks</a></li>
2308
2309 <li data-name="LuCI.network.WifiDevice#isDisabled"><a href="LuCI.network.WifiDevice.html#isDisabled">isDisabled</a></li>
2310
2311 <li data-name="LuCI.network.WifiDevice#isUp"><a href="LuCI.network.WifiDevice.html#isUp">isUp</a></li>
2312
2313 <li data-name="LuCI.network.WifiDevice#set"><a href="LuCI.network.WifiDevice.html#set">set</a></li>
2314
2315 </ul>
2316 <ul class="events itemMembers">
2317
2318 </ul>
2319 </li>
2320
2321 <li class="item" data-name="LuCI.network.WifiNetwork">
2322 <span class="title">
2323 <a href="LuCI.network.WifiNetwork.html">LuCI.network.WifiNetwork</a>
2324
2325 </span>
2326 <ul class="members itemMembers">
2327
2328 </ul>
2329 <ul class="typedefs itemMembers">
2330
2331 </ul>
2332 <ul class="typedefs itemMembers">
2333
2334 </ul>
2335 <ul class="methods itemMembers">
2336
2337 <span class="subtitle">Methods</span>
2338
2339 <li data-name="LuCI.network.WifiNetwork#disconnectClient"><a href="LuCI.network.WifiNetwork.html#disconnectClient">disconnectClient</a></li>
2340
2341 <li data-name="LuCI.network.WifiNetwork#get"><a href="LuCI.network.WifiNetwork.html#get">get</a></li>
2342
2343 <li data-name="LuCI.network.WifiNetwork#getActiveBSSID"><a href="LuCI.network.WifiNetwork.html#getActiveBSSID">getActiveBSSID</a></li>
2344
2345 <li data-name="LuCI.network.WifiNetwork#getActiveEncryption"><a href="LuCI.network.WifiNetwork.html#getActiveEncryption">getActiveEncryption</a></li>
2346
2347 <li data-name="LuCI.network.WifiNetwork#getActiveMode"><a href="LuCI.network.WifiNetwork.html#getActiveMode">getActiveMode</a></li>
2348
2349 <li data-name="LuCI.network.WifiNetwork#getActiveModeI18n"><a href="LuCI.network.WifiNetwork.html#getActiveModeI18n">getActiveModeI18n</a></li>
2350
2351 <li data-name="LuCI.network.WifiNetwork#getActiveSSID"><a href="LuCI.network.WifiNetwork.html#getActiveSSID">getActiveSSID</a></li>
2352
2353 <li data-name="LuCI.network.WifiNetwork#getAssocList"><a href="LuCI.network.WifiNetwork.html#getAssocList">getAssocList</a></li>
2354
2355 <li data-name="LuCI.network.WifiNetwork#getBitRate"><a href="LuCI.network.WifiNetwork.html#getBitRate">getBitRate</a></li>
2356
2357 <li data-name="LuCI.network.WifiNetwork#getBSSID"><a href="LuCI.network.WifiNetwork.html#getBSSID">getBSSID</a></li>
2358
2359 <li data-name="LuCI.network.WifiNetwork#getChannel"><a href="LuCI.network.WifiNetwork.html#getChannel">getChannel</a></li>
2360
2361 <li data-name="LuCI.network.WifiNetwork#getCountryCode"><a href="LuCI.network.WifiNetwork.html#getCountryCode">getCountryCode</a></li>
2362
2363 <li data-name="LuCI.network.WifiNetwork#getDevice"><a href="LuCI.network.WifiNetwork.html#getDevice">getDevice</a></li>
2364
2365 <li data-name="LuCI.network.WifiNetwork#getFrequency"><a href="LuCI.network.WifiNetwork.html#getFrequency">getFrequency</a></li>
2366
2367 <li data-name="LuCI.network.WifiNetwork#getI18n"><a href="LuCI.network.WifiNetwork.html#getI18n">getI18n</a></li>
2368
2369 <li data-name="LuCI.network.WifiNetwork#getID"><a href="LuCI.network.WifiNetwork.html#getID">getID</a></li>
2370
2371 <li data-name="LuCI.network.WifiNetwork#getIfname"><a href="LuCI.network.WifiNetwork.html#getIfname">getIfname</a></li>
2372
2373 <li data-name="LuCI.network.WifiNetwork#getMeshID"><a href="LuCI.network.WifiNetwork.html#getMeshID">getMeshID</a></li>
2374
2375 <li data-name="LuCI.network.WifiNetwork#getMode"><a href="LuCI.network.WifiNetwork.html#getMode">getMode</a></li>
2376
2377 <li data-name="LuCI.network.WifiNetwork#getName"><a href="LuCI.network.WifiNetwork.html#getName">getName</a></li>
2378
2379 <li data-name="LuCI.network.WifiNetwork#getNetwork"><a href="LuCI.network.WifiNetwork.html#getNetwork">getNetwork</a></li>
2380
2381 <li data-name="LuCI.network.WifiNetwork#getNetworkNames"><a href="LuCI.network.WifiNetwork.html#getNetworkNames">getNetworkNames</a></li>
2382
2383 <li data-name="LuCI.network.WifiNetwork#getNetworks"><a href="LuCI.network.WifiNetwork.html#getNetworks">getNetworks</a></li>
2384
2385 <li data-name="LuCI.network.WifiNetwork#getNoise"><a href="LuCI.network.WifiNetwork.html#getNoise">getNoise</a></li>
2386
2387 <li data-name="LuCI.network.WifiNetwork#getShortName"><a href="LuCI.network.WifiNetwork.html#getShortName">getShortName</a></li>
2388
2389 <li data-name="LuCI.network.WifiNetwork#getSignal"><a href="LuCI.network.WifiNetwork.html#getSignal">getSignal</a></li>
2390
2391 <li data-name="LuCI.network.WifiNetwork#getSignalLevel"><a href="LuCI.network.WifiNetwork.html#getSignalLevel">getSignalLevel</a></li>
2392
2393 <li data-name="LuCI.network.WifiNetwork#getSignalPercent"><a href="LuCI.network.WifiNetwork.html#getSignalPercent">getSignalPercent</a></li>
2394
2395 <li data-name="LuCI.network.WifiNetwork#getSSID"><a href="LuCI.network.WifiNetwork.html#getSSID">getSSID</a></li>
2396
2397 <li data-name="LuCI.network.WifiNetwork#getTXPower"><a href="LuCI.network.WifiNetwork.html#getTXPower">getTXPower</a></li>
2398
2399 <li data-name="LuCI.network.WifiNetwork#getTXPowerOffset"><a href="LuCI.network.WifiNetwork.html#getTXPowerOffset">getTXPowerOffset</a></li>
2400
2401 <li data-name="LuCI.network.WifiNetwork#getVlanIfnames"><a href="LuCI.network.WifiNetwork.html#getVlanIfnames">getVlanIfnames</a></li>
2402
2403 <li data-name="LuCI.network.WifiNetwork#getWifiDevice"><a href="LuCI.network.WifiNetwork.html#getWifiDevice">getWifiDevice</a></li>
2404
2405 <li data-name="LuCI.network.WifiNetwork#getWifiDeviceName"><a href="LuCI.network.WifiNetwork.html#getWifiDeviceName">getWifiDeviceName</a></li>
2406
2407 <li data-name="LuCI.network.WifiNetwork#isClientDisconnectSupported"><a href="LuCI.network.WifiNetwork.html#isClientDisconnectSupported">isClientDisconnectSupported</a></li>
2408
2409 <li data-name="LuCI.network.WifiNetwork#isDisabled"><a href="LuCI.network.WifiNetwork.html#isDisabled">isDisabled</a></li>
2410
2411 <li data-name="LuCI.network.WifiNetwork#isUp"><a href="LuCI.network.WifiNetwork.html#isUp">isUp</a></li>
2412
2413 <li data-name="LuCI.network.WifiNetwork#set"><a href="LuCI.network.WifiNetwork.html#set">set</a></li>
2414
2415 </ul>
2416 <ul class="events itemMembers">
2417
2418 </ul>
2419 </li>
2420
2421 <li class="item" data-name="LuCI.poll">
2422 <span class="title">
2423 <a href="LuCI.poll.html">LuCI.poll</a>
2424
2425 </span>
2426 <ul class="members itemMembers">
2427
2428 </ul>
2429 <ul class="typedefs itemMembers">
2430
2431 </ul>
2432 <ul class="typedefs itemMembers">
2433
2434 </ul>
2435 <ul class="methods itemMembers">
2436
2437 <span class="subtitle">Methods</span>
2438
2439 <li data-name="LuCI.poll#active"><a href="LuCI.poll.html#active">active</a></li>
2440
2441 <li data-name="LuCI.poll#add"><a href="LuCI.poll.html#add">add</a></li>
2442
2443 <li data-name="LuCI.poll#remove"><a href="LuCI.poll.html#remove">remove</a></li>
2444
2445 <li data-name="LuCI.poll#start"><a href="LuCI.poll.html#start">start</a></li>
2446
2447 <li data-name="LuCI.poll#stop"><a href="LuCI.poll.html#stop">stop</a></li>
2448
2449 </ul>
2450 <ul class="events itemMembers">
2451
2452 </ul>
2453 </li>
2454
2455 <li class="item" data-name="LuCI.request">
2456 <span class="title">
2457 <a href="LuCI.request.html">LuCI.request</a>
2458
2459 </span>
2460 <ul class="members itemMembers">
2461
2462 </ul>
2463 <ul class="typedefs itemMembers">
2464
2465 <span class="subtitle">Typedefs</span>
2466
2467 <li data-name="LuCI.request.interceptorFn"><a href="LuCI.request.html#.interceptorFn">interceptorFn</a></li>
2468
2469 <li data-name="LuCI.request.RequestOptions"><a href="LuCI.request.html#.RequestOptions">RequestOptions</a></li>
2470
2471 </ul>
2472 <ul class="typedefs itemMembers">
2473
2474 </ul>
2475 <ul class="methods itemMembers">
2476
2477 <span class="subtitle">Methods</span>
2478
2479 <li data-name="LuCI.request#addInterceptor"><a href="LuCI.request.html#addInterceptor">addInterceptor</a></li>
2480
2481 <li data-name="LuCI.request#expandURL"><a href="LuCI.request.html#expandURL">expandURL</a></li>
2482
2483 <li data-name="LuCI.request#get"><a href="LuCI.request.html#get">get</a></li>
2484
2485 <li data-name="LuCI.request#post"><a href="LuCI.request.html#post">post</a></li>
2486
2487 <li data-name="LuCI.request#removeInterceptor"><a href="LuCI.request.html#removeInterceptor">removeInterceptor</a></li>
2488
2489 <li data-name="LuCI.request#request"><a href="LuCI.request.html#request">request</a></li>
2490
2491 </ul>
2492 <ul class="events itemMembers">
2493
2494 </ul>
2495 </li>
2496
2497 <li class="item" data-name="LuCI.request.poll">
2498 <span class="title">
2499 <a href="LuCI.request.poll.html">LuCI.request.poll</a>
2500
2501 </span>
2502 <ul class="members itemMembers">
2503
2504 </ul>
2505 <ul class="typedefs itemMembers">
2506
2507 <span class="subtitle">Typedefs</span>
2508
2509 <li data-name="LuCI.request.poll~callbackFn"><a href="LuCI.request.poll.html#~callbackFn">callbackFn</a></li>
2510
2511 </ul>
2512 <ul class="typedefs itemMembers">
2513
2514 </ul>
2515 <ul class="methods itemMembers">
2516
2517 <span class="subtitle">Methods</span>
2518
2519 <li data-name="LuCI.request.poll#active"><a href="LuCI.request.poll.html#active">active</a></li>
2520
2521 <li data-name="LuCI.request.poll#add"><a href="LuCI.request.poll.html#add">add</a></li>
2522
2523 <li data-name="LuCI.request.poll#remove"><a href="LuCI.request.poll.html#remove">remove</a></li>
2524
2525 <li data-name="LuCI.request.poll#start"><a href="LuCI.request.poll.html#start">start</a></li>
2526
2527 <li data-name="LuCI.request.poll#stop"><a href="LuCI.request.poll.html#stop">stop</a></li>
2528
2529 </ul>
2530 <ul class="events itemMembers">
2531
2532 </ul>
2533 </li>
2534
2535 <li class="item" data-name="LuCI.response">
2536 <span class="title">
2537 <a href="LuCI.response.html">LuCI.response</a>
2538
2539 </span>
2540 <ul class="members itemMembers">
2541
2542 <span class="subtitle">Members</span>
2543
2544 <li data-name="LuCI.response#duration"><a href="LuCI.response.html#duration">duration</a></li>
2545
2546 <li data-name="LuCI.response#headers"><a href="LuCI.response.html#headers">headers</a></li>
2547
2548 <li data-name="LuCI.response#ok"><a href="LuCI.response.html#ok">ok</a></li>
2549
2550 <li data-name="LuCI.response#status"><a href="LuCI.response.html#status">status</a></li>
2551
2552 <li data-name="LuCI.response#statusText"><a href="LuCI.response.html#statusText">statusText</a></li>
2553
2554 <li data-name="LuCI.response#url"><a href="LuCI.response.html#url">url</a></li>
2555
2556 </ul>
2557 <ul class="typedefs itemMembers">
2558
2559 </ul>
2560 <ul class="typedefs itemMembers">
2561
2562 </ul>
2563 <ul class="methods itemMembers">
2564
2565 <span class="subtitle">Methods</span>
2566
2567 <li data-name="LuCI.response#blob"><a href="LuCI.response.html#blob">blob</a></li>
2568
2569 <li data-name="LuCI.response#clone"><a href="LuCI.response.html#clone">clone</a></li>
2570
2571 <li data-name="LuCI.response#json"><a href="LuCI.response.html#json">json</a></li>
2572
2573 <li data-name="LuCI.response#text"><a href="LuCI.response.html#text">text</a></li>
2574
2575 </ul>
2576 <ul class="events itemMembers">
2577
2578 </ul>
2579 </li>
2580
2581 <li class="item" data-name="LuCI.rpc">
2582 <span class="title">
2583 <a href="LuCI.rpc.html">LuCI.rpc</a>
2584
2585 </span>
2586 <ul class="members itemMembers">
2587
2588 </ul>
2589 <ul class="typedefs itemMembers">
2590
2591 <span class="subtitle">Typedefs</span>
2592
2593 <li data-name="LuCI.rpc.DeclareOptions"><a href="LuCI.rpc.html#.DeclareOptions">DeclareOptions</a></li>
2594
2595 <li data-name="LuCI.rpc~filterFn"><a href="LuCI.rpc.html#~filterFn">filterFn</a></li>
2596
2597 <li data-name="LuCI.rpc~interceptorFn"><a href="LuCI.rpc.html#~interceptorFn">interceptorFn</a></li>
2598
2599 <li data-name="LuCI.rpc~invokeFn"><a href="LuCI.rpc.html#~invokeFn">invokeFn</a></li>
2600
2601 </ul>
2602 <ul class="typedefs itemMembers">
2603
2604 </ul>
2605 <ul class="methods itemMembers">
2606
2607 <span class="subtitle">Methods</span>
2608
2609 <li data-name="LuCI.rpc#addInterceptor"><a href="LuCI.rpc.html#addInterceptor">addInterceptor</a></li>
2610
2611 <li data-name="LuCI.rpc#declare"><a href="LuCI.rpc.html#declare">declare</a></li>
2612
2613 <li data-name="LuCI.rpc#getBaseURL"><a href="LuCI.rpc.html#getBaseURL">getBaseURL</a></li>
2614
2615 <li data-name="LuCI.rpc#getSessionID"><a href="LuCI.rpc.html#getSessionID">getSessionID</a></li>
2616
2617 <li data-name="LuCI.rpc#getStatusText"><a href="LuCI.rpc.html#getStatusText">getStatusText</a></li>
2618
2619 <li data-name="LuCI.rpc#list"><a href="LuCI.rpc.html#list">list</a></li>
2620
2621 <li data-name="LuCI.rpc#removeInterceptor"><a href="LuCI.rpc.html#removeInterceptor">removeInterceptor</a></li>
2622
2623 <li data-name="LuCI.rpc#setBaseURL"><a href="LuCI.rpc.html#setBaseURL">setBaseURL</a></li>
2624
2625 <li data-name="LuCI.rpc#setSessionID"><a href="LuCI.rpc.html#setSessionID">setSessionID</a></li>
2626
2627 </ul>
2628 <ul class="events itemMembers">
2629
2630 </ul>
2631 </li>
2632
2633 <li class="item" data-name="LuCI.session">
2634 <span class="title">
2635 <a href="LuCI.session.html">LuCI.session</a>
2636
2637 </span>
2638 <ul class="members itemMembers">
2639
2640 </ul>
2641 <ul class="typedefs itemMembers">
2642
2643 </ul>
2644 <ul class="typedefs itemMembers">
2645
2646 </ul>
2647 <ul class="methods itemMembers">
2648
2649 <span class="subtitle">Methods</span>
2650
2651 <li data-name="LuCI.session#getID"><a href="LuCI.session.html#getID">getID</a></li>
2652
2653 <li data-name="LuCI.session#getLocalData"><a href="LuCI.session.html#getLocalData">getLocalData</a></li>
2654
2655 <li data-name="LuCI.session#getToken"><a href="LuCI.session.html#getToken">getToken</a></li>
2656
2657 <li data-name="LuCI.session#setLocalData"><a href="LuCI.session.html#setLocalData">setLocalData</a></li>
2658
2659 </ul>
2660 <ul class="events itemMembers">
2661
2662 </ul>
2663 </li>
2664
2665 <li class="item" data-name="LuCI.uci">
2666 <span class="title">
2667 <a href="LuCI.uci.html">LuCI.uci</a>
2668
2669 </span>
2670 <ul class="members itemMembers">
2671
2672 </ul>
2673 <ul class="typedefs itemMembers">
2674
2675 <span class="subtitle">Typedefs</span>
2676
2677 <li data-name="LuCI.uci.ChangeRecord"><a href="LuCI.uci.html#.ChangeRecord">ChangeRecord</a></li>
2678
2679 <li data-name="LuCI.uci.SectionObject"><a href="LuCI.uci.html#.SectionObject">SectionObject</a></li>
2680
2681 <li data-name="LuCI.uci~sectionsFn"><a href="LuCI.uci.html#~sectionsFn">sectionsFn</a></li>
2682
2683 </ul>
2684 <ul class="typedefs itemMembers">
2685
2686 </ul>
2687 <ul class="methods itemMembers">
2688
2689 <span class="subtitle">Methods</span>
2690
2691 <li data-name="LuCI.uci#add"><a href="LuCI.uci.html#add">add</a></li>
2692
2693 <li data-name="LuCI.uci#apply"><a href="LuCI.uci.html#apply">apply</a></li>
2694
2695 <li data-name="LuCI.uci#changes"><a href="LuCI.uci.html#changes">changes</a></li>
2696
2697 <li data-name="LuCI.uci#createSID"><a href="LuCI.uci.html#createSID">createSID</a></li>
2698
2699 <li data-name="LuCI.uci#get"><a href="LuCI.uci.html#get">get</a></li>
2700
2701 <li data-name="LuCI.uci#get_first"><a href="LuCI.uci.html#get_first">get_first</a></li>
2702
2703 <li data-name="LuCI.uci#load"><a href="LuCI.uci.html#load">load</a></li>
2704
2705 <li data-name="LuCI.uci#move"><a href="LuCI.uci.html#move">move</a></li>
2706
2707 <li data-name="LuCI.uci#remove"><a href="LuCI.uci.html#remove">remove</a></li>
2708
2709 <li data-name="LuCI.uci#resolveSID"><a href="LuCI.uci.html#resolveSID">resolveSID</a></li>
2710
2711 <li data-name="LuCI.uci#save"><a href="LuCI.uci.html#save">save</a></li>
2712
2713 <li data-name="LuCI.uci#sections"><a href="LuCI.uci.html#sections">sections</a></li>
2714
2715 <li data-name="LuCI.uci#set"><a href="LuCI.uci.html#set">set</a></li>
2716
2717 <li data-name="LuCI.uci#set_first"><a href="LuCI.uci.html#set_first">set_first</a></li>
2718
2719 <li data-name="LuCI.uci#unload"><a href="LuCI.uci.html#unload">unload</a></li>
2720
2721 <li data-name="LuCI.uci#unset"><a href="LuCI.uci.html#unset">unset</a></li>
2722
2723 <li data-name="LuCI.uci#unset_first"><a href="LuCI.uci.html#unset_first">unset_first</a></li>
2724
2725 </ul>
2726 <ul class="events itemMembers">
2727
2728 </ul>
2729 </li>
2730
2731 <li class="item" data-name="LuCI.ui">
2732 <span class="title">
2733 <a href="LuCI.ui.html">LuCI.ui</a>
2734
2735 </span>
2736 <ul class="members itemMembers">
2737
2738 </ul>
2739 <ul class="typedefs itemMembers">
2740
2741 <span class="subtitle">Typedefs</span>
2742
2743 <li data-name="LuCI.ui.FileUploadReply"><a href="LuCI.ui.html#.FileUploadReply">FileUploadReply</a></li>
2744
2745 </ul>
2746 <ul class="typedefs itemMembers">
2747
2748 </ul>
2749 <ul class="methods itemMembers">
2750
2751 <span class="subtitle">Methods</span>
2752
2753 <li data-name="LuCI.ui#addNotification"><a href="LuCI.ui.html#addNotification">addNotification</a></li>
2754
2755 <li data-name="LuCI.ui#addValidator"><a href="LuCI.ui.html#addValidator">addValidator</a></li>
2756
2757 <li data-name="LuCI.ui#awaitReconnect"><a href="LuCI.ui.html#awaitReconnect">awaitReconnect</a></li>
2758
2759 <li data-name="LuCI.ui#createHandlerFn"><a href="LuCI.ui.html#createHandlerFn">createHandlerFn</a></li>
2760
2761 <li data-name="LuCI.ui#hideIndicator"><a href="LuCI.ui.html#hideIndicator">hideIndicator</a></li>
2762
2763 <li data-name="LuCI.ui#hideModal"><a href="LuCI.ui.html#hideModal">hideModal</a></li>
2764
2765 <li data-name="LuCI.ui#instantiateView"><a href="LuCI.ui.html#instantiateView">instantiateView</a></li>
2766
2767 <li data-name="LuCI.ui#itemlist"><a href="LuCI.ui.html#itemlist">itemlist</a></li>
2768
2769 <li data-name="LuCI.ui#pingDevice"><a href="LuCI.ui.html#pingDevice">pingDevice</a></li>
2770
2771 <li data-name="LuCI.ui#showIndicator"><a href="LuCI.ui.html#showIndicator">showIndicator</a></li>
2772
2773 <li data-name="LuCI.ui#showModal"><a href="LuCI.ui.html#showModal">showModal</a></li>
2774
2775 <li data-name="LuCI.ui#uploadFile"><a href="LuCI.ui.html#uploadFile">uploadFile</a></li>
2776
2777 </ul>
2778 <ul class="events itemMembers">
2779
2780 </ul>
2781 </li>
2782
2783 <li class="item" data-name="LuCI.ui.AbstractElement">
2784 <span class="title">
2785 <a href="LuCI.ui.AbstractElement.html">LuCI.ui.AbstractElement</a>
2786
2787 </span>
2788 <ul class="members itemMembers">
2789
2790 </ul>
2791 <ul class="typedefs itemMembers">
2792
2793 <span class="subtitle">Typedefs</span>
2794
2795 <li data-name="LuCI.ui.AbstractElement.InitOptions"><a href="LuCI.ui.AbstractElement.html#.InitOptions">InitOptions</a></li>
2796
2797 </ul>
2798 <ul class="typedefs itemMembers">
2799
2800 </ul>
2801 <ul class="methods itemMembers">
2802
2803 <span class="subtitle">Methods</span>
2804
2805 <li data-name="LuCI.ui.AbstractElement#getValidationError"><a href="LuCI.ui.AbstractElement.html#getValidationError">getValidationError</a></li>
2806
2807 <li data-name="LuCI.ui.AbstractElement#getValue"><a href="LuCI.ui.AbstractElement.html#getValue">getValue</a></li>
2808
2809 <li data-name="LuCI.ui.AbstractElement#isChanged"><a href="LuCI.ui.AbstractElement.html#isChanged">isChanged</a></li>
2810
2811 <li data-name="LuCI.ui.AbstractElement#isValid"><a href="LuCI.ui.AbstractElement.html#isValid">isValid</a></li>
2812
2813 <li data-name="LuCI.ui.AbstractElement#registerEvents"><a href="LuCI.ui.AbstractElement.html#registerEvents">registerEvents</a></li>
2814
2815 <li data-name="LuCI.ui.AbstractElement#render"><a href="LuCI.ui.AbstractElement.html#render">render</a></li>
2816
2817 <li data-name="LuCI.ui.AbstractElement#setChangeEvents"><a href="LuCI.ui.AbstractElement.html#setChangeEvents">setChangeEvents</a></li>
2818
2819 <li data-name="LuCI.ui.AbstractElement#setPlaceholder"><a href="LuCI.ui.AbstractElement.html#setPlaceholder">setPlaceholder</a></li>
2820
2821 <li data-name="LuCI.ui.AbstractElement#setUpdateEvents"><a href="LuCI.ui.AbstractElement.html#setUpdateEvents">setUpdateEvents</a></li>
2822
2823 <li data-name="LuCI.ui.AbstractElement#setValue"><a href="LuCI.ui.AbstractElement.html#setValue">setValue</a></li>
2824
2825 <li data-name="LuCI.ui.AbstractElement#triggerValidation"><a href="LuCI.ui.AbstractElement.html#triggerValidation">triggerValidation</a></li>
2826
2827 </ul>
2828 <ul class="events itemMembers">
2829
2830 </ul>
2831 </li>
2832
2833 <li class="item" data-name="LuCI.ui.changes">
2834 <span class="title">
2835 <a href="LuCI.ui.changes.html">LuCI.ui.changes</a>
2836
2837 </span>
2838 <ul class="members itemMembers">
2839
2840 </ul>
2841 <ul class="typedefs itemMembers">
2842
2843 </ul>
2844 <ul class="typedefs itemMembers">
2845
2846 </ul>
2847 <ul class="methods itemMembers">
2848
2849 <span class="subtitle">Methods</span>
2850
2851 <li data-name="LuCI.ui.changes#apply"><a href="LuCI.ui.changes.html#apply">apply</a></li>
2852
2853 <li data-name="LuCI.ui.changes#displayChanges"><a href="LuCI.ui.changes.html#displayChanges">displayChanges</a></li>
2854
2855 <li data-name="LuCI.ui.changes#renderChangeIndicator"><a href="LuCI.ui.changes.html#renderChangeIndicator">renderChangeIndicator</a></li>
2856
2857 <li data-name="LuCI.ui.changes#revert"><a href="LuCI.ui.changes.html#revert">revert</a></li>
2858
2859 <li data-name="LuCI.ui.changes#setIndicator"><a href="LuCI.ui.changes.html#setIndicator">setIndicator</a></li>
2860
2861 </ul>
2862 <ul class="events itemMembers">
2863
2864 </ul>
2865 </li>
2866
2867 <li class="item" data-name="LuCI.ui.Checkbox">
2868 <span class="title">
2869 <a href="LuCI.ui.Checkbox.html">LuCI.ui.Checkbox</a>
2870
2871 </span>
2872 <ul class="members itemMembers">
2873
2874 </ul>
2875 <ul class="typedefs itemMembers">
2876
2877 <span class="subtitle">Typedefs</span>
2878
2879 <li data-name="LuCI.ui.Checkbox.InitOptions"><a href="LuCI.ui.Checkbox.html#.InitOptions">InitOptions</a></li>
2880
2881 </ul>
2882 <ul class="typedefs itemMembers">
2883
2884 </ul>
2885 <ul class="methods itemMembers">
2886
2887 <span class="subtitle">Methods</span>
2888
2889 <li data-name="LuCI.ui.Checkbox#getValidationError"><a href="LuCI.ui.Checkbox.html#getValidationError">getValidationError</a></li>
2890
2891 <li data-name="LuCI.ui.Checkbox#getValue"><a href="LuCI.ui.Checkbox.html#getValue">getValue</a></li>
2892
2893 <li data-name="LuCI.ui.Checkbox#isChanged"><a href="LuCI.ui.Checkbox.html#isChanged">isChanged</a></li>
2894
2895 <li data-name="LuCI.ui.Checkbox#isChecked"><a href="LuCI.ui.Checkbox.html#isChecked">isChecked</a></li>
2896
2897 <li data-name="LuCI.ui.Checkbox#isValid"><a href="LuCI.ui.Checkbox.html#isValid">isValid</a></li>
2898
2899 <li data-name="LuCI.ui.Checkbox#registerEvents"><a href="LuCI.ui.Checkbox.html#registerEvents">registerEvents</a></li>
2900
2901 <li data-name="LuCI.ui.Checkbox#render"><a href="LuCI.ui.Checkbox.html#render">render</a></li>
2902
2903 <li data-name="LuCI.ui.Checkbox#setChangeEvents"><a href="LuCI.ui.Checkbox.html#setChangeEvents">setChangeEvents</a></li>
2904
2905 <li data-name="LuCI.ui.Checkbox#setPlaceholder"><a href="LuCI.ui.Checkbox.html#setPlaceholder">setPlaceholder</a></li>
2906
2907 <li data-name="LuCI.ui.Checkbox#setUpdateEvents"><a href="LuCI.ui.Checkbox.html#setUpdateEvents">setUpdateEvents</a></li>
2908
2909 <li data-name="LuCI.ui.Checkbox#setValue"><a href="LuCI.ui.Checkbox.html#setValue">setValue</a></li>
2910
2911 <li data-name="LuCI.ui.Checkbox#triggerValidation"><a href="LuCI.ui.Checkbox.html#triggerValidation">triggerValidation</a></li>
2912
2913 </ul>
2914 <ul class="events itemMembers">
2915
2916 </ul>
2917 </li>
2918
2919 <li class="item" data-name="LuCI.ui.Combobox">
2920 <span class="title">
2921 <a href="LuCI.ui.Combobox.html">LuCI.ui.Combobox</a>
2922
2923 </span>
2924 <ul class="members itemMembers">
2925
2926 </ul>
2927 <ul class="typedefs itemMembers">
2928
2929 <span class="subtitle">Typedefs</span>
2930
2931 <li data-name="LuCI.ui.Combobox.InitOptions"><a href="LuCI.ui.Combobox.html#.InitOptions">InitOptions</a></li>
2932
2933 </ul>
2934 <ul class="typedefs itemMembers">
2935
2936 </ul>
2937 <ul class="methods itemMembers">
2938
2939 <span class="subtitle">Methods</span>
2940
2941 <li data-name="LuCI.ui.Combobox#addChoices"><a href="LuCI.ui.Combobox.html#addChoices">addChoices</a></li>
2942
2943 <li data-name="LuCI.ui.Combobox#clearChoices"><a href="LuCI.ui.Combobox.html#clearChoices">clearChoices</a></li>
2944
2945 <li data-name="LuCI.ui.Combobox#closeAllDropdowns"><a href="LuCI.ui.Combobox.html#closeAllDropdowns">closeAllDropdowns</a></li>
2946
2947 <li data-name="LuCI.ui.Combobox#getValidationError"><a href="LuCI.ui.Combobox.html#getValidationError">getValidationError</a></li>
2948
2949 <li data-name="LuCI.ui.Combobox#isChanged"><a href="LuCI.ui.Combobox.html#isChanged">isChanged</a></li>
2950
2951 <li data-name="LuCI.ui.Combobox#isValid"><a href="LuCI.ui.Combobox.html#isValid">isValid</a></li>
2952
2953 <li data-name="LuCI.ui.Combobox#registerEvents"><a href="LuCI.ui.Combobox.html#registerEvents">registerEvents</a></li>
2954
2955 <li data-name="LuCI.ui.Combobox#setChangeEvents"><a href="LuCI.ui.Combobox.html#setChangeEvents">setChangeEvents</a></li>
2956
2957 <li data-name="LuCI.ui.Combobox#setPlaceholder"><a href="LuCI.ui.Combobox.html#setPlaceholder">setPlaceholder</a></li>
2958
2959 <li data-name="LuCI.ui.Combobox#setUpdateEvents"><a href="LuCI.ui.Combobox.html#setUpdateEvents">setUpdateEvents</a></li>
2960
2961 <li data-name="LuCI.ui.Combobox#triggerValidation"><a href="LuCI.ui.Combobox.html#triggerValidation">triggerValidation</a></li>
2962
2963 </ul>
2964 <ul class="events itemMembers">
2965
2966 </ul>
2967 </li>
2968
2969 <li class="item" data-name="LuCI.ui.ComboButton">
2970 <span class="title">
2971 <a href="LuCI.ui.ComboButton.html">LuCI.ui.ComboButton</a>
2972
2973 </span>
2974 <ul class="members itemMembers">
2975
2976 </ul>
2977 <ul class="typedefs itemMembers">
2978
2979 <span class="subtitle">Typedefs</span>
2980
2981 <li data-name="LuCI.ui.ComboButton.InitOptions"><a href="LuCI.ui.ComboButton.html#.InitOptions">InitOptions</a></li>
2982
2983 </ul>
2984 <ul class="typedefs itemMembers">
2985
2986 </ul>
2987 <ul class="methods itemMembers">
2988
2989 <span class="subtitle">Methods</span>
2990
2991 <li data-name="LuCI.ui.ComboButton#addChoices"><a href="LuCI.ui.ComboButton.html#addChoices">addChoices</a></li>
2992
2993 <li data-name="LuCI.ui.ComboButton#clearChoices"><a href="LuCI.ui.ComboButton.html#clearChoices">clearChoices</a></li>
2994
2995 <li data-name="LuCI.ui.ComboButton#closeAllDropdowns"><a href="LuCI.ui.ComboButton.html#closeAllDropdowns">closeAllDropdowns</a></li>
2996
2997 <li data-name="LuCI.ui.ComboButton#getValidationError"><a href="LuCI.ui.ComboButton.html#getValidationError">getValidationError</a></li>
2998
2999 <li data-name="LuCI.ui.ComboButton#isChanged"><a href="LuCI.ui.ComboButton.html#isChanged">isChanged</a></li>
3000
3001 <li data-name="LuCI.ui.ComboButton#isValid"><a href="LuCI.ui.ComboButton.html#isValid">isValid</a></li>
3002
3003 <li data-name="LuCI.ui.ComboButton#registerEvents"><a href="LuCI.ui.ComboButton.html#registerEvents">registerEvents</a></li>
3004
3005 <li data-name="LuCI.ui.ComboButton#setChangeEvents"><a href="LuCI.ui.ComboButton.html#setChangeEvents">setChangeEvents</a></li>
3006
3007 <li data-name="LuCI.ui.ComboButton#setPlaceholder"><a href="LuCI.ui.ComboButton.html#setPlaceholder">setPlaceholder</a></li>
3008
3009 <li data-name="LuCI.ui.ComboButton#setUpdateEvents"><a href="LuCI.ui.ComboButton.html#setUpdateEvents">setUpdateEvents</a></li>
3010
3011 <li data-name="LuCI.ui.ComboButton#triggerValidation"><a href="LuCI.ui.ComboButton.html#triggerValidation">triggerValidation</a></li>
3012
3013 </ul>
3014 <ul class="events itemMembers">
3015
3016 </ul>
3017 </li>
3018
3019 <li class="item" data-name="LuCI.ui.Dropdown">
3020 <span class="title">
3021 <a href="LuCI.ui.Dropdown.html">LuCI.ui.Dropdown</a>
3022
3023 </span>
3024 <ul class="members itemMembers">
3025
3026 </ul>
3027 <ul class="typedefs itemMembers">
3028
3029 <span class="subtitle">Typedefs</span>
3030
3031 <li data-name="LuCI.ui.Dropdown.InitOptions"><a href="LuCI.ui.Dropdown.html#.InitOptions">InitOptions</a></li>
3032
3033 </ul>
3034 <ul class="typedefs itemMembers">
3035
3036 </ul>
3037 <ul class="methods itemMembers">
3038
3039 <span class="subtitle">Methods</span>
3040
3041 <li data-name="LuCI.ui.Dropdown#addChoices"><a href="LuCI.ui.Dropdown.html#addChoices">addChoices</a></li>
3042
3043 <li data-name="LuCI.ui.Dropdown#clearChoices"><a href="LuCI.ui.Dropdown.html#clearChoices">clearChoices</a></li>
3044
3045 <li data-name="LuCI.ui.Dropdown#closeAllDropdowns"><a href="LuCI.ui.Dropdown.html#closeAllDropdowns">closeAllDropdowns</a></li>
3046
3047 <li data-name="LuCI.ui.Dropdown#getValidationError"><a href="LuCI.ui.Dropdown.html#getValidationError">getValidationError</a></li>
3048
3049 <li data-name="LuCI.ui.Dropdown#getValue"><a href="LuCI.ui.Dropdown.html#getValue">getValue</a></li>
3050
3051 <li data-name="LuCI.ui.Dropdown#isChanged"><a href="LuCI.ui.Dropdown.html#isChanged">isChanged</a></li>
3052
3053 <li data-name="LuCI.ui.Dropdown#isValid"><a href="LuCI.ui.Dropdown.html#isValid">isValid</a></li>
3054
3055 <li data-name="LuCI.ui.Dropdown#registerEvents"><a href="LuCI.ui.Dropdown.html#registerEvents">registerEvents</a></li>
3056
3057 <li data-name="LuCI.ui.Dropdown#render"><a href="LuCI.ui.Dropdown.html#render">render</a></li>
3058
3059 <li data-name="LuCI.ui.Dropdown#setChangeEvents"><a href="LuCI.ui.Dropdown.html#setChangeEvents">setChangeEvents</a></li>
3060
3061 <li data-name="LuCI.ui.Dropdown#setPlaceholder"><a href="LuCI.ui.Dropdown.html#setPlaceholder">setPlaceholder</a></li>
3062
3063 <li data-name="LuCI.ui.Dropdown#setUpdateEvents"><a href="LuCI.ui.Dropdown.html#setUpdateEvents">setUpdateEvents</a></li>
3064
3065 <li data-name="LuCI.ui.Dropdown#setValue"><a href="LuCI.ui.Dropdown.html#setValue">setValue</a></li>
3066
3067 <li data-name="LuCI.ui.Dropdown#triggerValidation"><a href="LuCI.ui.Dropdown.html#triggerValidation">triggerValidation</a></li>
3068
3069 </ul>
3070 <ul class="events itemMembers">
3071
3072 </ul>
3073 </li>
3074
3075 <li class="item" data-name="LuCI.ui.DynamicList">
3076 <span class="title">
3077 <a href="LuCI.ui.DynamicList.html">LuCI.ui.DynamicList</a>
3078
3079 </span>
3080 <ul class="members itemMembers">
3081
3082 </ul>
3083 <ul class="typedefs itemMembers">
3084
3085 <span class="subtitle">Typedefs</span>
3086
3087 <li data-name="LuCI.ui.DynamicList.InitOptions"><a href="LuCI.ui.DynamicList.html#.InitOptions">InitOptions</a></li>
3088
3089 </ul>
3090 <ul class="typedefs itemMembers">
3091
3092 </ul>
3093 <ul class="methods itemMembers">
3094
3095 <span class="subtitle">Methods</span>
3096
3097 <li data-name="LuCI.ui.DynamicList#addChoices"><a href="LuCI.ui.DynamicList.html#addChoices">addChoices</a></li>
3098
3099 <li data-name="LuCI.ui.DynamicList#clearChoices"><a href="LuCI.ui.DynamicList.html#clearChoices">clearChoices</a></li>
3100
3101 <li data-name="LuCI.ui.DynamicList#getValidationError"><a href="LuCI.ui.DynamicList.html#getValidationError">getValidationError</a></li>
3102
3103 <li data-name="LuCI.ui.DynamicList#getValue"><a href="LuCI.ui.DynamicList.html#getValue">getValue</a></li>
3104
3105 <li data-name="LuCI.ui.DynamicList#isChanged"><a href="LuCI.ui.DynamicList.html#isChanged">isChanged</a></li>
3106
3107 <li data-name="LuCI.ui.DynamicList#isValid"><a href="LuCI.ui.DynamicList.html#isValid">isValid</a></li>
3108
3109 <li data-name="LuCI.ui.DynamicList#registerEvents"><a href="LuCI.ui.DynamicList.html#registerEvents">registerEvents</a></li>
3110
3111 <li data-name="LuCI.ui.DynamicList#render"><a href="LuCI.ui.DynamicList.html#render">render</a></li>
3112
3113 <li data-name="LuCI.ui.DynamicList#setChangeEvents"><a href="LuCI.ui.DynamicList.html#setChangeEvents">setChangeEvents</a></li>
3114
3115 <li data-name="LuCI.ui.DynamicList#setPlaceholder"><a href="LuCI.ui.DynamicList.html#setPlaceholder">setPlaceholder</a></li>
3116
3117 <li data-name="LuCI.ui.DynamicList#setUpdateEvents"><a href="LuCI.ui.DynamicList.html#setUpdateEvents">setUpdateEvents</a></li>
3118
3119 <li data-name="LuCI.ui.DynamicList#setValue"><a href="LuCI.ui.DynamicList.html#setValue">setValue</a></li>
3120
3121 <li data-name="LuCI.ui.DynamicList#triggerValidation"><a href="LuCI.ui.DynamicList.html#triggerValidation">triggerValidation</a></li>
3122
3123 </ul>
3124 <ul class="events itemMembers">
3125
3126 </ul>
3127 </li>
3128
3129 <li class="item" data-name="LuCI.ui.FileUpload">
3130 <span class="title">
3131 <a href="LuCI.ui.FileUpload.html">LuCI.ui.FileUpload</a>
3132
3133 </span>
3134 <ul class="members itemMembers">
3135
3136 </ul>
3137 <ul class="typedefs itemMembers">
3138
3139 <span class="subtitle">Typedefs</span>
3140
3141 <li data-name="LuCI.ui.FileUpload.InitOptions"><a href="LuCI.ui.FileUpload.html#.InitOptions">InitOptions</a></li>
3142
3143 </ul>
3144 <ul class="typedefs itemMembers">
3145
3146 </ul>
3147 <ul class="methods itemMembers">
3148
3149 <span class="subtitle">Methods</span>
3150
3151 <li data-name="LuCI.ui.FileUpload#getValidationError"><a href="LuCI.ui.FileUpload.html#getValidationError">getValidationError</a></li>
3152
3153 <li data-name="LuCI.ui.FileUpload#getValue"><a href="LuCI.ui.FileUpload.html#getValue">getValue</a></li>
3154
3155 <li data-name="LuCI.ui.FileUpload#isChanged"><a href="LuCI.ui.FileUpload.html#isChanged">isChanged</a></li>
3156
3157 <li data-name="LuCI.ui.FileUpload#isValid"><a href="LuCI.ui.FileUpload.html#isValid">isValid</a></li>
3158
3159 <li data-name="LuCI.ui.FileUpload#registerEvents"><a href="LuCI.ui.FileUpload.html#registerEvents">registerEvents</a></li>
3160
3161 <li data-name="LuCI.ui.FileUpload#render"><a href="LuCI.ui.FileUpload.html#render">render</a></li>
3162
3163 <li data-name="LuCI.ui.FileUpload#setChangeEvents"><a href="LuCI.ui.FileUpload.html#setChangeEvents">setChangeEvents</a></li>
3164
3165 <li data-name="LuCI.ui.FileUpload#setPlaceholder"><a href="LuCI.ui.FileUpload.html#setPlaceholder">setPlaceholder</a></li>
3166
3167 <li data-name="LuCI.ui.FileUpload#setUpdateEvents"><a href="LuCI.ui.FileUpload.html#setUpdateEvents">setUpdateEvents</a></li>
3168
3169 <li data-name="LuCI.ui.FileUpload#setValue"><a href="LuCI.ui.FileUpload.html#setValue">setValue</a></li>
3170
3171 <li data-name="LuCI.ui.FileUpload#triggerValidation"><a href="LuCI.ui.FileUpload.html#triggerValidation">triggerValidation</a></li>
3172
3173 </ul>
3174 <ul class="events itemMembers">
3175
3176 </ul>
3177 </li>
3178
3179 <li class="item" data-name="LuCI.ui.Hiddenfield">
3180 <span class="title">
3181 <a href="LuCI.ui.Hiddenfield.html">LuCI.ui.Hiddenfield</a>
3182
3183 </span>
3184 <ul class="members itemMembers">
3185
3186 </ul>
3187 <ul class="typedefs itemMembers">
3188
3189 </ul>
3190 <ul class="typedefs itemMembers">
3191
3192 </ul>
3193 <ul class="methods itemMembers">
3194
3195 <span class="subtitle">Methods</span>
3196
3197 <li data-name="LuCI.ui.Hiddenfield#getValidationError"><a href="LuCI.ui.Hiddenfield.html#getValidationError">getValidationError</a></li>
3198
3199 <li data-name="LuCI.ui.Hiddenfield#getValue"><a href="LuCI.ui.Hiddenfield.html#getValue">getValue</a></li>
3200
3201 <li data-name="LuCI.ui.Hiddenfield#isChanged"><a href="LuCI.ui.Hiddenfield.html#isChanged">isChanged</a></li>
3202
3203 <li data-name="LuCI.ui.Hiddenfield#isValid"><a href="LuCI.ui.Hiddenfield.html#isValid">isValid</a></li>
3204
3205 <li data-name="LuCI.ui.Hiddenfield#registerEvents"><a href="LuCI.ui.Hiddenfield.html#registerEvents">registerEvents</a></li>
3206
3207 <li data-name="LuCI.ui.Hiddenfield#render"><a href="LuCI.ui.Hiddenfield.html#render">render</a></li>
3208
3209 <li data-name="LuCI.ui.Hiddenfield#setChangeEvents"><a href="LuCI.ui.Hiddenfield.html#setChangeEvents">setChangeEvents</a></li>
3210
3211 <li data-name="LuCI.ui.Hiddenfield#setPlaceholder"><a href="LuCI.ui.Hiddenfield.html#setPlaceholder">setPlaceholder</a></li>
3212
3213 <li data-name="LuCI.ui.Hiddenfield#setUpdateEvents"><a href="LuCI.ui.Hiddenfield.html#setUpdateEvents">setUpdateEvents</a></li>
3214
3215 <li data-name="LuCI.ui.Hiddenfield#setValue"><a href="LuCI.ui.Hiddenfield.html#setValue">setValue</a></li>
3216
3217 <li data-name="LuCI.ui.Hiddenfield#triggerValidation"><a href="LuCI.ui.Hiddenfield.html#triggerValidation">triggerValidation</a></li>
3218
3219 </ul>
3220 <ul class="events itemMembers">
3221
3222 </ul>
3223 </li>
3224
3225 <li class="item" data-name="LuCI.ui.menu">
3226 <span class="title">
3227 <a href="LuCI.ui.menu.html">LuCI.ui.menu</a>
3228
3229 </span>
3230 <ul class="members itemMembers">
3231
3232 </ul>
3233 <ul class="typedefs itemMembers">
3234
3235 <span class="subtitle">Typedefs</span>
3236
3237 <li data-name="LuCI.ui.menu.MenuNode"><a href="LuCI.ui.menu.html#.MenuNode">MenuNode</a></li>
3238
3239 </ul>
3240 <ul class="typedefs itemMembers">
3241
3242 </ul>
3243 <ul class="methods itemMembers">
3244
3245 <span class="subtitle">Methods</span>
3246
3247 <li data-name="LuCI.ui.menu#flushCache"><a href="LuCI.ui.menu.html#flushCache">flushCache</a></li>
3248
3249 <li data-name="LuCI.ui.menu#getChildren"><a href="LuCI.ui.menu.html#getChildren">getChildren</a></li>
3250
3251 <li data-name="LuCI.ui.menu#load"><a href="LuCI.ui.menu.html#load">load</a></li>
3252
3253 </ul>
3254 <ul class="events itemMembers">
3255
3256 </ul>
3257 </li>
3258
3259 <li class="item" data-name="LuCI.ui.Select">
3260 <span class="title">
3261 <a href="LuCI.ui.Select.html">LuCI.ui.Select</a>
3262
3263 </span>
3264 <ul class="members itemMembers">
3265
3266 </ul>
3267 <ul class="typedefs itemMembers">
3268
3269 <span class="subtitle">Typedefs</span>
3270
3271 <li data-name="LuCI.ui.Select.InitOptions"><a href="LuCI.ui.Select.html#.InitOptions">InitOptions</a></li>
3272
3273 </ul>
3274 <ul class="typedefs itemMembers">
3275
3276 </ul>
3277 <ul class="methods itemMembers">
3278
3279 <span class="subtitle">Methods</span>
3280
3281 <li data-name="LuCI.ui.Select#getValidationError"><a href="LuCI.ui.Select.html#getValidationError">getValidationError</a></li>
3282
3283 <li data-name="LuCI.ui.Select#getValue"><a href="LuCI.ui.Select.html#getValue">getValue</a></li>
3284
3285 <li data-name="LuCI.ui.Select#isChanged"><a href="LuCI.ui.Select.html#isChanged">isChanged</a></li>
3286
3287 <li data-name="LuCI.ui.Select#isValid"><a href="LuCI.ui.Select.html#isValid">isValid</a></li>
3288
3289 <li data-name="LuCI.ui.Select#registerEvents"><a href="LuCI.ui.Select.html#registerEvents">registerEvents</a></li>
3290
3291 <li data-name="LuCI.ui.Select#render"><a href="LuCI.ui.Select.html#render">render</a></li>
3292
3293 <li data-name="LuCI.ui.Select#setChangeEvents"><a href="LuCI.ui.Select.html#setChangeEvents">setChangeEvents</a></li>
3294
3295 <li data-name="LuCI.ui.Select#setPlaceholder"><a href="LuCI.ui.Select.html#setPlaceholder">setPlaceholder</a></li>
3296
3297 <li data-name="LuCI.ui.Select#setUpdateEvents"><a href="LuCI.ui.Select.html#setUpdateEvents">setUpdateEvents</a></li>
3298
3299 <li data-name="LuCI.ui.Select#setValue"><a href="LuCI.ui.Select.html#setValue">setValue</a></li>
3300
3301 <li data-name="LuCI.ui.Select#triggerValidation"><a href="LuCI.ui.Select.html#triggerValidation">triggerValidation</a></li>
3302
3303 </ul>
3304 <ul class="events itemMembers">
3305
3306 </ul>
3307 </li>
3308
3309 <li class="item" data-name="LuCI.ui.tabs">
3310 <span class="title">
3311 <a href="LuCI.ui.tabs.html">LuCI.ui.tabs</a>
3312
3313 </span>
3314 <ul class="members itemMembers">
3315
3316 </ul>
3317 <ul class="typedefs itemMembers">
3318
3319 </ul>
3320 <ul class="typedefs itemMembers">
3321
3322 </ul>
3323 <ul class="methods itemMembers">
3324
3325 <span class="subtitle">Methods</span>
3326
3327 <li data-name="LuCI.ui.tabs#initTabGroup"><a href="LuCI.ui.tabs.html#initTabGroup">initTabGroup</a></li>
3328
3329 <li data-name="LuCI.ui.tabs#isEmptyPane"><a href="LuCI.ui.tabs.html#isEmptyPane">isEmptyPane</a></li>
3330
3331 </ul>
3332 <ul class="events itemMembers">
3333
3334 </ul>
3335 </li>
3336
3337 <li class="item" data-name="LuCI.ui.Textarea">
3338 <span class="title">
3339 <a href="LuCI.ui.Textarea.html">LuCI.ui.Textarea</a>
3340
3341 </span>
3342 <ul class="members itemMembers">
3343
3344 </ul>
3345 <ul class="typedefs itemMembers">
3346
3347 <span class="subtitle">Typedefs</span>
3348
3349 <li data-name="LuCI.ui.Textarea.InitOptions"><a href="LuCI.ui.Textarea.html#.InitOptions">InitOptions</a></li>
3350
3351 </ul>
3352 <ul class="typedefs itemMembers">
3353
3354 </ul>
3355 <ul class="methods itemMembers">
3356
3357 <span class="subtitle">Methods</span>
3358
3359 <li data-name="LuCI.ui.Textarea#getValidationError"><a href="LuCI.ui.Textarea.html#getValidationError">getValidationError</a></li>
3360
3361 <li data-name="LuCI.ui.Textarea#getValue"><a href="LuCI.ui.Textarea.html#getValue">getValue</a></li>
3362
3363 <li data-name="LuCI.ui.Textarea#isChanged"><a href="LuCI.ui.Textarea.html#isChanged">isChanged</a></li>
3364
3365 <li data-name="LuCI.ui.Textarea#isValid"><a href="LuCI.ui.Textarea.html#isValid">isValid</a></li>
3366
3367 <li data-name="LuCI.ui.Textarea#registerEvents"><a href="LuCI.ui.Textarea.html#registerEvents">registerEvents</a></li>
3368
3369 <li data-name="LuCI.ui.Textarea#render"><a href="LuCI.ui.Textarea.html#render">render</a></li>
3370
3371 <li data-name="LuCI.ui.Textarea#setChangeEvents"><a href="LuCI.ui.Textarea.html#setChangeEvents">setChangeEvents</a></li>
3372
3373 <li data-name="LuCI.ui.Textarea#setPlaceholder"><a href="LuCI.ui.Textarea.html#setPlaceholder">setPlaceholder</a></li>
3374
3375 <li data-name="LuCI.ui.Textarea#setUpdateEvents"><a href="LuCI.ui.Textarea.html#setUpdateEvents">setUpdateEvents</a></li>
3376
3377 <li data-name="LuCI.ui.Textarea#setValue"><a href="LuCI.ui.Textarea.html#setValue">setValue</a></li>
3378
3379 <li data-name="LuCI.ui.Textarea#triggerValidation"><a href="LuCI.ui.Textarea.html#triggerValidation">triggerValidation</a></li>
3380
3381 </ul>
3382 <ul class="events itemMembers">
3383
3384 </ul>
3385 </li>
3386
3387 <li class="item" data-name="LuCI.ui.Textfield">
3388 <span class="title">
3389 <a href="LuCI.ui.Textfield.html">LuCI.ui.Textfield</a>
3390
3391 </span>
3392 <ul class="members itemMembers">
3393
3394 </ul>
3395 <ul class="typedefs itemMembers">
3396
3397 <span class="subtitle">Typedefs</span>
3398
3399 <li data-name="LuCI.ui.Textfield.InitOptions"><a href="LuCI.ui.Textfield.html#.InitOptions">InitOptions</a></li>
3400
3401 </ul>
3402 <ul class="typedefs itemMembers">
3403
3404 </ul>
3405 <ul class="methods itemMembers">
3406
3407 <span class="subtitle">Methods</span>
3408
3409 <li data-name="LuCI.ui.Textfield#getValidationError"><a href="LuCI.ui.Textfield.html#getValidationError">getValidationError</a></li>
3410
3411 <li data-name="LuCI.ui.Textfield#getValue"><a href="LuCI.ui.Textfield.html#getValue">getValue</a></li>
3412
3413 <li data-name="LuCI.ui.Textfield#isChanged"><a href="LuCI.ui.Textfield.html#isChanged">isChanged</a></li>
3414
3415 <li data-name="LuCI.ui.Textfield#isValid"><a href="LuCI.ui.Textfield.html#isValid">isValid</a></li>
3416
3417 <li data-name="LuCI.ui.Textfield#registerEvents"><a href="LuCI.ui.Textfield.html#registerEvents">registerEvents</a></li>
3418
3419 <li data-name="LuCI.ui.Textfield#render"><a href="LuCI.ui.Textfield.html#render">render</a></li>
3420
3421 <li data-name="LuCI.ui.Textfield#setChangeEvents"><a href="LuCI.ui.Textfield.html#setChangeEvents">setChangeEvents</a></li>
3422
3423 <li data-name="LuCI.ui.Textfield#setPlaceholder"><a href="LuCI.ui.Textfield.html#setPlaceholder">setPlaceholder</a></li>
3424
3425 <li data-name="LuCI.ui.Textfield#setUpdateEvents"><a href="LuCI.ui.Textfield.html#setUpdateEvents">setUpdateEvents</a></li>
3426
3427 <li data-name="LuCI.ui.Textfield#setValue"><a href="LuCI.ui.Textfield.html#setValue">setValue</a></li>
3428
3429 <li data-name="LuCI.ui.Textfield#triggerValidation"><a href="LuCI.ui.Textfield.html#triggerValidation">triggerValidation</a></li>
3430
3431 </ul>
3432 <ul class="events itemMembers">
3433
3434 </ul>
3435 </li>
3436
3437 <li class="item" data-name="LuCI.view">
3438 <span class="title">
3439 <a href="LuCI.view.html">LuCI.view</a>
3440
3441 </span>
3442 <ul class="members itemMembers">
3443
3444 </ul>
3445 <ul class="typedefs itemMembers">
3446
3447 </ul>
3448 <ul class="typedefs itemMembers">
3449
3450 </ul>
3451 <ul class="methods itemMembers">
3452
3453 <span class="subtitle">Methods</span>
3454
3455 <li data-name="LuCI.view#addFooter"><a href="LuCI.view.html#addFooter">addFooter</a></li>
3456
3457 <li data-name="LuCI.view#handleReset"><a href="LuCI.view.html#handleReset">handleReset</a></li>
3458
3459 <li data-name="LuCI.view#handleSave"><a href="LuCI.view.html#handleSave">handleSave</a></li>
3460
3461 <li data-name="LuCI.view#handleSaveApply"><a href="LuCI.view.html#handleSaveApply">handleSaveApply</a></li>
3462
3463 <li data-name="LuCI.view#load"><a href="LuCI.view.html#load">load</a></li>
3464
3465 <li data-name="LuCI.view#render"><a href="LuCI.view.html#render">render</a></li>
3466
3467 </ul>
3468 <ul class="events itemMembers">
3469
3470 </ul>
3471 </li>
3472
3473 <li class="item" data-name="LuCI.xhr">
3474 <span class="title">
3475 <a href="LuCI.xhr.html">LuCI.xhr</a>
3476
3477 </span>
3478 <ul class="members itemMembers">
3479
3480 </ul>
3481 <ul class="typedefs itemMembers">
3482
3483 </ul>
3484 <ul class="typedefs itemMembers">
3485
3486 </ul>
3487 <ul class="methods itemMembers">
3488
3489 <span class="subtitle">Methods</span>
3490
3491 <li data-name="LuCI.xhr#abort"><a href="LuCI.xhr.html#abort">abort</a></li>
3492
3493 <li data-name="LuCI.xhr#busy"><a href="LuCI.xhr.html#busy">busy</a></li>
3494
3495 <li data-name="LuCI.xhr#cancel"><a href="LuCI.xhr.html#cancel">cancel</a></li>
3496
3497 <li data-name="LuCI.xhr#get"><a href="LuCI.xhr.html#get">get</a></li>
3498
3499 <li data-name="LuCI.xhr#post"><a href="LuCI.xhr.html#post">post</a></li>
3500
3501 <li data-name="LuCI.xhr#send_form"><a href="LuCI.xhr.html#send_form">send_form</a></li>
3502
3503 </ul>
3504 <ul class="events itemMembers">
3505
3506 </ul>
3507 </li>
3508
3509 </ul>
3510 </div>
3511 <div class="main">
3512 <h1 class="page-title" data-filename="form.js.html">Source: form.js</h1>
3513
3514
3515
3516
3517 <section>
3518 <article>
3519 <pre id="source-code" class="prettyprint source "><code>'use strict';
3520 'require ui';
3521 'require uci';
3522 'require rpc';
3523 'require dom';
3524 'require baseclass';
3525
3526 var scope = this;
3527
3528 var callSessionAccess = rpc.declare({
3529 object: 'session',
3530 method: 'access',
3531 params: [ 'scope', 'object', 'function' ],
3532 expect: { 'access': false }
3533 });
3534
3535 var CBIJSONConfig = baseclass.extend({
3536 __init__: function(data) {
3537 data = Object.assign({}, data);
3538
3539 this.data = {};
3540
3541 var num_sections = 0,
3542 section_ids = [];
3543
3544 for (var sectiontype in data) {
3545 if (!data.hasOwnProperty(sectiontype))
3546 continue;
3547
3548 if (Array.isArray(data[sectiontype])) {
3549 for (var i = 0, index = 0; i &lt; data[sectiontype].length; i++) {
3550 var item = data[sectiontype][i],
3551 anonymous, name;
3552
3553 if (!L.isObject(item))
3554 continue;
3555
3556 if (typeof(item['.name']) == 'string') {
3557 name = item['.name'];
3558 anonymous = false;
3559 }
3560 else {
3561 name = sectiontype + num_sections;
3562 anonymous = true;
3563 }
3564
3565 if (!this.data.hasOwnProperty(name))
3566 section_ids.push(name);
3567
3568 this.data[name] = Object.assign(item, {
3569 '.index': num_sections++,
3570 '.anonymous': anonymous,
3571 '.name': name,
3572 '.type': sectiontype
3573 });
3574 }
3575 }
3576 else if (L.isObject(data[sectiontype])) {
3577 this.data[sectiontype] = Object.assign(data[sectiontype], {
3578 '.anonymous': false,
3579 '.name': sectiontype,
3580 '.type': sectiontype
3581 });
3582
3583 section_ids.push(sectiontype);
3584 num_sections++;
3585 }
3586 }
3587
3588 section_ids.sort(L.bind(function(a, b) {
3589 var indexA = (this.data[a]['.index'] != null) ? +this.data[a]['.index'] : 9999,
3590 indexB = (this.data[b]['.index'] != null) ? +this.data[b]['.index'] : 9999;
3591
3592 if (indexA != indexB)
3593 return (indexA - indexB);
3594
3595 return L.naturalCompare(a, b);
3596 }, this));
3597
3598 for (var i = 0; i &lt; section_ids.length; i++)
3599 this.data[section_ids[i]]['.index'] = i;
3600 },
3601
3602 load: function() {
3603 return Promise.resolve(this.data);
3604 },
3605
3606 save: function() {
3607 return Promise.resolve();
3608 },
3609
3610 get: function(config, section, option) {
3611 if (section == null)
3612 return null;
3613
3614 if (option == null)
3615 return this.data[section];
3616
3617 if (!this.data.hasOwnProperty(section))
3618 return null;
3619
3620 var value = this.data[section][option];
3621
3622 if (Array.isArray(value))
3623 return value;
3624
3625 if (value != null)
3626 return String(value);
3627
3628 return null;
3629 },
3630
3631 set: function(config, section, option, value) {
3632 if (section == null || option == null || option.charAt(0) == '.')
3633 return;
3634
3635 if (!this.data.hasOwnProperty(section))
3636 return;
3637
3638 if (value == null)
3639 delete this.data[section][option];
3640 else if (Array.isArray(value))
3641 this.data[section][option] = value;
3642 else
3643 this.data[section][option] = String(value);
3644 },
3645
3646 unset: function(config, section, option) {
3647 return this.set(config, section, option, null);
3648 },
3649
3650 sections: function(config, sectiontype, callback) {
3651 var rv = [];
3652
3653 for (var section_id in this.data)
3654 if (sectiontype == null || this.data[section_id]['.type'] == sectiontype)
3655 rv.push(this.data[section_id]);
3656
3657 rv.sort(function(a, b) { return a['.index'] - b['.index'] });
3658
3659 if (typeof(callback) == 'function')
3660 for (var i = 0; i &lt; rv.length; i++)
3661 callback.call(this, rv[i], rv[i]['.name']);
3662
3663 return rv;
3664 },
3665
3666 add: function(config, sectiontype, sectionname) {
3667 var num_sections_type = 0, next_index = 0;
3668
3669 for (var name in this.data) {
3670 num_sections_type += (this.data[name]['.type'] == sectiontype);
3671 next_index = Math.max(next_index, this.data[name]['.index']);
3672 }
3673
3674 var section_id = sectionname || sectiontype + num_sections_type;
3675
3676 if (!this.data.hasOwnProperty(section_id)) {
3677 this.data[section_id] = {
3678 '.name': section_id,
3679 '.type': sectiontype,
3680 '.anonymous': (sectionname == null),
3681 '.index': next_index + 1
3682 };
3683 }
3684
3685 return section_id;
3686 },
3687
3688 remove: function(config, section) {
3689 if (this.data.hasOwnProperty(section))
3690 delete this.data[section];
3691 },
3692
3693 resolveSID: function(config, section_id) {
3694 return section_id;
3695 },
3696
3697 move: function(config, section_id1, section_id2, after) {
3698 return uci.move.apply(this, [config, section_id1, section_id2, after]);
3699 }
3700 });
3701
3702 /**
3703 * @class AbstractElement
3704 * @memberof LuCI.form
3705 * @hideconstructor
3706 * @classdesc
3707 *
3708 * The `AbstractElement` class serves as abstract base for the different form
3709 * elements implemented by `LuCI.form`. It provides the common logic for
3710 * loading and rendering values, for nesting elements and for defining common
3711 * properties.
3712 *
3713 * This class is private and not directly accessible by user code.
3714 */
3715 var CBIAbstractElement = baseclass.extend(/** @lends LuCI.form.AbstractElement.prototype */ {
3716 __init__: function(title, description) {
3717 this.title = title || '';
3718 this.description = description || '';
3719 this.children = [];
3720 },
3721
3722 /**
3723 * Add another form element as children to this element.
3724 *
3725 * @param {AbstractElement} obj
3726 * The form element to add.
3727 */
3728 append: function(obj) {
3729 this.children.push(obj);
3730 },
3731
3732 /**
3733 * Parse this elements form input.
3734 *
3735 * The `parse()` function recursively walks the form element tree and
3736 * triggers input value reading and validation for each encountered element.
3737 *
3738 * Elements which are hidden due to unsatisfied dependencies are skipped.
3739 *
3740 * @returns {Promise&lt;void>}
3741 * Returns a promise resolving once this element's value and the values of
3742 * all child elements have been parsed. The returned promise is rejected
3743 * if any parsed values are not meeting the validation constraints of their
3744 * respective elements.
3745 */
3746 parse: function() {
3747 var args = arguments;
3748 this.children.forEach(function(child) {
3749 child.parse.apply(child, args);
3750 });
3751 },
3752
3753 /**
3754 * Render the form element.
3755 *
3756 * The `render()` function recursively walks the form element tree and
3757 * renders the markup for each element, returning the assembled DOM tree.
3758 *
3759 * @abstract
3760 * @returns {Node|Promise&lt;Node>}
3761 * May return a DOM Node or a promise resolving to a DOM node containing
3762 * the form element's markup, including the markup of any child elements.
3763 */
3764 render: function() {
3765 L.error('InternalError', 'Not implemented');
3766 },
3767
3768 /** @private */
3769 loadChildren: function(/* ... */) {
3770 var tasks = [];
3771
3772 if (Array.isArray(this.children))
3773 for (var i = 0; i &lt; this.children.length; i++)
3774 if (!this.children[i].disable)
3775 tasks.push(this.children[i].load.apply(this.children[i], arguments));
3776
3777 return Promise.all(tasks);
3778 },
3779
3780 /** @private */
3781 renderChildren: function(tab_name /*, ... */) {
3782 var tasks = [],
3783 index = 0;
3784
3785 if (Array.isArray(this.children))
3786 for (var i = 0; i &lt; this.children.length; i++)
3787 if (tab_name === null || this.children[i].tab === tab_name)
3788 if (!this.children[i].disable)
3789 tasks.push(this.children[i].render.apply(
3790 this.children[i], this.varargs(arguments, 1, index++)));
3791
3792 return Promise.all(tasks);
3793 },
3794
3795 /**
3796 * Strip any HTML tags from the given input string.
3797 *
3798 * @param {string} s
3799 * The input string to clean.
3800 *
3801 * @returns {string}
3802 * The cleaned input string with HTML tags removed.
3803 */
3804 stripTags: function(s) {
3805 if (typeof(s) == 'string' &amp;&amp; !s.match(/[&lt;>]/))
3806 return s;
3807
3808 var x = dom.elem(s) ? s : dom.parse('&lt;div>' + s + '&lt;/div>');
3809
3810 x.querySelectorAll('br').forEach(function(br) {
3811 x.replaceChild(document.createTextNode('\n'), br);
3812 });
3813
3814 return (x.textContent || x.innerText || '').replace(/([ \t]*\n)+/g, '\n');
3815 },
3816
3817 /**
3818 * Format the given named property as title string.
3819 *
3820 * This function looks up the given named property and formats its value
3821 * suitable for use as element caption or description string. It also
3822 * strips any HTML tags from the result.
3823 *
3824 * If the property value is a string, it is passed to `String.format()`
3825 * along with any additional parameters passed to `titleFn()`.
3826 *
3827 * If the property value is a function, it is invoked with any additional
3828 * `titleFn()` parameters as arguments and the obtained return value is
3829 * converted to a string.
3830 *
3831 * In all other cases, `null` is returned.
3832 *
3833 * @param {string} property
3834 * The name of the element property to use.
3835 *
3836 * @param {...*} fmt_args
3837 * Extra values to format the title string with.
3838 *
3839 * @returns {string|null}
3840 * The formatted title string or `null` if the property did not exist or
3841 * was neither a string nor a function.
3842 */
3843 titleFn: function(attr /*, ... */) {
3844 var s = null;
3845
3846 if (typeof(this[attr]) == 'function')
3847 s = this[attr].apply(this, this.varargs(arguments, 1));
3848 else if (typeof(this[attr]) == 'string')
3849 s = (arguments.length > 1) ? ''.format.apply(this[attr], this.varargs(arguments, 1)) : this[attr];
3850
3851 if (s != null)
3852 s = this.stripTags(String(s)).trim();
3853
3854 if (s == null || s == '')
3855 return null;
3856
3857 return s;
3858 }
3859 });
3860
3861 /**
3862 * @constructor Map
3863 * @memberof LuCI.form
3864 * @augments LuCI.form.AbstractElement
3865 *
3866 * @classdesc
3867 *
3868 * The `Map` class represents one complete form. A form usually maps one UCI
3869 * configuration file and is divided into multiple sections containing multiple
3870 * fields each.
3871 *
3872 * It serves as main entry point into the `LuCI.form` for typical view code.
3873 *
3874 * @param {string} config
3875 * The UCI configuration to map. It is automatically loaded along when the
3876 * resulting map instance.
3877 *
3878 * @param {string} [title]
3879 * The title caption of the form. A form title is usually rendered as separate
3880 * headline element before the actual form contents. If omitted, the
3881 * corresponding headline element will not be rendered.
3882 *
3883 * @param {string} [description]
3884 * The description text of the form which is usually rendered as text
3885 * paragraph below the form title and before the actual form contents.
3886 * If omitted, the corresponding paragraph element will not be rendered.
3887 */
3888 var CBIMap = CBIAbstractElement.extend(/** @lends LuCI.form.Map.prototype */ {
3889 __init__: function(config /*, ... */) {
3890 this.super('__init__', this.varargs(arguments, 1));
3891
3892 this.config = config;
3893 this.parsechain = [ config ];
3894 this.data = uci;
3895 },
3896
3897 /**
3898 * Toggle readonly state of the form.
3899 *
3900 * If set to `true`, the Map instance is marked readonly and any form
3901 * option elements added to it will inherit the readonly state.
3902 *
3903 * If left unset, the Map will test the access permission of the primary
3904 * uci configuration upon loading and mark the form readonly if no write
3905 * permissions are granted.
3906 *
3907 * @name LuCI.form.Map.prototype#readonly
3908 * @type boolean
3909 */
3910
3911 /**
3912 * Find all DOM nodes within this Map which match the given search
3913 * parameters. This function is essentially a convenience wrapper around
3914 * `querySelectorAll()`.
3915 *
3916 * This function is sensitive to the amount of arguments passed to it;
3917 * if only one argument is specified, it is used as selector-expression
3918 * as-is. When two arguments are passed, the first argument is treated
3919 * as attribute name, the second one as attribute value to match.
3920 *
3921 * As an example, `map.findElements('input')` would find all `&lt;input>`
3922 * nodes while `map.findElements('type', 'text')` would find any DOM node
3923 * with a `type="text"` attribute.
3924 *
3925 * @param {string} selector_or_attrname
3926 * If invoked with only one parameter, this argument is a
3927 * `querySelectorAll()` compatible selector expression. If invoked with
3928 * two parameters, this argument is the attribute name to filter for.
3929 *
3930 * @param {string} [attrvalue]
3931 * In case the function is invoked with two parameters, this argument
3932 * specifies the attribute value to match.
3933 *
3934 * @throws {InternalError}
3935 * Throws an `InternalError` if more than two function parameters are
3936 * passed.
3937 *
3938 * @returns {NodeList}
3939 * Returns a (possibly empty) DOM `NodeList` containing the found DOM nodes.
3940 */
3941 findElements: function(/* ... */) {
3942 var q = null;
3943
3944 if (arguments.length == 1)
3945 q = arguments[0];
3946 else if (arguments.length == 2)
3947 q = '[%s="%s"]'.format(arguments[0], arguments[1]);
3948 else
3949 L.error('InternalError', 'Expecting one or two arguments to findElements()');
3950
3951 return this.root.querySelectorAll(q);
3952 },
3953
3954 /**
3955 * Find the first DOM node within this Map which matches the given search
3956 * parameters. This function is essentially a convenience wrapper around
3957 * `findElements()` which only returns the first found node.
3958 *
3959 * This function is sensitive to the amount of arguments passed to it;
3960 * if only one argument is specified, it is used as selector-expression
3961 * as-is. When two arguments are passed, the first argument is treated
3962 * as attribute name, the second one as attribute value to match.
3963 *
3964 * As an example, `map.findElement('input')` would find the first `&lt;input>`
3965 * node while `map.findElement('type', 'text')` would find the first DOM
3966 * node with a `type="text"` attribute.
3967 *
3968 * @param {string} selector_or_attrname
3969 * If invoked with only one parameter, this argument is a `querySelector()`
3970 * compatible selector expression. If invoked with two parameters, this
3971 * argument is the attribute name to filter for.
3972 *
3973 * @param {string} [attrvalue]
3974 * In case the function is invoked with two parameters, this argument
3975 * specifies the attribute value to match.
3976 *
3977 * @throws {InternalError}
3978 * Throws an `InternalError` if more than two function parameters are
3979 * passed.
3980 *
3981 * @returns {Node|null}
3982 * Returns the first found DOM node or `null` if no element matched.
3983 */
3984 findElement: function(/* ... */) {
3985 var res = this.findElements.apply(this, arguments);
3986 return res.length ? res[0] : null;
3987 },
3988
3989 /**
3990 * Tie another UCI configuration to the map.
3991 *
3992 * By default, a map instance will only load the UCI configuration file
3993 * specified in the constructor but sometimes access to values from
3994 * further configuration files is required. This function allows for such
3995 * use cases by registering further UCI configuration files which are
3996 * needed by the map.
3997 *
3998 * @param {string} config
3999 * The additional UCI configuration file to tie to the map. If the given
4000 * config already is in the list of required files, it will be ignored.
4001 */
4002 chain: function(config) {
4003 if (this.parsechain.indexOf(config) == -1)
4004 this.parsechain.push(config);
4005 },
4006
4007 /**
4008 * Add a configuration section to the map.
4009 *
4010 * LuCI forms follow the structure of the underlying UCI configurations,
4011 * means that a map, which represents a single UCI configuration, is
4012 * divided into multiple sections which in turn contain an arbitrary
4013 * number of options.
4014 *
4015 * While UCI itself only knows two kinds of sections - named and anonymous
4016 * ones - the form class offers various flavors of form section elements
4017 * to present configuration sections in different ways. Refer to the
4018 * documentation of the different section classes for details.
4019 *
4020 * @param {LuCI.form.AbstractSection} sectionclass
4021 * The section class to use for rendering the configuration section.
4022 * Note that this value must be the class itself, not a class instance
4023 * obtained from calling `new`. It must also be a class derived from
4024 * `LuCI.form.AbstractSection`.
4025 *
4026 * @param {...string} classargs
4027 * Additional arguments which are passed as-is to the constructor of the
4028 * given section class. Refer to the class specific constructor
4029 * documentation for details.
4030 *
4031 * @returns {LuCI.form.AbstractSection}
4032 * Returns the instantiated section class instance.
4033 */
4034 section: function(cbiClass /*, ... */) {
4035 if (!CBIAbstractSection.isSubclass(cbiClass))
4036 L.error('TypeError', 'Class must be a descendent of CBIAbstractSection');
4037
4038 var obj = cbiClass.instantiate(this.varargs(arguments, 1, this));
4039 this.append(obj);
4040 return obj;
4041 },
4042
4043 /**
4044 * Load the configuration covered by this map.
4045 *
4046 * The `load()` function first loads all referenced UCI configurations,
4047 * then it recursively walks the form element tree and invokes the
4048 * load function of each child element.
4049 *
4050 * @returns {Promise&lt;void>}
4051 * Returns a promise resolving once the entire form completed loading all
4052 * data. The promise may reject with an error if any configuration failed
4053 * to load or if any of the child elements load functions rejected with
4054 * an error.
4055 */
4056 load: function() {
4057 var doCheckACL = (!(this instanceof CBIJSONMap) &amp;&amp; this.readonly == null),
4058 loadTasks = [ doCheckACL ? callSessionAccess('uci', this.config, 'write') : true ],
4059 configs = this.parsechain || [ this.config ];
4060
4061 loadTasks.push.apply(loadTasks, configs.map(L.bind(function(config, i) {
4062 return i ? L.resolveDefault(this.data.load(config)) : this.data.load(config);
4063 }, this)));
4064
4065 return Promise.all(loadTasks).then(L.bind(function(res) {
4066 if (res[0] === false)
4067 this.readonly = true;
4068
4069 return this.loadChildren();
4070 }, this));
4071 },
4072
4073 /**
4074 * Parse the form input values.
4075 *
4076 * The `parse()` function recursively walks the form element tree and
4077 * triggers input value reading and validation for each child element.
4078 *
4079 * Elements which are hidden due to unsatisfied dependencies are skipped.
4080 *
4081 * @returns {Promise&lt;void>}
4082 * Returns a promise resolving once the entire form completed parsing all
4083 * input values. The returned promise is rejected if any parsed values are
4084 * not meeting the validation constraints of their respective elements.
4085 */
4086 parse: function() {
4087 var tasks = [];
4088
4089 if (Array.isArray(this.children))
4090 for (var i = 0; i &lt; this.children.length; i++)
4091 tasks.push(this.children[i].parse());
4092
4093 return Promise.all(tasks);
4094 },
4095
4096 /**
4097 * Save the form input values.
4098 *
4099 * This function parses the current form, saves the resulting UCI changes,
4100 * reloads the UCI configuration data and redraws the form elements.
4101 *
4102 * @param {function} [cb]
4103 * An optional callback function that is invoked after the form is parsed
4104 * but before the changed UCI data is saved. This is useful to perform
4105 * additional data manipulation steps before saving the changes.
4106 *
4107 * @param {boolean} [silent=false]
4108 * If set to `true`, trigger an alert message to the user in case saving
4109 * the form data failures. Otherwise fail silently.
4110 *
4111 * @returns {Promise&lt;void>}
4112 * Returns a promise resolving once the entire save operation is complete.
4113 * The returned promise is rejected if any step of the save operation
4114 * failed.
4115 */
4116 save: function(cb, silent) {
4117 this.checkDepends();
4118
4119 return this.parse()
4120 .then(cb)
4121 .then(this.data.save.bind(this.data))
4122 .then(this.load.bind(this))
4123 .catch(function(e) {
4124 if (!silent) {
4125 ui.showModal(_('Save error'), [
4126 E('p', {}, [ _('An error occurred while saving the form:') ]),
4127 E('p', {}, [ E('em', { 'style': 'white-space:pre-wrap' }, [ e.message ]) ]),
4128 E('div', { 'class': 'right' }, [
4129 E('button', { 'class': 'cbi-button', 'click': ui.hideModal }, [ _('Dismiss') ])
4130 ])
4131 ]);
4132 }
4133
4134 return Promise.reject(e);
4135 }).then(this.renderContents.bind(this));
4136 },
4137
4138 /**
4139 * Reset the form by re-rendering its contents. This will revert all
4140 * unsaved user inputs to their initial form state.
4141 *
4142 * @returns {Promise&lt;Node>}
4143 * Returns a promise resolving to the toplevel form DOM node once the
4144 * re-rendering is complete.
4145 */
4146 reset: function() {
4147 return this.renderContents();
4148 },
4149
4150 /**
4151 * Render the form markup.
4152 *
4153 * @returns {Promise&lt;Node>}
4154 * Returns a promise resolving to the toplevel form DOM node once the
4155 * rendering is complete.
4156 */
4157 render: function() {
4158 return this.load().then(this.renderContents.bind(this));
4159 },
4160
4161 /** @private */
4162 renderContents: function() {
4163 var mapEl = this.root || (this.root = E('div', {
4164 'id': 'cbi-%s'.format(this.config),
4165 'class': 'cbi-map',
4166 'cbi-dependency-check': L.bind(this.checkDepends, this)
4167 }));
4168
4169 dom.bindClassInstance(mapEl, this);
4170
4171 return this.renderChildren(null).then(L.bind(function(nodes) {
4172 var initialRender = !mapEl.firstChild;
4173
4174 dom.content(mapEl, null);
4175
4176 if (this.title != null &amp;&amp; this.title != '')
4177 mapEl.appendChild(E('h2', { 'name': 'content' }, this.title));
4178
4179 if (this.description != null &amp;&amp; this.description != '')
4180 mapEl.appendChild(E('div', { 'class': 'cbi-map-descr' }, this.description));
4181
4182 if (this.tabbed)
4183 dom.append(mapEl, E('div', { 'class': 'cbi-map-tabbed' }, nodes));
4184 else
4185 dom.append(mapEl, nodes);
4186
4187 if (!initialRender) {
4188 mapEl.classList.remove('flash');
4189
4190 window.setTimeout(function() {
4191 mapEl.classList.add('flash');
4192 }, 1);
4193 }
4194
4195 this.checkDepends();
4196
4197 var tabGroups = mapEl.querySelectorAll('.cbi-map-tabbed, .cbi-section-node-tabbed');
4198
4199 for (var i = 0; i &lt; tabGroups.length; i++)
4200 ui.tabs.initTabGroup(tabGroups[i].childNodes);
4201
4202 return mapEl;
4203 }, this));
4204 },
4205
4206 /**
4207 * Find a form option element instance.
4208 *
4209 * @param {string} name
4210 * The name or the full ID of the option element to look up.
4211 *
4212 * @param {string} [section_id]
4213 * The ID of the UCI section containing the option to look up. May be
4214 * omitted if a full ID is passed as first argument.
4215 *
4216 * @param {string} [config_name]
4217 * The name of the UCI configuration the option instance belongs to.
4218 * Defaults to the main UCI configuration of the map if omitted.
4219 *
4220 * @returns {Array&lt;LuCI.form.AbstractValue,string>|null}
4221 * Returns a two-element array containing the form option instance as
4222 * first item and the corresponding UCI section ID as second item.
4223 * Returns `null` if the option could not be found.
4224 */
4225 lookupOption: function(name, section_id, config_name) {
4226 var id, elem, sid, inst;
4227
4228 if (name.indexOf('.') > -1)
4229 id = 'cbid.%s'.format(name);
4230 else
4231 id = 'cbid.%s.%s.%s'.format(config_name || this.config, section_id, name);
4232
4233 elem = this.findElement('data-field', id);
4234 sid = elem ? id.split(/\./)[2] : null;
4235 inst = elem ? dom.findClassInstance(elem) : null;
4236
4237 return (inst instanceof CBIAbstractValue) ? [ inst, sid ] : null;
4238 },
4239
4240 /** @private */
4241 checkDepends: function(ev, n) {
4242 var changed = false;
4243
4244 for (var i = 0, s = this.children[0]; (s = this.children[i]) != null; i++)
4245 if (s.checkDepends(ev, n))
4246 changed = true;
4247
4248 if (changed &amp;&amp; (n || 0) &lt; 10)
4249 this.checkDepends(ev, (n || 10) + 1);
4250
4251 ui.tabs.updateTabs(ev, this.root);
4252 },
4253
4254 /** @private */
4255 isDependencySatisfied: function(depends, config_name, section_id) {
4256 var def = false;
4257
4258 if (!Array.isArray(depends) || !depends.length)
4259 return true;
4260
4261 for (var i = 0; i &lt; depends.length; i++) {
4262 var istat = true,
4263 reverse = depends[i]['!reverse'],
4264 contains = depends[i]['!contains'];
4265
4266 for (var dep in depends[i]) {
4267 if (dep == '!reverse' || dep == '!contains') {
4268 continue;
4269 }
4270 else if (dep == '!default') {
4271 def = true;
4272 istat = false;
4273 }
4274 else {
4275 var res = this.lookupOption(dep, section_id, config_name),
4276 val = (res &amp;&amp; res[0].isActive(res[1])) ? res[0].formvalue(res[1]) : null;
4277
4278 var equal = contains
4279 ? isContained(val, depends[i][dep])
4280 : isEqual(val, depends[i][dep]);
4281
4282 istat = (istat &amp;&amp; equal);
4283 }
4284 }
4285
4286 if (istat ^ reverse)
4287 return true;
4288 }
4289
4290 return def;
4291 }
4292 });
4293
4294 /**
4295 * @constructor JSONMap
4296 * @memberof LuCI.form
4297 * @augments LuCI.form.Map
4298 *
4299 * @classdesc
4300 *
4301 * A `JSONMap` class functions similar to [LuCI.form.Map]{@link LuCI.form.Map}
4302 * but uses a multidimensional JavaScript object instead of UCI configuration
4303 * as data source.
4304 *
4305 * @param {Object&lt;string, Object&lt;string, *>|Array&lt;Object&lt;string, *>>>} data
4306 * The JavaScript object to use as data source. Internally, the object is
4307 * converted into an UCI-like format. Its toplevel keys are treated like UCI
4308 * section types while the object or array-of-object values are treated as
4309 * section contents.
4310 *
4311 * @param {string} [title]
4312 * The title caption of the form. A form title is usually rendered as separate
4313 * headline element before the actual form contents. If omitted, the
4314 * corresponding headline element will not be rendered.
4315 *
4316 * @param {string} [description]
4317 * The description text of the form which is usually rendered as text
4318 * paragraph below the form title and before the actual form contents.
4319 * If omitted, the corresponding paragraph element will not be rendered.
4320 */
4321 var CBIJSONMap = CBIMap.extend(/** @lends LuCI.form.JSONMap.prototype */ {
4322 __init__: function(data /*, ... */) {
4323 this.super('__init__', this.varargs(arguments, 1, 'json'));
4324
4325 this.config = 'json';
4326 this.parsechain = [ 'json' ];
4327 this.data = new CBIJSONConfig(data);
4328 }
4329 });
4330
4331 /**
4332 * @class AbstractSection
4333 * @memberof LuCI.form
4334 * @augments LuCI.form.AbstractElement
4335 * @hideconstructor
4336 * @classdesc
4337 *
4338 * The `AbstractSection` class serves as abstract base for the different form
4339 * section styles implemented by `LuCI.form`. It provides the common logic for
4340 * enumerating underlying configuration section instances, for registering
4341 * form options and for handling tabs to segment child options.
4342 *
4343 * This class is private and not directly accessible by user code.
4344 */
4345 var CBIAbstractSection = CBIAbstractElement.extend(/** @lends LuCI.form.AbstractSection.prototype */ {
4346 __init__: function(map, sectionType /*, ... */) {
4347 this.super('__init__', this.varargs(arguments, 2));
4348
4349 this.sectiontype = sectionType;
4350 this.map = map;
4351 this.config = map.config;
4352
4353 this.optional = true;
4354 this.addremove = false;
4355 this.dynamic = false;
4356 },
4357
4358 /**
4359 * Access the parent option container instance.
4360 *
4361 * In case this section is nested within an option element container,
4362 * this property will hold a reference to the parent option instance.
4363 *
4364 * If this section is not nested, the property is `null`.
4365 *
4366 * @name LuCI.form.AbstractSection.prototype#parentoption
4367 * @type LuCI.form.AbstractValue
4368 * @readonly
4369 */
4370
4371 /**
4372 * Enumerate the UCI section IDs covered by this form section element.
4373 *
4374 * @abstract
4375 * @throws {InternalError}
4376 * Throws an `InternalError` exception if the function is not implemented.
4377 *
4378 * @returns {string[]}
4379 * Returns an array of UCI section IDs covered by this form element.
4380 * The sections will be rendered in the same order as the returned array.
4381 */
4382 cfgsections: function() {
4383 L.error('InternalError', 'Not implemented');
4384 },
4385
4386 /**
4387 * Filter UCI section IDs to render.
4388 *
4389 * The filter function is invoked for each UCI section ID of a given type
4390 * and controls whether the given UCI section is rendered or ignored by
4391 * the form section element.
4392 *
4393 * The default implementation always returns `true`. User code or
4394 * classes extending `AbstractSection` may overwrite this function with
4395 * custom implementations.
4396 *
4397 * @abstract
4398 * @param {string} section_id
4399 * The UCI section ID to test.
4400 *
4401 * @returns {boolean}
4402 * Returns `true` when the given UCI section ID should be handled and
4403 * `false` when it should be ignored.
4404 */
4405 filter: function(section_id) {
4406 return true;
4407 },
4408
4409 /**
4410 * Load the configuration covered by this section.
4411 *
4412 * The `load()` function recursively walks the section element tree and
4413 * invokes the load function of each child option element.
4414 *
4415 * @returns {Promise&lt;void>}
4416 * Returns a promise resolving once the values of all child elements have
4417 * been loaded. The promise may reject with an error if any of the child
4418 * elements load functions rejected with an error.
4419 */
4420 load: function() {
4421 var section_ids = this.cfgsections(),
4422 tasks = [];
4423
4424 if (Array.isArray(this.children))
4425 for (var i = 0; i &lt; section_ids.length; i++)
4426 tasks.push(this.loadChildren(section_ids[i])
4427 .then(Function.prototype.bind.call(function(section_id, set_values) {
4428 for (var i = 0; i &lt; set_values.length; i++)
4429 this.children[i].cfgvalue(section_id, set_values[i]);
4430 }, this, section_ids[i])));
4431
4432 return Promise.all(tasks);
4433 },
4434
4435 /**
4436 * Parse this sections form input.
4437 *
4438 * The `parse()` function recursively walks the section element tree and
4439 * triggers input value reading and validation for each encountered child
4440 * option element.
4441 *
4442 * Options which are hidden due to unsatisfied dependencies are skipped.
4443 *
4444 * @returns {Promise&lt;void>}
4445 * Returns a promise resolving once the values of all child elements have
4446 * been parsed. The returned promise is rejected if any parsed values are
4447 * not meeting the validation constraints of their respective elements.
4448 */
4449 parse: function() {
4450 var section_ids = this.cfgsections(),
4451 tasks = [];
4452
4453 if (Array.isArray(this.children))
4454 for (var i = 0; i &lt; section_ids.length; i++)
4455 for (var j = 0; j &lt; this.children.length; j++)
4456 tasks.push(this.children[j].parse(section_ids[i]));
4457
4458 return Promise.all(tasks);
4459 },
4460
4461 /**
4462 * Add an option tab to the section.
4463 *
4464 * The child option elements of a section may be divided into multiple
4465 * tabs to provide a better overview to the user.
4466 *
4467 * Before options can be moved into a tab pane, the corresponding tab
4468 * has to be defined first, which is done by calling this function.
4469 *
4470 * Note that once tabs are defined, user code must use the `taboption()`
4471 * method to add options to specific tabs. Option elements added by
4472 * `option()` will not be assigned to any tab and not be rendered in this
4473 * case.
4474 *
4475 * @param {string} name
4476 * The name of the tab to register. It may be freely chosen and just serves
4477 * as an identifier to differentiate tabs.
4478 *
4479 * @param {string} title
4480 * The human readable caption of the tab.
4481 *
4482 * @param {string} [description]
4483 * An additional description text for the corresponding tab pane. It is
4484 * displayed as text paragraph below the tab but before the tab pane
4485 * contents. If omitted, no description will be rendered.
4486 *
4487 * @throws {Error}
4488 * Throws an exception if a tab with the same `name` already exists.
4489 */
4490 tab: function(name, title, description) {
4491 if (this.tabs &amp;&amp; this.tabs[name])
4492 throw 'Tab already declared';
4493
4494 var entry = {
4495 name: name,
4496 title: title,
4497 description: description,
4498 children: []
4499 };
4500
4501 this.tabs = this.tabs || [];
4502 this.tabs.push(entry);
4503 this.tabs[name] = entry;
4504
4505 this.tab_names = this.tab_names || [];
4506 this.tab_names.push(name);
4507 },
4508
4509 /**
4510 * Add a configuration option widget to the section.
4511 *
4512 * Note that [taboption()]{@link LuCI.form.AbstractSection#taboption}
4513 * should be used instead if this form section element uses tabs.
4514 *
4515 * @param {LuCI.form.AbstractValue} optionclass
4516 * The option class to use for rendering the configuration option. Note
4517 * that this value must be the class itself, not a class instance obtained
4518 * from calling `new`. It must also be a class derived from
4519 * [LuCI.form.AbstractSection]{@link LuCI.form.AbstractSection}.
4520 *
4521 * @param {...*} classargs
4522 * Additional arguments which are passed as-is to the constructor of the
4523 * given option class. Refer to the class specific constructor
4524 * documentation for details.
4525 *
4526 * @throws {TypeError}
4527 * Throws a `TypeError` exception in case the passed class value is not a
4528 * descendent of `AbstractValue`.
4529 *
4530 * @returns {LuCI.form.AbstractValue}
4531 * Returns the instantiated option class instance.
4532 */
4533 option: function(cbiClass /*, ... */) {
4534 if (!CBIAbstractValue.isSubclass(cbiClass))
4535 throw L.error('TypeError', 'Class must be a descendent of CBIAbstractValue');
4536
4537 var obj = cbiClass.instantiate(this.varargs(arguments, 1, this.map, this));
4538 this.append(obj);
4539 return obj;
4540 },
4541
4542 /**
4543 * Add a configuration option widget to a tab of the section.
4544 *
4545 * @param {string} tabName
4546 * The name of the section tab to add the option element to.
4547 *
4548 * @param {LuCI.form.AbstractValue} optionclass
4549 * The option class to use for rendering the configuration option. Note
4550 * that this value must be the class itself, not a class instance obtained
4551 * from calling `new`. It must also be a class derived from
4552 * [LuCI.form.AbstractSection]{@link LuCI.form.AbstractSection}.
4553 *
4554 * @param {...*} classargs
4555 * Additional arguments which are passed as-is to the constructor of the
4556 * given option class. Refer to the class specific constructor
4557 * documentation for details.
4558 *
4559 * @throws {ReferenceError}
4560 * Throws a `ReferenceError` exception when the given tab name does not
4561 * exist.
4562 *
4563 * @throws {TypeError}
4564 * Throws a `TypeError` exception in case the passed class value is not a
4565 * descendent of `AbstractValue`.
4566 *
4567 * @returns {LuCI.form.AbstractValue}
4568 * Returns the instantiated option class instance.
4569 */
4570 taboption: function(tabName /*, ... */) {
4571 if (!this.tabs || !this.tabs[tabName])
4572 throw L.error('ReferenceError', 'Associated tab not declared');
4573
4574 var obj = this.option.apply(this, this.varargs(arguments, 1));
4575 obj.tab = tabName;
4576 this.tabs[tabName].children.push(obj);
4577 return obj;
4578 },
4579
4580 /**
4581 * Query underlying option configuration values.
4582 *
4583 * This function is sensitive to the amount of arguments passed to it;
4584 * if only one argument is specified, the configuration values of all
4585 * options within this section are returned as dictionary.
4586 *
4587 * If both the section ID and an option name are supplied, this function
4588 * returns the configuration value of the specified option only.
4589 *
4590 * @param {string} section_id
4591 * The configuration section ID
4592 *
4593 * @param {string} [option]
4594 * The name of the option to query
4595 *
4596 * @returns {null|string|string[]|Object&lt;string, null|string|string[]>}
4597 * Returns either a dictionary of option names and their corresponding
4598 * configuration values or just a single configuration value, depending
4599 * on the amount of passed arguments.
4600 */
4601 cfgvalue: function(section_id, option) {
4602 var rv = (arguments.length == 1) ? {} : null;
4603
4604 for (var i = 0, o; (o = this.children[i]) != null; i++)
4605 if (rv)
4606 rv[o.option] = o.cfgvalue(section_id);
4607 else if (o.option == option)
4608 return o.cfgvalue(section_id);
4609
4610 return rv;
4611 },
4612
4613 /**
4614 * Query underlying option widget input values.
4615 *
4616 * This function is sensitive to the amount of arguments passed to it;
4617 * if only one argument is specified, the widget input values of all
4618 * options within this section are returned as dictionary.
4619 *
4620 * If both the section ID and an option name are supplied, this function
4621 * returns the widget input value of the specified option only.
4622 *
4623 * @param {string} section_id
4624 * The configuration section ID
4625 *
4626 * @param {string} [option]
4627 * The name of the option to query
4628 *
4629 * @returns {null|string|string[]|Object&lt;string, null|string|string[]>}
4630 * Returns either a dictionary of option names and their corresponding
4631 * widget input values or just a single widget input value, depending
4632 * on the amount of passed arguments.
4633 */
4634 formvalue: function(section_id, option) {
4635 var rv = (arguments.length == 1) ? {} : null;
4636
4637 for (var i = 0, o; (o = this.children[i]) != null; i++) {
4638 var func = this.map.root ? this.children[i].formvalue : this.children[i].cfgvalue;
4639
4640 if (rv)
4641 rv[o.option] = func.call(o, section_id);
4642 else if (o.option == option)
4643 return func.call(o, section_id);
4644 }
4645
4646 return rv;
4647 },
4648
4649 /**
4650 * Obtain underlying option LuCI.ui widget instances.
4651 *
4652 * This function is sensitive to the amount of arguments passed to it;
4653 * if only one argument is specified, the LuCI.ui widget instances of all
4654 * options within this section are returned as dictionary.
4655 *
4656 * If both the section ID and an option name are supplied, this function
4657 * returns the LuCI.ui widget instance value of the specified option only.
4658 *
4659 * @param {string} section_id
4660 * The configuration section ID
4661 *
4662 * @param {string} [option]
4663 * The name of the option to query
4664 *
4665 * @returns {null|LuCI.ui.AbstractElement|Object&lt;string, null|LuCI.ui.AbstractElement>}
4666 * Returns either a dictionary of option names and their corresponding
4667 * widget input values or just a single widget input value, depending
4668 * on the amount of passed arguments.
4669 */
4670 getUIElement: function(section_id, option) {
4671 var rv = (arguments.length == 1) ? {} : null;
4672
4673 for (var i = 0, o; (o = this.children[i]) != null; i++)
4674 if (rv)
4675 rv[o.option] = o.getUIElement(section_id);
4676 else if (o.option == option)
4677 return o.getUIElement(section_id);
4678
4679 return rv;
4680 },
4681
4682 /**
4683 * Obtain underlying option objects.
4684 *
4685 * This function is sensitive to the amount of arguments passed to it;
4686 * if no option name is specified, all options within this section are
4687 * returned as dictionary.
4688 *
4689 * If an option name is supplied, this function returns the matching
4690 * LuCI.form.AbstractValue instance only.
4691 *
4692 * @param {string} [option]
4693 * The name of the option object to obtain
4694 *
4695 * @returns {null|LuCI.form.AbstractValue|Object&lt;string, LuCI.form.AbstractValue>}
4696 * Returns either a dictionary of option names and their corresponding
4697 * option instance objects or just a single object instance value,
4698 * depending on the amount of passed arguments.
4699 */
4700 getOption: function(option) {
4701 var rv = (arguments.length == 0) ? {} : null;
4702
4703 for (var i = 0, o; (o = this.children[i]) != null; i++)
4704 if (rv)
4705 rv[o.option] = o;
4706 else if (o.option == option)
4707 return o;
4708
4709 return rv;
4710 },
4711
4712 /** @private */
4713 renderUCISection: function(section_id) {
4714 var renderTasks = [];
4715
4716 if (!this.tabs)
4717 return this.renderOptions(null, section_id);
4718
4719 for (var i = 0; i &lt; this.tab_names.length; i++)
4720 renderTasks.push(this.renderOptions(this.tab_names[i], section_id));
4721
4722 return Promise.all(renderTasks)
4723 .then(this.renderTabContainers.bind(this, section_id));
4724 },
4725
4726 /** @private */
4727 renderTabContainers: function(section_id, nodes) {
4728 var config_name = this.uciconfig || this.map.config,
4729 containerEls = E([]);
4730
4731 for (var i = 0; i &lt; nodes.length; i++) {
4732 var tab_name = this.tab_names[i],
4733 tab_data = this.tabs[tab_name],
4734 containerEl = E('div', {
4735 'id': 'container.%s.%s.%s'.format(config_name, section_id, tab_name),
4736 'data-tab': tab_name,
4737 'data-tab-title': tab_data.title,
4738 'data-tab-active': tab_name === this.selected_tab
4739 });
4740
4741 if (tab_data.description != null &amp;&amp; tab_data.description != '')
4742 containerEl.appendChild(
4743 E('div', { 'class': 'cbi-tab-descr' }, tab_data.description));
4744
4745 containerEl.appendChild(nodes[i]);
4746 containerEls.appendChild(containerEl);
4747 }
4748
4749 return containerEls;
4750 },
4751
4752 /** @private */
4753 renderOptions: function(tab_name, section_id) {
4754 var in_table = (this instanceof CBITableSection);
4755 return this.renderChildren(tab_name, section_id, in_table).then(function(nodes) {
4756 var optionEls = E([]);
4757 for (var i = 0; i &lt; nodes.length; i++)
4758 optionEls.appendChild(nodes[i]);
4759 return optionEls;
4760 });
4761 },
4762
4763 /** @private */
4764 checkDepends: function(ev, n) {
4765 var changed = false,
4766 sids = this.cfgsections();
4767
4768 for (var i = 0, sid = sids[0]; (sid = sids[i]) != null; i++) {
4769 for (var j = 0, o = this.children[0]; (o = this.children[j]) != null; j++) {
4770 var isActive = o.isActive(sid),
4771 isSatisified = o.checkDepends(sid);
4772
4773 if (isActive != isSatisified) {
4774 o.setActive(sid, !isActive);
4775 isActive = !isActive;
4776 changed = true;
4777 }
4778
4779 if (!n &amp;&amp; isActive)
4780 o.triggerValidation(sid);
4781 }
4782 }
4783
4784 return changed;
4785 }
4786 });
4787
4788
4789 var isEqual = function(x, y) {
4790 if (typeof(y) == 'object' &amp;&amp; y instanceof RegExp)
4791 return (x == null) ? false : y.test(x);
4792
4793 if (x != null &amp;&amp; y != null &amp;&amp; typeof(x) != typeof(y))
4794 return false;
4795
4796 if ((x == null &amp;&amp; y != null) || (x != null &amp;&amp; y == null))
4797 return false;
4798
4799 if (Array.isArray(x)) {
4800 if (x.length != y.length)
4801 return false;
4802
4803 for (var i = 0; i &lt; x.length; i++)
4804 if (!isEqual(x[i], y[i]))
4805 return false;
4806 }
4807 else if (typeof(x) == 'object') {
4808 for (var k in x) {
4809 if (x.hasOwnProperty(k) &amp;&amp; !y.hasOwnProperty(k))
4810 return false;
4811
4812 if (!isEqual(x[k], y[k]))
4813 return false;
4814 }
4815
4816 for (var k in y)
4817 if (y.hasOwnProperty(k) &amp;&amp; !x.hasOwnProperty(k))
4818 return false;
4819 }
4820 else if (x != y) {
4821 return false;
4822 }
4823
4824 return true;
4825 };
4826
4827 var isContained = function(x, y) {
4828 if (Array.isArray(x)) {
4829 for (var i = 0; i &lt; x.length; i++)
4830 if (x[i] == y)
4831 return true;
4832 }
4833 else if (L.isObject(x)) {
4834 if (x.hasOwnProperty(y) &amp;&amp; x[y] != null)
4835 return true;
4836 }
4837 else if (typeof(x) == 'string') {
4838 return (x.indexOf(y) > -1);
4839 }
4840
4841 return false;
4842 };
4843
4844 /**
4845 * @class AbstractValue
4846 * @memberof LuCI.form
4847 * @augments LuCI.form.AbstractElement
4848 * @hideconstructor
4849 * @classdesc
4850 *
4851 * The `AbstractValue` class serves as abstract base for the different form
4852 * option styles implemented by `LuCI.form`. It provides the common logic for
4853 * handling option input values, for dependencies among options and for
4854 * validation constraints that should be applied to entered values.
4855 *
4856 * This class is private and not directly accessible by user code.
4857 */
4858 var CBIAbstractValue = CBIAbstractElement.extend(/** @lends LuCI.form.AbstractValue.prototype */ {
4859 __init__: function(map, section, option /*, ... */) {
4860 this.super('__init__', this.varargs(arguments, 3));
4861
4862 this.section = section;
4863 this.option = option;
4864 this.map = map;
4865 this.config = map.config;
4866
4867 this.deps = [];
4868 this.initial = {};
4869 this.rmempty = true;
4870 this.default = null;
4871 this.size = null;
4872 this.optional = false;
4873 this.retain = false;
4874 },
4875
4876 /**
4877 * If set to `false`, the underlying option value is retained upon saving
4878 * the form when the option element is disabled due to unsatisfied
4879 * dependency constraints.
4880 *
4881 * @name LuCI.form.AbstractValue.prototype#rmempty
4882 * @type boolean
4883 * @default true
4884 */
4885
4886 /**
4887 * If set to `true`, the underlying ui input widget is allowed to be empty,
4888 * otherwise the option element is marked invalid when no value is entered
4889 * or selected by the user.
4890 *
4891 * @name LuCI.form.AbstractValue.prototype#optional
4892 * @type boolean
4893 * @default false
4894 */
4895
4896 /**
4897 * If set to `true`, the underlying ui input widget value is not cleared
4898 * from the configuration on unsatisfied dependencies. The default behavior
4899 * is to remove the values of all options whose dependencies are not
4900 * fulfilled.
4901 *
4902 * @name LuCI.form.AbstractValue.prototype#retain
4903 * @type boolean
4904 * @default false
4905 */
4906
4907 /**
4908 * Sets a default value to use when the underlying UCI option is not set.
4909 *
4910 * @name LuCI.form.AbstractValue.prototype#default
4911 * @type *
4912 * @default null
4913 */
4914
4915 /**
4916 * Specifies a datatype constraint expression to validate input values
4917 * against. Refer to {@link LuCI.validation} for details on the format.
4918 *
4919 * If the user entered input does not match the datatype validation, the
4920 * option element is marked as invalid.
4921 *
4922 * @name LuCI.form.AbstractValue.prototype#datatype
4923 * @type string
4924 * @default null
4925 */
4926
4927 /**
4928 * Specifies a custom validation function to test the user input for
4929 * validity. The validation function must return `true` to accept the
4930 * value. Any other return value type is converted to a string and
4931 * displayed to the user as validation error message.
4932 *
4933 * If the user entered input does not pass the validation function, the
4934 * option element is marked as invalid.
4935 *
4936 * @name LuCI.form.AbstractValue.prototype#validate
4937 * @type function
4938 * @default null
4939 */
4940
4941 /**
4942 * Override the UCI configuration name to read the option value from.
4943 *
4944 * By default, the configuration name is inherited from the parent Map.
4945 * By setting this property, a deviating configuration may be specified.
4946 *
4947 * The default is null, means inheriting from the parent form.
4948 *
4949 * @name LuCI.form.AbstractValue.prototype#uciconfig
4950 * @type string
4951 * @default null
4952 */
4953
4954 /**
4955 * Override the UCI section name to read the option value from.
4956 *
4957 * By default, the section ID is inherited from the parent section element.
4958 * By setting this property, a deviating section may be specified.
4959 *
4960 * The default is null, means inheriting from the parent section.
4961 *
4962 * @name LuCI.form.AbstractValue.prototype#ucisection
4963 * @type string
4964 * @default null
4965 */
4966
4967 /**
4968 * Override the UCI option name to read the value from.
4969 *
4970 * By default, the elements name, which is passed as third argument to
4971 * the constructor, is used as UCI option name. By setting this property,
4972 * a deviating UCI option may be specified.
4973 *
4974 * The default is null, means using the option element name.
4975 *
4976 * @name LuCI.form.AbstractValue.prototype#ucioption
4977 * @type string
4978 * @default null
4979 */
4980
4981 /**
4982 * Mark grid section option element as editable.
4983 *
4984 * Options which are displayed in the table portion of a `GridSection`
4985 * instance are rendered as readonly text by default. By setting the
4986 * `editable` property of a child option element to `true`, that element
4987 * is rendered as full input widget within its cell instead of a text only
4988 * preview.
4989 *
4990 * This property has no effect on options that are not children of grid
4991 * section elements.
4992 *
4993 * @name LuCI.form.AbstractValue.prototype#editable
4994 * @type boolean
4995 * @default false
4996 */
4997
4998 /**
4999 * Move grid section option element into the table, the modal popup or both.
5000 *
5001 * If this property is `null` (the default), the option element is
5002 * displayed in both the table preview area and the per-section instance
5003 * modal popup of a grid section. When it is set to `false` the option
5004 * is only shown in the table but not the modal popup. When set to `true`,
5005 * the option is only visible in the modal popup but not the table.
5006 *
5007 * This property has no effect on options that are not children of grid
5008 * section elements.
5009 *
5010 * @name LuCI.form.AbstractValue.prototype#modalonly
5011 * @type boolean
5012 * @default null
5013 */
5014
5015 /**
5016 * Make option element readonly.
5017 *
5018 * This property defaults to the readonly state of the parent form element.
5019 * When set to `true`, the underlying widget is rendered in disabled state,
5020 * means its contents cannot be changed and the widget cannot be interacted
5021 * with.
5022 *
5023 * @name LuCI.form.AbstractValue.prototype#readonly
5024 * @type boolean
5025 * @default false
5026 */
5027
5028 /**
5029 * Override the cell width of a table or grid section child option.
5030 *
5031 * If the property is set to a numeric value, it is treated as pixel width
5032 * which is set on the containing cell element of the option, essentially
5033 * forcing a certain column width. When the property is set to a string
5034 * value, it is applied as-is to the CSS `width` property.
5035 *
5036 * This property has no effect on options that are not children of grid or
5037 * table section elements.
5038 *
5039 * @name LuCI.form.AbstractValue.prototype#width
5040 * @type number|string
5041 * @default null
5042 */
5043
5044 /**
5045 * Register a custom value change handler.
5046 *
5047 * If this property is set to a function value, the function is invoked
5048 * whenever the value of the underlying UI input element is changing.
5049 *
5050 * The invoked handler function will receive the DOM click element as
5051 * first and the underlying configuration section ID as well as the input
5052 * value as second and third argument respectively.
5053 *
5054 * @name LuCI.form.AbstractValue.prototype#onchange
5055 * @type function
5056 * @default null
5057 */
5058
5059 /**
5060 * Add a dependency constraint to the option.
5061 *
5062 * Dependency constraints allow making the presence of option elements
5063 * dependent on the current values of certain other options within the
5064 * same form. An option element with unsatisfied dependencies will be
5065 * hidden from the view and its current value is omitted when saving.
5066 *
5067 * Multiple constraints (that is, multiple calls to `depends()`) are
5068 * treated as alternatives, forming a logical "or" expression.
5069 *
5070 * By passing an object of name => value pairs as first argument, it is
5071 * possible to depend on multiple options simultaneously, allowing to form
5072 * a logical "and" expression.
5073 *
5074 * Option names may be given in "dot notation" which allows to reference
5075 * option elements outside the current form section. If a name without
5076 * dot is specified, it refers to an option within the same configuration
5077 * section. If specified as &lt;code>configname.sectionid.optionname&lt;/code>,
5078 * options anywhere within the same form may be specified.
5079 *
5080 * The object notation also allows for a number of special keys which are
5081 * not treated as option names but as modifiers to influence the dependency
5082 * constraint evaluation. The associated value of these special "tag" keys
5083 * is ignored. The recognized tags are:
5084 *
5085 * &lt;ul>
5086 * &lt;li>
5087 * &lt;code>!reverse&lt;/code>&lt;br>
5088 * Invert the dependency, instead of requiring another option to be
5089 * equal to the dependency value, that option should &lt;em>not&lt;/em> be
5090 * equal.
5091 * &lt;/li>
5092 * &lt;li>
5093 * &lt;code>!contains&lt;/code>&lt;br>
5094 * Instead of requiring an exact match, the dependency is considered
5095 * satisfied when the dependency value is contained within the option
5096 * value.
5097 * &lt;/li>
5098 * &lt;li>
5099 * &lt;code>!default&lt;/code>&lt;br>
5100 * The dependency is always satisfied
5101 * &lt;/li>
5102 * &lt;/ul>
5103 *
5104 * Examples:
5105 *
5106 * &lt;ul>
5107 * &lt;li>
5108 * &lt;code>opt.depends("foo", "test")&lt;/code>&lt;br>
5109 * Require the value of `foo` to be `test`.
5110 * &lt;/li>
5111 * &lt;li>
5112 * &lt;code>opt.depends({ foo: "test" })&lt;/code>&lt;br>
5113 * Equivalent to the previous example.
5114 * &lt;/li>
5115 * &lt;li>
5116 * &lt;code>opt.depends({ foo: /test/ })&lt;/code>&lt;br>
5117 * Require the value of `foo` to match the regular expression `/test/`.
5118 * &lt;/li>
5119 * &lt;li>
5120 * &lt;code>opt.depends({ foo: "test", bar: "qrx" })&lt;/code>&lt;br>
5121 * Require the value of `foo` to be `test` and the value of `bar` to be
5122 * `qrx`.
5123 * &lt;/li>
5124 * &lt;li>
5125 * &lt;code>opt.depends({ foo: "test" })&lt;br>
5126 * opt.depends({ bar: "qrx" })&lt;/code>&lt;br>
5127 * Require either &lt;code>foo&lt;/code> to be set to &lt;code>test&lt;/code>,
5128 * &lt;em>or&lt;/em> the &lt;code>bar&lt;/code> option to be &lt;code>qrx&lt;/code>.
5129 * &lt;/li>
5130 * &lt;li>
5131 * &lt;code>opt.depends("test.section1.foo", "bar")&lt;/code>&lt;br>
5132 * Require the "foo" form option within the "section1" section to be
5133 * set to "bar".
5134 * &lt;/li>
5135 * &lt;li>
5136 * &lt;code>opt.depends({ foo: "test", "!contains": true })&lt;/code>&lt;br>
5137 * Require the "foo" option value to contain the substring "test".
5138 * &lt;/li>
5139 * &lt;/ul>
5140 *
5141 * @param {string|Object&lt;string, string|RegExp>} field
5142 * The name of the option to depend on or an object describing multiple
5143 * dependencies which must be satisfied (a logical "and" expression).
5144 *
5145 * @param {string|RegExp} value
5146 * When invoked with a plain option name as first argument, this parameter
5147 * specifies the expected value. In case an object is passed as first
5148 * argument, this parameter is ignored.
5149 */
5150 depends: function(field, value) {
5151 var deps;
5152
5153 if (typeof(field) === 'string')
5154 deps = {}, deps[field] = value;
5155 else
5156 deps = field;
5157
5158 this.deps.push(deps);
5159 },
5160
5161 /** @private */
5162 transformDepList: function(section_id, deplist) {
5163 var list = deplist || this.deps,
5164 deps = [];
5165
5166 if (Array.isArray(list)) {
5167 for (var i = 0; i &lt; list.length; i++) {
5168 var dep = {};
5169
5170 for (var k in list[i]) {
5171 if (list[i].hasOwnProperty(k)) {
5172 if (k.charAt(0) === '!')
5173 dep[k] = list[i][k];
5174 else if (k.indexOf('.') !== -1)
5175 dep['cbid.%s'.format(k)] = list[i][k];
5176 else
5177 dep['cbid.%s.%s.%s'.format(
5178 this.uciconfig || this.section.uciconfig || this.map.config,
5179 this.ucisection || section_id,
5180 k
5181 )] = list[i][k];
5182 }
5183 }
5184
5185 for (var k in dep) {
5186 if (dep.hasOwnProperty(k)) {
5187 deps.push(dep);
5188 break;
5189 }
5190 }
5191 }
5192 }
5193
5194 return deps;
5195 },
5196
5197 /** @private */
5198 transformChoices: function() {
5199 if (!Array.isArray(this.keylist) || this.keylist.length == 0)
5200 return null;
5201
5202 var choices = {};
5203
5204 for (var i = 0; i &lt; this.keylist.length; i++)
5205 choices[this.keylist[i]] = this.vallist[i];
5206
5207 return choices;
5208 },
5209
5210 /** @private */
5211 checkDepends: function(section_id) {
5212 var config_name = this.uciconfig || this.section.uciconfig || this.map.config,
5213 active = this.map.isDependencySatisfied(this.deps, config_name, section_id);
5214
5215 if (active)
5216 this.updateDefaultValue(section_id);
5217
5218 return active;
5219 },
5220
5221 /** @private */
5222 updateDefaultValue: function(section_id) {
5223 if (!L.isObject(this.defaults))
5224 return;
5225
5226 var config_name = this.uciconfig || this.section.uciconfig || this.map.config,
5227 cfgvalue = L.toArray(this.cfgvalue(section_id))[0],
5228 default_defval = null, satisified_defval = null;
5229
5230 for (var value in this.defaults) {
5231 if (!this.defaults[value] || this.defaults[value].length == 0) {
5232 default_defval = value;
5233 continue;
5234 }
5235 else if (this.map.isDependencySatisfied(this.defaults[value], config_name, section_id)) {
5236 satisified_defval = value;
5237 break;
5238 }
5239 }
5240
5241 if (satisified_defval == null)
5242 satisified_defval = default_defval;
5243
5244 var node = this.map.findElement('id', this.cbid(section_id));
5245 if (node &amp;&amp; node.getAttribute('data-changed') != 'true' &amp;&amp; satisified_defval != null &amp;&amp; cfgvalue == null)
5246 dom.callClassMethod(node, 'setValue', satisified_defval);
5247
5248 this.default = satisified_defval;
5249 },
5250
5251 /**
5252 * Obtain the internal ID ("cbid") of the element instance.
5253 *
5254 * Since each form section element may map multiple underlying
5255 * configuration sections, the configuration section ID is required to
5256 * form a fully qualified ID pointing to the specific element instance
5257 * within the given specific section.
5258 *
5259 * @param {string} section_id
5260 * The configuration section ID
5261 *
5262 * @throws {TypeError}
5263 * Throws a `TypeError` exception when no `section_id` was specified.
5264 *
5265 * @returns {string}
5266 * Returns the element ID.
5267 */
5268 cbid: function(section_id) {
5269 if (section_id == null)
5270 L.error('TypeError', 'Section ID required');
5271
5272 return 'cbid.%s.%s.%s'.format(
5273 this.uciconfig || this.section.uciconfig || this.map.config,
5274 section_id, this.option);
5275 },
5276
5277 /**
5278 * Load the underlying configuration value.
5279 *
5280 * The default implementation of this method reads and returns the
5281 * underlying UCI option value (or the related JavaScript property for
5282 * `JSONMap` instances). It may be overwritten by user code to load data
5283 * from nonstandard sources.
5284 *
5285 * @param {string} section_id
5286 * The configuration section ID
5287 *
5288 * @throws {TypeError}
5289 * Throws a `TypeError` exception when no `section_id` was specified.
5290 *
5291 * @returns {*|Promise&lt;*>}
5292 * Returns the configuration value to initialize the option element with.
5293 * The return value of this function is filtered through `Promise.resolve()`
5294 * so it may return promises if overridden by user code.
5295 */
5296 load: function(section_id) {
5297 if (section_id == null)
5298 L.error('TypeError', 'Section ID required');
5299
5300 return this.map.data.get(
5301 this.uciconfig || this.section.uciconfig || this.map.config,
5302 this.ucisection || section_id,
5303 this.ucioption || this.option);
5304 },
5305
5306 /**
5307 * Obtain the underlying `LuCI.ui` element instance.
5308 *
5309 * @param {string} section_id
5310 * The configuration section ID
5311 *
5312 * @throws {TypeError}
5313 * Throws a `TypeError` exception when no `section_id` was specified.
5314 *
5315 * @return {LuCI.ui.AbstractElement|null}
5316 * Returns the `LuCI.ui` element instance or `null` in case the form
5317 * option implementation does not use `LuCI.ui` widgets.
5318 */
5319 getUIElement: function(section_id) {
5320 var node = this.map.findElement('id', this.cbid(section_id)),
5321 inst = node ? dom.findClassInstance(node) : null;
5322 return (inst instanceof ui.AbstractElement) ? inst : null;
5323 },
5324
5325 /**
5326 * Query the underlying configuration value.
5327 *
5328 * The default implementation of this method returns the cached return
5329 * value of [load()]{@link LuCI.form.AbstractValue#load}. It may be
5330 * overwritten by user code to obtain the configuration value in a
5331 * different way.
5332 *
5333 * @param {string} section_id
5334 * The configuration section ID
5335 *
5336 * @throws {TypeError}
5337 * Throws a `TypeError` exception when no `section_id` was specified.
5338 *
5339 * @returns {*}
5340 * Returns the configuration value.
5341 */
5342 cfgvalue: function(section_id, set_value) {
5343 if (section_id == null)
5344 L.error('TypeError', 'Section ID required');
5345
5346 if (arguments.length == 2) {
5347 this.data = this.data || {};
5348 this.data[section_id] = set_value;
5349 }
5350
5351 return this.data ? this.data[section_id] : null;
5352 },
5353
5354 /**
5355 * Query the current form input value.
5356 *
5357 * The default implementation of this method returns the current input
5358 * value of the underlying [LuCI.ui]{@link LuCI.ui.AbstractElement} widget.
5359 * It may be overwritten by user code to handle input values differently.
5360 *
5361 * @param {string} section_id
5362 * The configuration section ID
5363 *
5364 * @throws {TypeError}
5365 * Throws a `TypeError` exception when no `section_id` was specified.
5366 *
5367 * @returns {*}
5368 * Returns the current input value.
5369 */
5370 formvalue: function(section_id) {
5371 var elem = this.getUIElement(section_id);
5372 return elem ? elem.getValue() : null;
5373 },
5374
5375 /**
5376 * Obtain a textual input representation.
5377 *
5378 * The default implementation of this method returns the HTML escaped
5379 * current input value of the underlying
5380 * [LuCI.ui]{@link LuCI.ui.AbstractElement} widget. User code or specific
5381 * option element implementations may overwrite this function to apply a
5382 * different logic, e.g. to return `Yes` or `No` depending on the checked
5383 * state of checkbox elements.
5384 *
5385 * @param {string} section_id
5386 * The configuration section ID
5387 *
5388 * @throws {TypeError}
5389 * Throws a `TypeError` exception when no `section_id` was specified.
5390 *
5391 * @returns {string}
5392 * Returns the text representation of the current input value.
5393 */
5394 textvalue: function(section_id) {
5395 var cval = this.cfgvalue(section_id);
5396
5397 if (cval == null)
5398 cval = this.default;
5399
5400 if (Array.isArray(cval))
5401 cval = cval.join(' ');
5402
5403 return (cval != null) ? '%h'.format(cval) : null;
5404 },
5405
5406 /**
5407 * Apply custom validation logic.
5408 *
5409 * This method is invoked whenever incremental validation is performed on
5410 * the user input, e.g. on keyup or blur events.
5411 *
5412 * The default implementation of this method does nothing and always
5413 * returns `true`. User code may overwrite this method to provide
5414 * additional validation logic which is not covered by data type
5415 * constraints.
5416 *
5417 * @abstract
5418 * @param {string} section_id
5419 * The configuration section ID
5420 *
5421 * @param {*} value
5422 * The value to validate
5423 *
5424 * @returns {*}
5425 * The method shall return `true` to accept the given value. Any other
5426 * return value is treated as failure, converted to a string and displayed
5427 * as error message to the user.
5428 */
5429 validate: function(section_id, value) {
5430 return true;
5431 },
5432
5433 /**
5434 * Test whether the input value is currently valid.
5435 *
5436 * @param {string} section_id
5437 * The configuration section ID
5438 *
5439 * @returns {boolean}
5440 * Returns `true` if the input value currently is valid, otherwise it
5441 * returns `false`.
5442 */
5443 isValid: function(section_id) {
5444 var elem = this.getUIElement(section_id);
5445 return elem ? elem.isValid() : true;
5446 },
5447
5448 /**
5449 * Returns the current validation error for this input.
5450 *
5451 * @param {string} section_id
5452 * The configuration section ID
5453 *
5454 * @returns {string}
5455 * The validation error at this time
5456 */
5457 getValidationError: function (section_id) {
5458 var elem = this.getUIElement(section_id);
5459 return elem ? elem.getValidationError() : '';
5460 },
5461
5462 /**
5463 * Test whether the option element is currently active.
5464 *
5465 * An element is active when it is not hidden due to unsatisfied dependency
5466 * constraints.
5467 *
5468 * @param {string} section_id
5469 * The configuration section ID
5470 *
5471 * @returns {boolean}
5472 * Returns `true` if the option element currently is active, otherwise it
5473 * returns `false`.
5474 */
5475 isActive: function(section_id) {
5476 var field = this.map.findElement('data-field', this.cbid(section_id));
5477 return (field != null &amp;&amp; !field.classList.contains('hidden'));
5478 },
5479
5480 /** @private */
5481 setActive: function(section_id, active) {
5482 var field = this.map.findElement('data-field', this.cbid(section_id));
5483
5484 if (field &amp;&amp; field.classList.contains('hidden') == active) {
5485 field.classList[active ? 'remove' : 'add']('hidden');
5486
5487 if (dom.matches(field.parentNode, '.td.cbi-value-field'))
5488 field.parentNode.classList[active ? 'remove' : 'add']('inactive');
5489
5490 return true;
5491 }
5492
5493 return false;
5494 },
5495
5496 /** @private */
5497 triggerValidation: function(section_id) {
5498 var elem = this.getUIElement(section_id);
5499 return elem ? elem.triggerValidation() : true;
5500 },
5501
5502 /**
5503 * Parse the option element input.
5504 *
5505 * The function is invoked when the `parse()` method has been invoked on
5506 * the parent form and triggers input value reading and validation.
5507 *
5508 * @param {string} section_id
5509 * The configuration section ID
5510 *
5511 * @returns {Promise&lt;void>}
5512 * Returns a promise resolving once the input value has been read and
5513 * validated or rejecting in case the input value does not meet the
5514 * validation constraints.
5515 */
5516 parse: function(section_id) {
5517 var active = this.isActive(section_id);
5518
5519 if (active &amp;&amp; !this.isValid(section_id)) {
5520 var title = this.stripTags(this.title).trim(),
5521 error = this.getValidationError(section_id);
5522
5523 return Promise.reject(new TypeError(
5524 _('Option "%s" contains an invalid input value.').format(title || this.option) + ' ' + error));
5525 }
5526
5527 if (active) {
5528 var cval = this.cfgvalue(section_id),
5529 fval = this.formvalue(section_id);
5530
5531 if (fval == null || fval == '') {
5532 if (this.rmempty || this.optional) {
5533 return Promise.resolve(this.remove(section_id));
5534 }
5535 else {
5536 var title = this.stripTags(this.title).trim();
5537
5538 return Promise.reject(new TypeError(
5539 _('Option "%s" must not be empty.').format(title || this.option)));
5540 }
5541 }
5542 else if (this.forcewrite || !isEqual(cval, fval)) {
5543 return Promise.resolve(this.write(section_id, fval));
5544 }
5545 }
5546 else if (!this.retain) {
5547 return Promise.resolve(this.remove(section_id));
5548 }
5549
5550 return Promise.resolve();
5551 },
5552
5553 /**
5554 * Write the current input value into the configuration.
5555 *
5556 * This function is invoked upon saving the parent form when the option
5557 * element is valid and when its input value has been changed compared to
5558 * the initial value returned by
5559 * [cfgvalue()]{@link LuCI.form.AbstractValue#cfgvalue}.
5560 *
5561 * The default implementation simply sets the given input value in the
5562 * UCI configuration (or the associated JavaScript object property in
5563 * case of `JSONMap` forms). It may be overwritten by user code to
5564 * implement alternative save logic, e.g. to transform the input value
5565 * before it is written.
5566 *
5567 * @param {string} section_id
5568 * The configuration section ID
5569 *
5570 * @param {string|string[]} formvalue
5571 * The input value to write.
5572 */
5573 write: function(section_id, formvalue) {
5574 return this.map.data.set(
5575 this.uciconfig || this.section.uciconfig || this.map.config,
5576 this.ucisection || section_id,
5577 this.ucioption || this.option,
5578 formvalue);
5579 },
5580
5581 /**
5582 * Remove the corresponding value from the configuration.
5583 *
5584 * This function is invoked upon saving the parent form when the option
5585 * element has been hidden due to unsatisfied dependencies or when the
5586 * user cleared the input value and the option is marked optional.
5587 *
5588 * The default implementation simply removes the associated option from the
5589 * UCI configuration (or the associated JavaScript object property in
5590 * case of `JSONMap` forms). It may be overwritten by user code to
5591 * implement alternative removal logic, e.g. to retain the original value.
5592 *
5593 * @param {string} section_id
5594 * The configuration section ID
5595 */
5596 remove: function(section_id) {
5597 var this_cfg = this.uciconfig || this.section.uciconfig || this.map.config,
5598 this_sid = this.ucisection || section_id,
5599 this_opt = this.ucioption || this.option;
5600
5601 for (var i = 0; i &lt; this.section.children.length; i++) {
5602 var sibling = this.section.children[i];
5603
5604 if (sibling === this || sibling.ucioption == null)
5605 continue;
5606
5607 var sibling_cfg = sibling.uciconfig || sibling.section.uciconfig || sibling.map.config,
5608 sibling_sid = sibling.ucisection || section_id,
5609 sibling_opt = sibling.ucioption || sibling.option;
5610
5611 if (this_cfg != sibling_cfg || this_sid != sibling_sid || this_opt != sibling_opt)
5612 continue;
5613
5614 if (!sibling.isActive(section_id))
5615 continue;
5616
5617 /* found another active option aliasing the same uci option name,
5618 * so we can't remove the value */
5619 return;
5620 }
5621
5622 this.map.data.unset(this_cfg, this_sid, this_opt);
5623 }
5624 });
5625
5626 /**
5627 * @class TypedSection
5628 * @memberof LuCI.form
5629 * @augments LuCI.form.AbstractSection
5630 * @hideconstructor
5631 * @classdesc
5632 *
5633 * The `TypedSection` class maps all or - if `filter()` is overwritten - a
5634 * subset of the underlying UCI configuration sections of a given type.
5635 *
5636 * Layout wise, the configuration section instances mapped by the section
5637 * element (sometimes referred to as "section nodes") are stacked beneath
5638 * each other in a single column, with an optional section remove button next
5639 * to each section node and a section add button at the end, depending on the
5640 * value of the `addremove` property.
5641 *
5642 * @param {LuCI.form.Map|LuCI.form.JSONMap} form
5643 * The configuration form this section is added to. It is automatically passed
5644 * by [section()]{@link LuCI.form.Map#section}.
5645 *
5646 * @param {string} section_type
5647 * The type of the UCI section to map.
5648 *
5649 * @param {string} [title]
5650 * The title caption of the form section element.
5651 *
5652 * @param {string} [description]
5653 * The description text of the form section element.
5654 */
5655 var CBITypedSection = CBIAbstractSection.extend(/** @lends LuCI.form.TypedSection.prototype */ {
5656 __name__: 'CBI.TypedSection',
5657
5658 /**
5659 * If set to `true`, the user may add or remove instances from the form
5660 * section widget, otherwise only preexisting sections may be edited.
5661 * The default is `false`.
5662 *
5663 * @name LuCI.form.TypedSection.prototype#addremove
5664 * @type boolean
5665 * @default false
5666 */
5667
5668 /**
5669 * If set to `true`, mapped section instances are treated as anonymous
5670 * UCI sections, which means that section instance elements will be
5671 * rendered without title element and that no name is required when adding
5672 * new sections. The default is `false`.
5673 *
5674 * @name LuCI.form.TypedSection.prototype#anonymous
5675 * @type boolean
5676 * @default false
5677 */
5678
5679 /**
5680 * When set to `true`, instead of rendering section instances one below
5681 * another, treat each instance as separate tab pane and render a tab menu
5682 * at the top of the form section element, allowing the user to switch
5683 * among instances. The default is `false`.
5684 *
5685 * @name LuCI.form.TypedSection.prototype#tabbed
5686 * @type boolean
5687 * @default false
5688 */
5689
5690 /**
5691 * Override the caption used for the section add button at the bottom of
5692 * the section form element. If set to a string, it will be used as-is,
5693 * if set to a function, the function will be invoked and its return value
5694 * is used as caption, after converting it to a string. If this property
5695 * is not set, the default is `Add`.
5696 *
5697 * @name LuCI.form.TypedSection.prototype#addbtntitle
5698 * @type string|function
5699 * @default null
5700 */
5701
5702 /**
5703 * Override the UCI configuration name to read the section IDs from. By
5704 * default, the configuration name is inherited from the parent `Map`.
5705 * By setting this property, a deviating configuration may be specified.
5706 * The default is `null`, means inheriting from the parent form.
5707 *
5708 * @name LuCI.form.TypedSection.prototype#uciconfig
5709 * @type string
5710 * @default null
5711 */
5712
5713 /** @override */
5714 cfgsections: function() {
5715 return this.map.data.sections(this.uciconfig || this.map.config, this.sectiontype)
5716 .map(function(s) { return s['.name'] })
5717 .filter(L.bind(this.filter, this));
5718 },
5719
5720 /** @private */
5721 handleAdd: function(ev, name) {
5722 var config_name = this.uciconfig || this.map.config;
5723
5724 this.map.data.add(config_name, this.sectiontype, name);
5725 return this.map.save(null, true);
5726 },
5727
5728 /** @private */
5729 handleRemove: function(section_id, ev) {
5730 var config_name = this.uciconfig || this.map.config;
5731
5732 this.map.data.remove(config_name, section_id);
5733 return this.map.save(null, true);
5734 },
5735
5736 /** @private */
5737 renderSectionAdd: function(extra_class) {
5738 if (!this.addremove)
5739 return E([]);
5740
5741 var createEl = E('div', { 'class': 'cbi-section-create' }),
5742 config_name = this.uciconfig || this.map.config,
5743 btn_title = this.titleFn('addbtntitle');
5744
5745 if (extra_class != null)
5746 createEl.classList.add(extra_class);
5747
5748 if (this.anonymous) {
5749 createEl.appendChild(E('button', {
5750 'class': 'cbi-button cbi-button-add',
5751 'title': btn_title || _('Add'),
5752 'click': ui.createHandlerFn(this, 'handleAdd'),
5753 'disabled': this.map.readonly || null
5754 }, [ btn_title || _('Add') ]));
5755 }
5756 else {
5757 var nameEl = E('input', {
5758 'type': 'text',
5759 'class': 'cbi-section-create-name',
5760 'disabled': this.map.readonly || null
5761 });
5762
5763 dom.append(createEl, [
5764 E('div', {}, nameEl),
5765 E('button', {
5766 'class': 'cbi-button cbi-button-add',
5767 'title': btn_title || _('Add'),
5768 'click': ui.createHandlerFn(this, function(ev) {
5769 if (nameEl.classList.contains('cbi-input-invalid'))
5770 return;
5771
5772 return this.handleAdd(ev, nameEl.value);
5773 }),
5774 'disabled': this.map.readonly || true
5775 }, [ btn_title || _('Add') ])
5776 ]);
5777
5778 if (this.map.readonly !== true) {
5779 ui.addValidator(nameEl, 'uciname', true, function(v) {
5780 var button = createEl.querySelector('.cbi-section-create > .cbi-button-add');
5781 if (v !== '') {
5782 button.disabled = null;
5783 return true;
5784 }
5785 else {
5786 button.disabled = true;
5787 return _('Expecting: %s').format(_('non-empty value'));
5788 }
5789 }, 'blur', 'keyup');
5790 }
5791 }
5792
5793 return createEl;
5794 },
5795
5796 /** @private */
5797 renderSectionPlaceholder: function() {
5798 return E('em', _('This section contains no values yet'));
5799 },
5800
5801 /** @private */
5802 renderContents: function(cfgsections, nodes) {
5803 var section_id = null,
5804 config_name = this.uciconfig || this.map.config,
5805 sectionEl = E('div', {
5806 'id': 'cbi-%s-%s'.format(config_name, this.sectiontype),
5807 'class': 'cbi-section',
5808 'data-tab': (this.map.tabbed &amp;&amp; !this.parentoption) ? this.sectiontype : null,
5809 'data-tab-title': (this.map.tabbed &amp;&amp; !this.parentoption) ? this.title || this.sectiontype : null
5810 });
5811
5812 if (this.title != null &amp;&amp; this.title != '')
5813 sectionEl.appendChild(E('h3', {}, this.title));
5814
5815 if (this.description != null &amp;&amp; this.description != '')
5816 sectionEl.appendChild(E('div', { 'class': 'cbi-section-descr' }, this.description));
5817
5818 for (var i = 0; i &lt; nodes.length; i++) {
5819 if (this.addremove) {
5820 sectionEl.appendChild(
5821 E('div', { 'class': 'cbi-section-remove right' },
5822 E('button', {
5823 'class': 'cbi-button',
5824 'name': 'cbi.rts.%s.%s'.format(config_name, cfgsections[i]),
5825 'data-section-id': cfgsections[i],
5826 'click': ui.createHandlerFn(this, 'handleRemove', cfgsections[i]),
5827 'disabled': this.map.readonly || null
5828 }, [ _('Delete') ])));
5829 }
5830
5831 if (!this.anonymous)
5832 sectionEl.appendChild(E('h3', cfgsections[i].toUpperCase()));
5833
5834 sectionEl.appendChild(E('div', {
5835 'id': 'cbi-%s-%s'.format(config_name, cfgsections[i]),
5836 'class': this.tabs
5837 ? 'cbi-section-node cbi-section-node-tabbed' : 'cbi-section-node',
5838 'data-section-id': cfgsections[i]
5839 }, nodes[i]));
5840 }
5841
5842 if (nodes.length == 0)
5843 sectionEl.appendChild(this.renderSectionPlaceholder());
5844
5845 sectionEl.appendChild(this.renderSectionAdd());
5846
5847 dom.bindClassInstance(sectionEl, this);
5848
5849 return sectionEl;
5850 },
5851
5852 /** @override */
5853 render: function() {
5854 var cfgsections = this.cfgsections(),
5855 renderTasks = [];
5856
5857 for (var i = 0; i &lt; cfgsections.length; i++)
5858 renderTasks.push(this.renderUCISection(cfgsections[i]));
5859
5860 return Promise.all(renderTasks).then(this.renderContents.bind(this, cfgsections));
5861 }
5862 });
5863
5864 /**
5865 * @class TableSection
5866 * @memberof LuCI.form
5867 * @augments LuCI.form.TypedSection
5868 * @hideconstructor
5869 * @classdesc
5870 *
5871 * The `TableSection` class maps all or - if `filter()` is overwritten - a
5872 * subset of the underlying UCI configuration sections of a given type.
5873 *
5874 * Layout wise, the configuration section instances mapped by the section
5875 * element (sometimes referred to as "section nodes") are rendered as rows
5876 * within an HTML table element, with an optional section remove button in the
5877 * last column and a section add button below the table, depending on the
5878 * value of the `addremove` property.
5879 *
5880 * @param {LuCI.form.Map|LuCI.form.JSONMap} form
5881 * The configuration form this section is added to. It is automatically passed
5882 * by [section()]{@link LuCI.form.Map#section}.
5883 *
5884 * @param {string} section_type
5885 * The type of the UCI section to map.
5886 *
5887 * @param {string} [title]
5888 * The title caption of the form section element.
5889 *
5890 * @param {string} [description]
5891 * The description text of the form section element.
5892 */
5893 var CBITableSection = CBITypedSection.extend(/** @lends LuCI.form.TableSection.prototype */ {
5894 __name__: 'CBI.TableSection',
5895
5896 /**
5897 * Override the per-section instance title caption shown in the first
5898 * column of the table unless `anonymous` is set to true. If set to a
5899 * string, it will be used as `String.format()` pattern with the name of
5900 * the underlying UCI section as first argument, if set to a function, the
5901 * function will be invoked with the section name as first argument and
5902 * its return value is used as caption, after converting it to a string.
5903 * If this property is not set, the default is the name of the underlying
5904 * UCI configuration section.
5905 *
5906 * @name LuCI.form.TableSection.prototype#sectiontitle
5907 * @type string|function
5908 * @default null
5909 */
5910
5911 /**
5912 * Override the per-section instance modal popup title caption shown when
5913 * clicking the `More…` button in a section specifying `max_cols`. If set
5914 * to a string, it will be used as `String.format()` pattern with the name
5915 * of the underlying UCI section as first argument, if set to a function,
5916 * the function will be invoked with the section name as first argument and
5917 * its return value is used as caption, after converting it to a string.
5918 * If this property is not set, the default is the name of the underlying
5919 * UCI configuration section.
5920 *
5921 * @name LuCI.form.TableSection.prototype#modaltitle
5922 * @type string|function
5923 * @default null
5924 */
5925
5926 /**
5927 * Specify a maximum amount of columns to display. By default, one table
5928 * column is rendered for each child option of the form section element.
5929 * When this option is set to a positive number, then no more columns than
5930 * the given amount are rendered. When the number of child options exceeds
5931 * the specified amount, a `More…` button is rendered in the last column,
5932 * opening a modal dialog presenting all options elements in `NamedSection`
5933 * style when clicked.
5934 *
5935 * @name LuCI.form.TableSection.prototype#max_cols
5936 * @type number
5937 * @default null
5938 */
5939
5940 /**
5941 * If set to `true`, alternating `cbi-rowstyle-1` and `cbi-rowstyle-2` CSS
5942 * classes are added to the table row elements. Not all LuCI themes
5943 * implement these row style classes. The default is `false`.
5944 *
5945 * @name LuCI.form.TableSection.prototype#rowcolors
5946 * @type boolean
5947 * @default false
5948 */
5949
5950 /**
5951 * Enables a per-section instance row `Edit` button which triggers a certain
5952 * action when clicked. If set to a string, the string value is used
5953 * as `String.format()` pattern with the name of the underlying UCI section
5954 * as first format argument. The result is then interpreted as URL which
5955 * LuCI will navigate to when the user clicks the edit button.
5956 *
5957 * If set to a function, this function will be registered as click event
5958 * handler on the rendered edit button, receiving the section instance
5959 * name as first and the DOM click event as second argument.
5960 *
5961 * @name LuCI.form.TableSection.prototype#extedit
5962 * @type string|function
5963 * @default null
5964 */
5965
5966 /**
5967 * If set to `true`, a sort button is added to the last column, allowing
5968 * the user to reorder the section instances mapped by the section form
5969 * element.
5970 *
5971 * @name LuCI.form.TableSection.prototype#sortable
5972 * @type boolean
5973 * @default false
5974 */
5975
5976 /**
5977 * If set to `true`, the header row with the options descriptions will
5978 * not be displayed. By default, descriptions row is automatically displayed
5979 * when at least one option has a description.
5980 *
5981 * @name LuCI.form.TableSection.prototype#nodescriptions
5982 * @type boolean
5983 * @default false
5984 */
5985
5986 /**
5987 * The `TableSection` implementation does not support option tabbing, so
5988 * its implementation of `tab()` will always throw an exception when
5989 * invoked.
5990 *
5991 * @override
5992 * @throws Throws an exception when invoked.
5993 */
5994 tab: function() {
5995 throw 'Tabs are not supported by TableSection';
5996 },
5997
5998 /** @private */
5999 renderContents: function(cfgsections, nodes) {
6000 var section_id = null,
6001 config_name = this.uciconfig || this.map.config,
6002 max_cols = isNaN(this.max_cols) ? this.children.length : this.max_cols,
6003 has_more = max_cols &lt; this.children.length,
6004 drag_sort = this.sortable &amp;&amp; !('ontouchstart' in window),
6005 touch_sort = this.sortable &amp;&amp; ('ontouchstart' in window),
6006 sectionEl = E('div', {
6007 'id': 'cbi-%s-%s'.format(config_name, this.sectiontype),
6008 'class': 'cbi-section cbi-tblsection',
6009 'data-tab': (this.map.tabbed &amp;&amp; !this.parentoption) ? this.sectiontype : null,
6010 'data-tab-title': (this.map.tabbed &amp;&amp; !this.parentoption) ? this.title || this.sectiontype : null
6011 }),
6012 tableEl = E('table', {
6013 'class': 'table cbi-section-table'
6014 });
6015
6016 if (this.title != null &amp;&amp; this.title != '')
6017 sectionEl.appendChild(E('h3', {}, this.title));
6018
6019 if (this.description != null &amp;&amp; this.description != '')
6020 sectionEl.appendChild(E('div', { 'class': 'cbi-section-descr' }, this.description));
6021
6022 tableEl.appendChild(this.renderHeaderRows(max_cols));
6023
6024 for (var i = 0; i &lt; nodes.length; i++) {
6025 var sectionname = this.titleFn('sectiontitle', cfgsections[i]);
6026
6027 if (sectionname == null)
6028 sectionname = cfgsections[i];
6029
6030 var trEl = E('tr', {
6031 'id': 'cbi-%s-%s'.format(config_name, cfgsections[i]),
6032 'class': 'tr cbi-section-table-row',
6033 'data-sid': cfgsections[i],
6034 'draggable': (drag_sort || touch_sort) ? true : null,
6035 'mousedown': drag_sort ? L.bind(this.handleDragInit, this) : null,
6036 'dragstart': drag_sort ? L.bind(this.handleDragStart, this) : null,
6037 'dragover': drag_sort ? L.bind(this.handleDragOver, this) : null,
6038 'dragenter': drag_sort ? L.bind(this.handleDragEnter, this) : null,
6039 'dragleave': drag_sort ? L.bind(this.handleDragLeave, this) : null,
6040 'dragend': drag_sort ? L.bind(this.handleDragEnd, this) : null,
6041 'drop': drag_sort ? L.bind(this.handleDrop, this) : null,
6042 'touchmove': touch_sort ? L.bind(this.handleTouchMove, this) : null,
6043 'touchend': touch_sort ? L.bind(this.handleTouchEnd, this) : null,
6044 'data-title': (sectionname &amp;&amp; (!this.anonymous || this.sectiontitle)) ? sectionname : null,
6045 'data-section-id': cfgsections[i]
6046 });
6047
6048 if (this.extedit || this.rowcolors)
6049 trEl.classList.add(!(tableEl.childNodes.length % 2)
6050 ? 'cbi-rowstyle-1' : 'cbi-rowstyle-2');
6051
6052 for (var j = 0; j &lt; max_cols &amp;&amp; nodes[i].firstChild; j++)
6053 trEl.appendChild(nodes[i].firstChild);
6054
6055 trEl.appendChild(this.renderRowActions(cfgsections[i], has_more ? _('More…') : null));
6056 tableEl.appendChild(trEl);
6057 }
6058
6059 if (nodes.length == 0)
6060 tableEl.appendChild(E('tr', { 'class': 'tr cbi-section-table-row placeholder' },
6061 E('td', { 'class': 'td' }, this.renderSectionPlaceholder())));
6062
6063 sectionEl.appendChild(tableEl);
6064
6065 sectionEl.appendChild(this.renderSectionAdd('cbi-tblsection-create'));
6066
6067 dom.bindClassInstance(sectionEl, this);
6068
6069 return sectionEl;
6070 },
6071
6072 /** @private */
6073 renderHeaderRows: function(max_cols, has_action) {
6074 var has_titles = false,
6075 has_descriptions = false,
6076 max_cols = isNaN(this.max_cols) ? this.children.length : this.max_cols,
6077 has_more = max_cols &lt; this.children.length,
6078 anon_class = (!this.anonymous || this.sectiontitle) ? 'named' : 'anonymous',
6079 trEls = E([]);
6080
6081 for (var i = 0, opt; i &lt; max_cols &amp;&amp; (opt = this.children[i]) != null; i++) {
6082 if (opt.modalonly)
6083 continue;
6084
6085 has_titles = has_titles || !!opt.title;
6086 has_descriptions = has_descriptions || !!opt.description;
6087 }
6088
6089 if (has_titles) {
6090 var trEl = E('tr', {
6091 'class': 'tr cbi-section-table-titles ' + anon_class,
6092 'data-title': (!this.anonymous || this.sectiontitle) ? _('Name') : null,
6093 'click': this.sortable ? ui.createHandlerFn(this, 'handleSort') : null
6094 });
6095
6096 for (var i = 0, opt; i &lt; max_cols &amp;&amp; (opt = this.children[i]) != null; i++) {
6097 if (opt.modalonly)
6098 continue;
6099
6100 trEl.appendChild(E('th', {
6101 'class': 'th cbi-section-table-cell',
6102 'data-widget': opt.__name__,
6103 'data-sortable-row': this.sortable ? '' : null
6104 }));
6105
6106 if (opt.width != null)
6107 trEl.lastElementChild.style.width =
6108 (typeof(opt.width) == 'number') ? opt.width+'px' : opt.width;
6109
6110 if (opt.titleref)
6111 trEl.lastElementChild.appendChild(E('a', {
6112 'href': opt.titleref,
6113 'class': 'cbi-title-ref',
6114 'title': this.titledesc || _('Go to relevant configuration page')
6115 }, opt.title));
6116 else
6117 dom.content(trEl.lastElementChild, opt.title);
6118 }
6119
6120 if (this.sortable || this.extedit || this.addremove || has_more || has_action)
6121 trEl.appendChild(E('th', {
6122 'class': 'th cbi-section-table-cell cbi-section-actions'
6123 }));
6124
6125 trEls.appendChild(trEl);
6126 }
6127
6128 if (has_descriptions &amp;&amp; !this.nodescriptions) {
6129 var trEl = E('tr', {
6130 'class': 'tr cbi-section-table-descr ' + anon_class
6131 });
6132
6133 for (var i = 0, opt; i &lt; max_cols &amp;&amp; (opt = this.children[i]) != null; i++) {
6134 if (opt.modalonly)
6135 continue;
6136
6137 trEl.appendChild(E('th', {
6138 'class': 'th cbi-section-table-cell',
6139 'data-widget': opt.__name__
6140 }, opt.description));
6141
6142 if (opt.width != null)
6143 trEl.lastElementChild.style.width =
6144 (typeof(opt.width) == 'number') ? opt.width+'px' : opt.width;
6145 }
6146
6147 if (this.sortable || this.extedit || this.addremove || has_more || has_action)
6148 trEl.appendChild(E('th', {
6149 'class': 'th cbi-section-table-cell cbi-section-actions'
6150 }));
6151
6152 trEls.appendChild(trEl);
6153 }
6154
6155 return trEls;
6156 },
6157
6158 /** @private */
6159 renderRowActions: function(section_id, more_label) {
6160 var config_name = this.uciconfig || this.map.config;
6161
6162 if (!this.sortable &amp;&amp; !this.extedit &amp;&amp; !this.addremove &amp;&amp; !more_label)
6163 return E([]);
6164
6165 var tdEl = E('td', {
6166 'class': 'td cbi-section-table-cell nowrap cbi-section-actions'
6167 }, E('div'));
6168
6169 if (this.sortable) {
6170 dom.append(tdEl.lastElementChild, [
6171 E('button', {
6172 'title': _('Drag to reorder'),
6173 'class': 'cbi-button drag-handle center',
6174 'style': 'cursor:move',
6175 'disabled': this.map.readonly || null
6176 }, '☰')
6177 ]);
6178 }
6179
6180 if (this.extedit) {
6181 var evFn = null;
6182
6183 if (typeof(this.extedit) == 'function')
6184 evFn = L.bind(this.extedit, this);
6185 else if (typeof(this.extedit) == 'string')
6186 evFn = L.bind(function(sid, ev) {
6187 location.href = this.extedit.format(sid);
6188 }, this, section_id);
6189
6190 dom.append(tdEl.lastElementChild,
6191 E('button', {
6192 'title': _('Edit'),
6193 'class': 'cbi-button cbi-button-edit',
6194 'click': evFn
6195 }, [ _('Edit') ])
6196 );
6197 }
6198
6199 if (more_label) {
6200 dom.append(tdEl.lastElementChild,
6201 E('button', {
6202 'title': more_label,
6203 'class': 'cbi-button cbi-button-edit',
6204 'click': ui.createHandlerFn(this, 'renderMoreOptionsModal', section_id)
6205 }, [ more_label ])
6206 );
6207 }
6208
6209 if (this.addremove) {
6210 var btn_title = this.titleFn('removebtntitle', section_id);
6211
6212 dom.append(tdEl.lastElementChild,
6213 E('button', {
6214 'title': btn_title || _('Delete'),
6215 'class': 'cbi-button cbi-button-remove',
6216 'click': ui.createHandlerFn(this, 'handleRemove', section_id),
6217 'disabled': this.map.readonly || null
6218 }, [ btn_title || _('Delete') ])
6219 );
6220 }
6221
6222 return tdEl;
6223 },
6224
6225 /** @private */
6226 handleDragInit: function(ev) {
6227 scope.dragState = { node: ev.target };
6228 },
6229
6230 /** @private */
6231 handleDragStart: function(ev) {
6232 if (!scope.dragState || !scope.dragState.node.classList.contains('drag-handle')) {
6233 scope.dragState = null;
6234 ev.preventDefault();
6235 return false;
6236 }
6237
6238 scope.dragState.node = dom.parent(scope.dragState.node, '.tr');
6239 ev.dataTransfer.setData('text', 'drag');
6240 ev.target.style.opacity = 0.4;
6241 },
6242
6243 /** @private */
6244 handleDragOver: function(ev) {
6245 var n = scope.dragState.targetNode,
6246 r = scope.dragState.rect,
6247 t = r.top + r.height / 2;
6248
6249 if (ev.clientY &lt;= t) {
6250 n.classList.remove('drag-over-below');
6251 n.classList.add('drag-over-above');
6252 }
6253 else {
6254 n.classList.remove('drag-over-above');
6255 n.classList.add('drag-over-below');
6256 }
6257
6258 ev.dataTransfer.dropEffect = 'move';
6259 ev.preventDefault();
6260 return false;
6261 },
6262
6263 /** @private */
6264 handleDragEnter: function(ev) {
6265 scope.dragState.rect = ev.currentTarget.getBoundingClientRect();
6266 scope.dragState.targetNode = ev.currentTarget;
6267 },
6268
6269 /** @private */
6270 handleDragLeave: function(ev) {
6271 ev.currentTarget.classList.remove('drag-over-above');
6272 ev.currentTarget.classList.remove('drag-over-below');
6273 },
6274
6275 /** @private */
6276 handleDragEnd: function(ev) {
6277 var n = ev.target;
6278
6279 n.style.opacity = '';
6280 n.classList.add('flash');
6281 n.parentNode.querySelectorAll('.drag-over-above, .drag-over-below')
6282 .forEach(function(tr) {
6283 tr.classList.remove('drag-over-above');
6284 tr.classList.remove('drag-over-below');
6285 });
6286 },
6287
6288 /** @private */
6289 handleDrop: function(ev) {
6290 var s = scope.dragState;
6291
6292 if (s.node &amp;&amp; s.targetNode) {
6293 var config_name = this.uciconfig || this.map.config,
6294 ref_node = s.targetNode,
6295 after = false;
6296
6297 if (ref_node.classList.contains('drag-over-below')) {
6298 ref_node = ref_node.nextElementSibling;
6299 after = true;
6300 }
6301
6302 var sid1 = s.node.getAttribute('data-sid'),
6303 sid2 = s.targetNode.getAttribute('data-sid');
6304
6305 s.node.parentNode.insertBefore(s.node, ref_node);
6306 this.map.data.move(config_name, sid1, sid2, after);
6307 }
6308
6309 scope.dragState = null;
6310 ev.target.style.opacity = '';
6311 ev.stopPropagation();
6312 ev.preventDefault();
6313 return false;
6314 },
6315
6316 /** @private */
6317 determineBackgroundColor: function(node) {
6318 var r = 255, g = 255, b = 255;
6319
6320 while (node) {
6321 var s = window.getComputedStyle(node),
6322 c = (s.getPropertyValue('background-color') || '').replace(/ /g, '');
6323
6324 if (c != '' &amp;&amp; c != 'transparent' &amp;&amp; c != 'rgba(0,0,0,0)') {
6325 if (/^#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})$/i.test(c)) {
6326 r = parseInt(RegExp.$1, 16);
6327 g = parseInt(RegExp.$2, 16);
6328 b = parseInt(RegExp.$3, 16);
6329 }
6330 else if (/^rgba?\(([0-9]+),([0-9]+),([0-9]+)[,)]$/.test(c)) {
6331 r = +RegExp.$1;
6332 g = +RegExp.$2;
6333 b = +RegExp.$3;
6334 }
6335
6336 break;
6337 }
6338
6339 node = node.parentNode;
6340 }
6341
6342 return [ r, g, b ];
6343 },
6344
6345 /** @private */
6346 handleTouchMove: function(ev) {
6347 if (!ev.target.classList.contains('drag-handle'))
6348 return;
6349
6350 var touchLoc = ev.targetTouches[0],
6351 rowBtn = ev.target,
6352 rowElem = dom.parent(rowBtn, '.tr'),
6353 htmlElem = document.querySelector('html'),
6354 dragHandle = document.querySelector('.touchsort-element'),
6355 viewportHeight = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
6356
6357 if (!dragHandle) {
6358 var rowRect = rowElem.getBoundingClientRect(),
6359 btnRect = rowBtn.getBoundingClientRect(),
6360 paddingLeft = btnRect.left - rowRect.left,
6361 paddingRight = rowRect.right - btnRect.right,
6362 colorBg = this.determineBackgroundColor(rowElem),
6363 colorFg = (colorBg[0] * 0.299 + colorBg[1] * 0.587 + colorBg[2] * 0.114) > 186 ? [ 0, 0, 0 ] : [ 255, 255, 255 ];
6364
6365 dragHandle = E('div', { 'class': 'touchsort-element' }, [
6366 E('strong', [ rowElem.getAttribute('data-title') ]),
6367 rowBtn.cloneNode(true)
6368 ]);
6369
6370 Object.assign(dragHandle.style, {
6371 position: 'absolute',
6372 boxShadow: '0 0 3px rgba(%d, %d, %d, 1)'.format(colorFg[0], colorFg[1], colorFg[2]),
6373 background: 'rgba(%d, %d, %d, 0.8)'.format(colorBg[0], colorBg[1], colorBg[2]),
6374 top: rowRect.top + 'px',
6375 left: rowRect.left + 'px',
6376 width: rowRect.width + 'px',
6377 height: (rowBtn.offsetHeight + 4) + 'px'
6378 });
6379
6380 Object.assign(dragHandle.firstElementChild.style, {
6381 position: 'absolute',
6382 lineHeight: dragHandle.style.height,
6383 whiteSpace: 'nowrap',
6384 overflow: 'hidden',
6385 textOverflow: 'ellipsis',
6386 left: (paddingRight > paddingLeft) ? '' : '5px',
6387 right: (paddingRight > paddingLeft) ? '5px' : '',
6388 width: (Math.max(paddingLeft, paddingRight) - 10) + 'px'
6389 });
6390
6391 Object.assign(dragHandle.lastElementChild.style, {
6392 position: 'absolute',
6393 top: '2px',
6394 left: paddingLeft + 'px',
6395 width: rowBtn.offsetWidth + 'px'
6396 });
6397
6398 document.body.appendChild(dragHandle);
6399
6400 rowElem.classList.remove('flash');
6401 rowBtn.blur();
6402 }
6403
6404 dragHandle.style.top = (touchLoc.pageY - (parseInt(dragHandle.style.height) / 2)) + 'px';
6405
6406 rowElem.parentNode.querySelectorAll('[draggable]').forEach(function(tr, i, trs) {
6407 var trRect = tr.getBoundingClientRect(),
6408 yTop = trRect.top + window.scrollY,
6409 yBottom = trRect.bottom + window.scrollY,
6410 yMiddle = yTop + ((yBottom - yTop) / 2);
6411
6412 tr.classList.remove('drag-over-above', 'drag-over-below');
6413
6414 if ((i == 0 || touchLoc.pageY >= yTop) &amp;&amp; touchLoc.pageY &lt;= yMiddle)
6415 tr.classList.add('drag-over-above');
6416 else if ((i == (trs.length - 1) || touchLoc.pageY &lt;= yBottom) &amp;&amp; touchLoc.pageY > yMiddle)
6417 tr.classList.add('drag-over-below');
6418 });
6419
6420 /* prevent standard scrolling and scroll page when drag handle is
6421 * moved very close (~30px) to the viewport edge */
6422
6423 ev.preventDefault();
6424
6425 if (touchLoc.clientY &lt; 30)
6426 window.requestAnimationFrame(function() { htmlElem.scrollTop -= 30 });
6427 else if (touchLoc.clientY > viewportHeight - 30)
6428 window.requestAnimationFrame(function() { htmlElem.scrollTop += 30 });
6429 },
6430
6431 /** @private */
6432 handleTouchEnd: function(ev) {
6433 var rowElem = dom.parent(ev.target, '.tr'),
6434 htmlElem = document.querySelector('html'),
6435 dragHandle = document.querySelector('.touchsort-element'),
6436 targetElem = rowElem.parentNode.querySelector('.drag-over-above, .drag-over-below'),
6437 viewportHeight = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
6438
6439 if (!dragHandle)
6440 return;
6441
6442 if (targetElem) {
6443 var isBelow = targetElem.classList.contains('drag-over-below');
6444
6445 rowElem.parentNode.insertBefore(rowElem, isBelow ? targetElem.nextElementSibling : targetElem);
6446
6447 this.map.data.move(
6448 this.uciconfig || this.map.config,
6449 rowElem.getAttribute('data-sid'),
6450 targetElem.getAttribute('data-sid'),
6451 isBelow);
6452
6453 window.requestAnimationFrame(function() {
6454 var rowRect = rowElem.getBoundingClientRect();
6455
6456 if (rowRect.top &lt; 50)
6457 htmlElem.scrollTop = (htmlElem.scrollTop + rowRect.top - 50);
6458 else if (rowRect.bottom > viewportHeight - 50)
6459 htmlElem.scrollTop = (htmlElem.scrollTop + viewportHeight - 50 - rowRect.height);
6460
6461 rowElem.classList.add('flash');
6462 });
6463
6464 targetElem.classList.remove('drag-over-above', 'drag-over-below');
6465 }
6466
6467 document.body.removeChild(dragHandle);
6468 },
6469
6470 /** @private */
6471 handleModalCancel: function(modalMap, ev) {
6472 var prevNode = this.getPreviousModalMap(),
6473 resetTasks = Promise.resolve();
6474
6475 if (prevNode) {
6476 var heading = prevNode.parentNode.querySelector('h4'),
6477 prevMap = dom.findClassInstance(prevNode);
6478
6479 while (prevMap) {
6480 resetTasks = resetTasks
6481 .then(L.bind(prevMap.load, prevMap))
6482 .then(L.bind(prevMap.reset, prevMap));
6483
6484 prevMap = prevMap.parent;
6485 }
6486
6487 prevNode.classList.add('flash');
6488 prevNode.classList.remove('hidden');
6489 prevNode.parentNode.removeChild(prevNode.nextElementSibling);
6490
6491 heading.removeChild(heading.lastElementChild);
6492
6493 if (!this.getPreviousModalMap())
6494 prevNode.parentNode
6495 .querySelector('div.right > button')
6496 .firstChild.data = _('Dismiss');
6497 }
6498 else {
6499 ui.hideModal();
6500 }
6501
6502 return resetTasks;
6503 },
6504
6505 /** @private */
6506 handleModalSave: function(modalMap, ev) {
6507 var mapNode = this.getActiveModalMap(),
6508 activeMap = dom.findClassInstance(mapNode),
6509 saveTasks = activeMap.save(null, true);
6510
6511 while (activeMap.parent) {
6512 activeMap = activeMap.parent;
6513 saveTasks = saveTasks
6514 .then(L.bind(activeMap.load, activeMap))
6515 .then(L.bind(activeMap.reset, activeMap));
6516 }
6517
6518 return saveTasks
6519 .then(L.bind(this.handleModalCancel, this, modalMap, ev, true))
6520 .catch(function() {});
6521 },
6522
6523 /** @private */
6524 handleSort: function(ev) {
6525 if (!ev.target.matches('th[data-sortable-row]'))
6526 return;
6527
6528 var th = ev.target,
6529 descending = (th.getAttribute('data-sort-direction') == 'desc'),
6530 config_name = this.uciconfig || this.map.config,
6531 index = 0,
6532 list = [];
6533
6534 ev.currentTarget.querySelectorAll('th').forEach(function(other_th, i) {
6535 if (other_th !== th)
6536 other_th.removeAttribute('data-sort-direction');
6537 else
6538 index = i;
6539 });
6540
6541 ev.currentTarget.parentNode.querySelectorAll('tr.cbi-section-table-row').forEach(L.bind(function(tr, i) {
6542 var sid = tr.getAttribute('data-sid'),
6543 opt = tr.childNodes[index].getAttribute('data-name'),
6544 val = this.cfgvalue(sid, opt);
6545
6546 tr.querySelectorAll('.flash').forEach(function(n) {
6547 n.classList.remove('flash')
6548 });
6549
6550 list.push([
6551 ui.Table.prototype.deriveSortKey((val != null) ? val.trim() : ''),
6552 tr
6553 ]);
6554 }, this));
6555
6556 list.sort(function(a, b) {
6557 return descending
6558 ? -L.naturalCompare(a[0], b[0])
6559 : L.naturalCompare(a[0], b[0]);
6560 });
6561
6562 window.requestAnimationFrame(L.bind(function() {
6563 var ref_sid, cur_sid;
6564
6565 for (var i = 0; i &lt; list.length; i++) {
6566 list[i][1].childNodes[index].classList.add('flash');
6567 th.parentNode.parentNode.appendChild(list[i][1]);
6568
6569 cur_sid = list[i][1].getAttribute('data-sid');
6570
6571 if (ref_sid)
6572 this.map.data.move(config_name, cur_sid, ref_sid, true);
6573
6574 ref_sid = cur_sid;
6575 }
6576
6577 th.setAttribute('data-sort-direction', descending ? 'asc' : 'desc');
6578 }, this));
6579 },
6580
6581 /**
6582 * Add further options to the per-section instanced modal popup.
6583 *
6584 * This function may be overwritten by user code to perform additional
6585 * setup steps before displaying the more options modal which is useful to
6586 * e.g. query additional data or to inject further option elements.
6587 *
6588 * The default implementation of this function does nothing.
6589 *
6590 * @abstract
6591 * @param {LuCI.form.NamedSection} modalSection
6592 * The `NamedSection` instance about to be rendered in the modal popup.
6593 *
6594 * @param {string} section_id
6595 * The ID of the underlying UCI section the modal popup belongs to.
6596 *
6597 * @param {Event} ev
6598 * The DOM event emitted by clicking the `More…` button.
6599 *
6600 * @returns {*|Promise&lt;*>}
6601 * Return values of this function are ignored but if a promise is returned,
6602 * it is run to completion before the rendering is continued, allowing
6603 * custom logic to perform asynchronous work before the modal dialog
6604 * is shown.
6605 */
6606 addModalOptions: function(modalSection, section_id, ev) {
6607
6608 },
6609
6610 /** @private */
6611 getActiveModalMap: function() {
6612 return document.querySelector('body.modal-overlay-active > #modal_overlay > .modal.cbi-modal > .cbi-map:not(.hidden)');
6613 },
6614
6615 /** @private */
6616 getPreviousModalMap: function() {
6617 var mapNode = this.getActiveModalMap(),
6618 prevNode = mapNode ? mapNode.previousElementSibling : null;
6619
6620 return (prevNode &amp;&amp; prevNode.matches('.cbi-map.hidden')) ? prevNode : null;
6621 },
6622
6623 /** @private */
6624 cloneOptions: function(src_section, dest_section) {
6625 for (var i = 0; i &lt; src_section.children.length; i++) {
6626 var o1 = src_section.children[i];
6627
6628 if (o1.modalonly === false &amp;&amp; src_section === this)
6629 continue;
6630
6631 var o2;
6632
6633 if (o1.subsection) {
6634 o2 = dest_section.option(o1.constructor, o1.option, o1.subsection.constructor, o1.subsection.sectiontype, o1.subsection.title, o1.subsection.description);
6635
6636 for (var k in o1.subsection) {
6637 if (!o1.subsection.hasOwnProperty(k))
6638 continue;
6639
6640 switch (k) {
6641 case 'map':
6642 case 'children':
6643 case 'parentoption':
6644 continue;
6645
6646 default:
6647 o2.subsection[k] = o1.subsection[k];
6648 }
6649 }
6650
6651 this.cloneOptions(o1.subsection, o2.subsection);
6652 }
6653 else {
6654 o2 = dest_section.option(o1.constructor, o1.option, o1.title, o1.description);
6655 }
6656
6657 for (var k in o1) {
6658 if (!o1.hasOwnProperty(k))
6659 continue;
6660
6661 switch (k) {
6662 case 'map':
6663 case 'section':
6664 case 'option':
6665 case 'title':
6666 case 'description':
6667 case 'subsection':
6668 continue;
6669
6670 default:
6671 o2[k] = o1[k];
6672 }
6673 }
6674 }
6675 },
6676
6677 /** @private */
6678 renderMoreOptionsModal: function(section_id, ev) {
6679 var parent = this.map,
6680 sref = parent.data.get(parent.config, section_id),
6681 mapNode = this.getActiveModalMap(),
6682 activeMap = mapNode ? dom.findClassInstance(mapNode) : null,
6683 stackedMap = activeMap &amp;&amp; (activeMap.parent !== parent || activeMap.section !== section_id);
6684
6685 return (stackedMap ? activeMap.save(null, true) : Promise.resolve()).then(L.bind(function() {
6686 section_id = sref['.name'];
6687
6688 var m;
6689
6690 if (parent instanceof CBIJSONMap) {
6691 m = new CBIJSONMap(null, null, null);
6692 m.data = parent.data;
6693 }
6694 else {
6695 m = new CBIMap(parent.config, null, null);
6696 }
6697
6698 var s = m.section(CBINamedSection, section_id, this.sectiontype);
6699
6700 m.parent = parent;
6701 m.section = section_id;
6702 m.readonly = parent.readonly;
6703
6704 s.tabs = this.tabs;
6705 s.tab_names = this.tab_names;
6706
6707 this.cloneOptions(this, s);
6708
6709 return Promise.resolve(this.addModalOptions(s, section_id, ev)).then(function() {
6710 return m.render();
6711 }).then(L.bind(function(nodes) {
6712 var title = parent.title,
6713 name = null;
6714
6715 if ((name = this.titleFn('modaltitle', section_id)) != null)
6716 title = name;
6717 else if ((name = this.titleFn('sectiontitle', section_id)) != null)
6718 title = '%s - %s'.format(parent.title, name);
6719 else if (!this.anonymous)
6720 title = '%s - %s'.format(parent.title, section_id);
6721
6722 if (stackedMap) {
6723 mapNode.parentNode
6724 .querySelector('h4')
6725 .appendChild(E('span', title ? ' » ' + title : ''));
6726
6727 mapNode.parentNode
6728 .querySelector('div.right > button')
6729 .firstChild.data = _('Back');
6730
6731 mapNode.classList.add('hidden');
6732 mapNode.parentNode.insertBefore(nodes, mapNode.nextElementSibling);
6733
6734 nodes.classList.add('flash');
6735 }
6736 else {
6737 ui.showModal(title, [
6738 nodes,
6739 E('div', { 'class': 'right' }, [
6740 E('button', {
6741 'class': 'cbi-button',
6742 'click': ui.createHandlerFn(this, 'handleModalCancel', m)
6743 }, [ _('Dismiss') ]), ' ',
6744 E('button', {
6745 'class': 'cbi-button cbi-button-positive important',
6746 'click': ui.createHandlerFn(this, 'handleModalSave', m),
6747 'disabled': m.readonly || null
6748 }, [ _('Save') ])
6749 ])
6750 ], 'cbi-modal');
6751 }
6752 }, this));
6753 }, this)).catch(L.error);
6754 }
6755 });
6756
6757 /**
6758 * @class GridSection
6759 * @memberof LuCI.form
6760 * @augments LuCI.form.TableSection
6761 * @hideconstructor
6762 * @classdesc
6763 *
6764 * The `GridSection` class maps all or - if `filter()` is overwritten - a
6765 * subset of the underlying UCI configuration sections of a given type.
6766 *
6767 * A grid section functions similar to a {@link LuCI.form.TableSection} but
6768 * supports tabbing in the modal overlay. Option elements added with
6769 * [option()]{@link LuCI.form.GridSection#option} are shown in the table while
6770 * elements added with [taboption()]{@link LuCI.form.GridSection#taboption}
6771 * are displayed in the modal popup.
6772 *
6773 * Another important difference is that the table cells show a readonly text
6774 * preview of the corresponding option elements by default, unless the child
6775 * option element is explicitly made writable by setting the `editable`
6776 * property to `true`.
6777 *
6778 * Additionally, the grid section honours a `modalonly` property of child
6779 * option elements. Refer to the [AbstractValue]{@link LuCI.form.AbstractValue}
6780 * documentation for details.
6781 *
6782 * Layout wise, a grid section looks mostly identical to table sections.
6783 *
6784 * @param {LuCI.form.Map|LuCI.form.JSONMap} form
6785 * The configuration form this section is added to. It is automatically passed
6786 * by [section()]{@link LuCI.form.Map#section}.
6787 *
6788 * @param {string} section_type
6789 * The type of the UCI section to map.
6790 *
6791 * @param {string} [title]
6792 * The title caption of the form section element.
6793 *
6794 * @param {string} [description]
6795 * The description text of the form section element.
6796 */
6797 var CBIGridSection = CBITableSection.extend(/** @lends LuCI.form.GridSection.prototype */ {
6798 /**
6799 * Add an option tab to the section.
6800 *
6801 * The modal option elements of a grid section may be divided into multiple
6802 * tabs to provide a better overview to the user.
6803 *
6804 * Before options can be moved into a tab pane, the corresponding tab
6805 * has to be defined first, which is done by calling this function.
6806 *
6807 * Note that tabs are only effective in modal popups, options added with
6808 * `option()` will not be assigned to a specific tab and are rendered in
6809 * the table view only.
6810 *
6811 * @param {string} name
6812 * The name of the tab to register. It may be freely chosen and just serves
6813 * as an identifier to differentiate tabs.
6814 *
6815 * @param {string} title
6816 * The human readable caption of the tab.
6817 *
6818 * @param {string} [description]
6819 * An additional description text for the corresponding tab pane. It is
6820 * displayed as text paragraph below the tab but before the tab pane
6821 * contents. If omitted, no description will be rendered.
6822 *
6823 * @throws {Error}
6824 * Throws an exception if a tab with the same `name` already exists.
6825 */
6826 tab: function(name, title, description) {
6827 CBIAbstractSection.prototype.tab.call(this, name, title, description);
6828 },
6829
6830 /** @private */
6831 handleAdd: function(ev, name) {
6832 var config_name = this.uciconfig || this.map.config,
6833 section_id = this.map.data.add(config_name, this.sectiontype, name),
6834 mapNode = this.getPreviousModalMap(),
6835 prevMap = mapNode ? dom.findClassInstance(mapNode) : this.map;
6836
6837 prevMap.addedSection = section_id;
6838
6839 return this.renderMoreOptionsModal(section_id);
6840 },
6841
6842 /** @private */
6843 handleModalSave: function(/* ... */) {
6844 var mapNode = this.getPreviousModalMap(),
6845 prevMap = mapNode ? dom.findClassInstance(mapNode) : this.map;
6846
6847 return this.super('handleModalSave', arguments);
6848 },
6849
6850 /** @private */
6851 handleModalCancel: function(modalMap, ev, isSaving) {
6852 var config_name = this.uciconfig || this.map.config,
6853 mapNode = this.getPreviousModalMap(),
6854 prevMap = mapNode ? dom.findClassInstance(mapNode) : this.map;
6855
6856 if (prevMap.addedSection != null &amp;&amp; !isSaving)
6857 this.map.data.remove(config_name, prevMap.addedSection);
6858
6859 delete prevMap.addedSection;
6860
6861 return this.super('handleModalCancel', arguments);
6862 },
6863
6864 /** @private */
6865 renderUCISection: function(section_id) {
6866 return this.renderOptions(null, section_id);
6867 },
6868
6869 /** @private */
6870 renderChildren: function(tab_name, section_id, in_table) {
6871 var tasks = [], index = 0;
6872
6873 for (var i = 0, opt; (opt = this.children[i]) != null; i++) {
6874 if (opt.disable || opt.modalonly)
6875 continue;
6876
6877 if (opt.editable)
6878 tasks.push(opt.render(index++, section_id, in_table));
6879 else
6880 tasks.push(this.renderTextValue(section_id, opt));
6881 }
6882
6883 return Promise.all(tasks);
6884 },
6885
6886 /** @private */
6887 renderTextValue: function(section_id, opt) {
6888 var title = this.stripTags(opt.title).trim(),
6889 descr = this.stripTags(opt.description).trim(),
6890 value = opt.textvalue(section_id);
6891
6892 return E('td', {
6893 'class': 'td cbi-value-field',
6894 'data-title': (title != '') ? title : null,
6895 'data-description': (descr != '') ? descr : null,
6896 'data-name': opt.option,
6897 'data-widget': 'CBI.DummyValue'
6898 }, (value != null) ? value : E('em', _('none')));
6899 },
6900
6901 /** @private */
6902 renderHeaderRows: function(section_id) {
6903 return this.super('renderHeaderRows', [ NaN, true ]);
6904 },
6905
6906 /** @private */
6907 renderRowActions: function(section_id) {
6908 return this.super('renderRowActions', [ section_id, _('Edit') ]);
6909 },
6910
6911 /** @override */
6912 parse: function() {
6913 var section_ids = this.cfgsections(),
6914 tasks = [];
6915
6916 if (Array.isArray(this.children)) {
6917 for (var i = 0; i &lt; section_ids.length; i++) {
6918 for (var j = 0; j &lt; this.children.length; j++) {
6919 if (!this.children[j].editable || this.children[j].modalonly)
6920 continue;
6921
6922 tasks.push(this.children[j].parse(section_ids[i]));
6923 }
6924 }
6925 }
6926
6927 return Promise.all(tasks);
6928 }
6929 });
6930
6931 /**
6932 * @class NamedSection
6933 * @memberof LuCI.form
6934 * @augments LuCI.form.AbstractSection
6935 * @hideconstructor
6936 * @classdesc
6937 *
6938 * The `NamedSection` class maps exactly one UCI section instance which is
6939 * specified when constructing the class instance.
6940 *
6941 * Layout and functionality wise, a named section is essentially a
6942 * `TypedSection` which allows exactly one section node.
6943 *
6944 * @param {LuCI.form.Map|LuCI.form.JSONMap} form
6945 * The configuration form this section is added to. It is automatically passed
6946 * by [section()]{@link LuCI.form.Map#section}.
6947 *
6948 * @param {string} section_id
6949 * The name (ID) of the UCI section to map.
6950 *
6951 * @param {string} section_type
6952 * The type of the UCI section to map.
6953 *
6954 * @param {string} [title]
6955 * The title caption of the form section element.
6956 *
6957 * @param {string} [description]
6958 * The description text of the form section element.
6959 */
6960 var CBINamedSection = CBIAbstractSection.extend(/** @lends LuCI.form.NamedSection.prototype */ {
6961 __name__: 'CBI.NamedSection',
6962 __init__: function(map, section_id /*, ... */) {
6963 this.super('__init__', this.varargs(arguments, 2, map));
6964
6965 this.section = section_id;
6966 },
6967
6968 /**
6969 * If set to `true`, the user may remove or recreate the sole mapped
6970 * configuration instance from the form section widget, otherwise only a
6971 * preexisting section may be edited. The default is `false`.
6972 *
6973 * @name LuCI.form.NamedSection.prototype#addremove
6974 * @type boolean
6975 * @default false
6976 */
6977
6978 /**
6979 * Override the UCI configuration name to read the section IDs from. By
6980 * default, the configuration name is inherited from the parent `Map`.
6981 * By setting this property, a deviating configuration may be specified.
6982 * The default is `null`, means inheriting from the parent form.
6983 *
6984 * @name LuCI.form.NamedSection.prototype#uciconfig
6985 * @type string
6986 * @default null
6987 */
6988
6989 /**
6990 * The `NamedSection` class overwrites the generic `cfgsections()`
6991 * implementation to return a one-element array containing the mapped
6992 * section ID as sole element. User code should not normally change this.
6993 *
6994 * @returns {string[]}
6995 * Returns a one-element array containing the mapped section ID.
6996 */
6997 cfgsections: function() {
6998 return [ this.section ];
6999 },
7000
7001 /** @private */
7002 handleAdd: function(ev) {
7003 var section_id = this.section,
7004 config_name = this.uciconfig || this.map.config;
7005
7006 this.map.data.add(config_name, this.sectiontype, section_id);
7007 return this.map.save(null, true);
7008 },
7009
7010 /** @private */
7011 handleRemove: function(ev) {
7012 var section_id = this.section,
7013 config_name = this.uciconfig || this.map.config;
7014
7015 this.map.data.remove(config_name, section_id);
7016 return this.map.save(null, true);
7017 },
7018
7019 /** @private */
7020 renderContents: function(data) {
7021 var ucidata = data[0], nodes = data[1],
7022 section_id = this.section,
7023 config_name = this.uciconfig || this.map.config,
7024 sectionEl = E('div', {
7025 'id': ucidata ? null : 'cbi-%s-%s'.format(config_name, section_id),
7026 'class': 'cbi-section',
7027 'data-tab': (this.map.tabbed &amp;&amp; !this.parentoption) ? this.sectiontype : null,
7028 'data-tab-title': (this.map.tabbed &amp;&amp; !this.parentoption) ? this.title || this.sectiontype : null
7029 });
7030
7031 if (typeof(this.title) === 'string' &amp;&amp; this.title !== '')
7032 sectionEl.appendChild(E('h3', {}, this.title));
7033
7034 if (typeof(this.description) === 'string' &amp;&amp; this.description !== '')
7035 sectionEl.appendChild(E('div', { 'class': 'cbi-section-descr' }, this.description));
7036
7037 if (ucidata) {
7038 if (this.addremove) {
7039 sectionEl.appendChild(
7040 E('div', { 'class': 'cbi-section-remove right' },
7041 E('button', {
7042 'class': 'cbi-button',
7043 'click': ui.createHandlerFn(this, 'handleRemove'),
7044 'disabled': this.map.readonly || null
7045 }, [ _('Delete') ])));
7046 }
7047
7048 sectionEl.appendChild(E('div', {
7049 'id': 'cbi-%s-%s'.format(config_name, section_id),
7050 'class': this.tabs
7051 ? 'cbi-section-node cbi-section-node-tabbed' : 'cbi-section-node',
7052 'data-section-id': section_id
7053 }, nodes));
7054 }
7055 else if (this.addremove) {
7056 sectionEl.appendChild(
7057 E('button', {
7058 'class': 'cbi-button cbi-button-add',
7059 'click': ui.createHandlerFn(this, 'handleAdd'),
7060 'disabled': this.map.readonly || null
7061 }, [ _('Add') ]));
7062 }
7063
7064 dom.bindClassInstance(sectionEl, this);
7065
7066 return sectionEl;
7067 },
7068
7069 /** @override */
7070 render: function() {
7071 var config_name = this.uciconfig || this.map.config,
7072 section_id = this.section;
7073
7074 return Promise.all([
7075 this.map.data.get(config_name, section_id),
7076 this.renderUCISection(section_id)
7077 ]).then(this.renderContents.bind(this));
7078 }
7079 });
7080
7081 /**
7082 * @class Value
7083 * @memberof LuCI.form
7084 * @augments LuCI.form.AbstractValue
7085 * @hideconstructor
7086 * @classdesc
7087 *
7088 * The `Value` class represents a simple one-line form input using the
7089 * {@link LuCI.ui.Textfield} or - in case choices are added - the
7090 * {@link LuCI.ui.Combobox} class as underlying widget.
7091 *
7092 * @param {LuCI.form.Map|LuCI.form.JSONMap} form
7093 * The configuration form this section is added to. It is automatically passed
7094 * by [option()]{@link LuCI.form.AbstractSection#option} or
7095 * [taboption()]{@link LuCI.form.AbstractSection#taboption} when adding the
7096 * option to the section.
7097 *
7098 * @param {LuCI.form.AbstractSection} section
7099 * The configuration section this option is added to. It is automatically passed
7100 * by [option()]{@link LuCI.form.AbstractSection#option} or
7101 * [taboption()]{@link LuCI.form.AbstractSection#taboption} when adding the
7102 * option to the section.
7103 *
7104 * @param {string} option
7105 * The name of the UCI option to map.
7106 *
7107 * @param {string} [title]
7108 * The title caption of the option element.
7109 *
7110 * @param {string} [description]
7111 * The description text of the option element.
7112 */
7113 var CBIValue = CBIAbstractValue.extend(/** @lends LuCI.form.Value.prototype */ {
7114 __name__: 'CBI.Value',
7115
7116 /**
7117 * If set to `true`, the field is rendered as password input, otherwise
7118 * as plain text input.
7119 *
7120 * @name LuCI.form.Value.prototype#password
7121 * @type boolean
7122 * @default false
7123 */
7124
7125 /**
7126 * Set a placeholder string to use when the input field is empty.
7127 *
7128 * @name LuCI.form.Value.prototype#placeholder
7129 * @type string
7130 * @default null
7131 */
7132
7133 /**
7134 * Add a predefined choice to the form option. By adding one or more
7135 * choices, the plain text input field is turned into a combobox widget
7136 * which prompts the user to select a predefined choice, or to enter a
7137 * custom value.
7138 *
7139 * @param {string} key
7140 * The choice value to add.
7141 *
7142 * @param {Node|string} val
7143 * The caption for the choice value. May be a DOM node, a document fragment
7144 * or a plain text string. If omitted, the `key` value is used as caption.
7145 */
7146 value: function(key, val) {
7147 this.keylist = this.keylist || [];
7148 this.keylist.push(String(key));
7149
7150 this.vallist = this.vallist || [];
7151 this.vallist.push(dom.elem(val) ? val : String(val != null ? val : key));
7152 },
7153
7154 /** @override */
7155 render: function(option_index, section_id, in_table) {
7156 return Promise.resolve(this.cfgvalue(section_id))
7157 .then(this.renderWidget.bind(this, section_id, option_index))
7158 .then(this.renderFrame.bind(this, section_id, in_table, option_index));
7159 },
7160
7161 /** @private */
7162 handleValueChange: function(section_id, state, ev) {
7163 if (typeof(this.onchange) != 'function')
7164 return;
7165
7166 var value = this.formvalue(section_id);
7167
7168 if (isEqual(value, state.previousValue))
7169 return;
7170
7171 state.previousValue = value;
7172 this.onchange.call(this, ev, section_id, value);
7173 },
7174
7175 /** @private */
7176 renderFrame: function(section_id, in_table, option_index, nodes) {
7177 var config_name = this.uciconfig || this.section.uciconfig || this.map.config,
7178 depend_list = this.transformDepList(section_id),
7179 optionEl;
7180
7181 if (in_table) {
7182 var title = this.stripTags(this.title).trim();
7183 optionEl = E('td', {
7184 'class': 'td cbi-value-field',
7185 'data-title': (title != '') ? title : null,
7186 'data-description': this.stripTags(this.description).trim(),
7187 'data-name': this.option,
7188 'data-widget': this.typename || (this.template ? this.template.replace(/^.+\//, '') : null) || this.__name__
7189 }, E('div', {
7190 'id': 'cbi-%s-%s-%s'.format(config_name, section_id, this.option),
7191 'data-index': option_index,
7192 'data-depends': depend_list,
7193 'data-field': this.cbid(section_id)
7194 }));
7195 }
7196 else {
7197 optionEl = E('div', {
7198 'class': 'cbi-value',
7199 'id': 'cbi-%s-%s-%s'.format(config_name, section_id, this.option),
7200 'data-index': option_index,
7201 'data-depends': depend_list,
7202 'data-field': this.cbid(section_id),
7203 'data-name': this.option,
7204 'data-widget': this.typename || (this.template ? this.template.replace(/^.+\//, '') : null) || this.__name__
7205 });
7206
7207 if (this.last_child)
7208 optionEl.classList.add('cbi-value-last');
7209
7210 if (typeof(this.title) === 'string' &amp;&amp; this.title !== '') {
7211 optionEl.appendChild(E('label', {
7212 'class': 'cbi-value-title',
7213 'for': 'widget.cbid.%s.%s.%s'.format(config_name, section_id, this.option),
7214 'click': function(ev) {
7215 var node = ev.currentTarget,
7216 elem = node.nextElementSibling.querySelector('#' + node.getAttribute('for')) || node.nextElementSibling.querySelector('[data-widget-id="' + node.getAttribute('for') + '"]');
7217
7218 if (elem) {
7219 elem.click();
7220 elem.focus();
7221 }
7222 }
7223 },
7224 this.titleref ? E('a', {
7225 'class': 'cbi-title-ref',
7226 'href': this.titleref,
7227 'title': this.titledesc || _('Go to relevant configuration page')
7228 }, this.title) : this.title));
7229
7230 optionEl.appendChild(E('div', { 'class': 'cbi-value-field' }));
7231 }
7232 }
7233
7234 if (nodes)
7235 (optionEl.lastChild || optionEl).appendChild(nodes);
7236
7237 if (!in_table &amp;&amp; typeof(this.description) === 'string' &amp;&amp; this.description !== '')
7238 dom.append(optionEl.lastChild || optionEl,
7239 E('div', { 'class': 'cbi-value-description' }, this.description.trim()));
7240
7241 if (depend_list &amp;&amp; depend_list.length)
7242 optionEl.classList.add('hidden');
7243
7244 optionEl.addEventListener('widget-change',
7245 L.bind(this.map.checkDepends, this.map));
7246
7247 optionEl.addEventListener('widget-change',
7248 L.bind(this.handleValueChange, this, section_id, {}));
7249
7250 dom.bindClassInstance(optionEl, this);
7251
7252 return optionEl;
7253 },
7254
7255 /** @private */
7256 renderWidget: function(section_id, option_index, cfgvalue) {
7257 var value = (cfgvalue != null) ? cfgvalue : this.default,
7258 choices = this.transformChoices(),
7259 widget;
7260
7261 if (choices) {
7262 var placeholder = (this.optional || this.rmempty)
7263 ? E('em', _('unspecified')) : _('-- Please choose --');
7264
7265 widget = new ui.Combobox(Array.isArray(value) ? value.join(' ') : value, choices, {
7266 id: this.cbid(section_id),
7267 sort: this.keylist,
7268 optional: this.optional || this.rmempty,
7269 datatype: this.datatype,
7270 select_placeholder: this.placeholder || placeholder,
7271 validate: L.bind(this.validate, this, section_id),
7272 disabled: (this.readonly != null) ? this.readonly : this.map.readonly
7273 });
7274 }
7275 else {
7276 widget = new ui.Textfield(Array.isArray(value) ? value.join(' ') : value, {
7277 id: this.cbid(section_id),
7278 password: this.password,
7279 optional: this.optional || this.rmempty,
7280 datatype: this.datatype,
7281 placeholder: this.placeholder,
7282 validate: L.bind(this.validate, this, section_id),
7283 disabled: (this.readonly != null) ? this.readonly : this.map.readonly
7284 });
7285 }
7286
7287 return widget.render();
7288 }
7289 });
7290
7291 /**
7292 * @class DynamicList
7293 * @memberof LuCI.form
7294 * @augments LuCI.form.Value
7295 * @hideconstructor
7296 * @classdesc
7297 *
7298 * The `DynamicList` class represents a multi value widget allowing the user
7299 * to enter multiple unique values, optionally selected from a set of
7300 * predefined choices. It builds upon the {@link LuCI.ui.DynamicList} widget.
7301 *
7302 * @param {LuCI.form.Map|LuCI.form.JSONMap} form
7303 * The configuration form this section is added to. It is automatically passed
7304 * by [option()]{@link LuCI.form.AbstractSection#option} or
7305 * [taboption()]{@link LuCI.form.AbstractSection#taboption} when adding the
7306 * option to the section.
7307 *
7308 * @param {LuCI.form.AbstractSection} section
7309 * The configuration section this option is added to. It is automatically passed
7310 * by [option()]{@link LuCI.form.AbstractSection#option} or
7311 * [taboption()]{@link LuCI.form.AbstractSection#taboption} when adding the
7312 * option to the section.
7313 *
7314 * @param {string} option
7315 * The name of the UCI option to map.
7316 *
7317 * @param {string} [title]
7318 * The title caption of the option element.
7319 *
7320 * @param {string} [description]
7321 * The description text of the option element.
7322 */
7323 var CBIDynamicList = CBIValue.extend(/** @lends LuCI.form.DynamicList.prototype */ {
7324 __name__: 'CBI.DynamicList',
7325
7326 /** @private */
7327 renderWidget: function(section_id, option_index, cfgvalue) {
7328 var value = (cfgvalue != null) ? cfgvalue : this.default,
7329 choices = this.transformChoices(),
7330 items = L.toArray(value);
7331
7332 var widget = new ui.DynamicList(items, choices, {
7333 id: this.cbid(section_id),
7334 sort: this.keylist,
7335 optional: this.optional || this.rmempty,
7336 datatype: this.datatype,
7337 placeholder: this.placeholder,
7338 validate: L.bind(this.validate, this, section_id),
7339 disabled: (this.readonly != null) ? this.readonly : this.map.readonly
7340 });
7341
7342 return widget.render();
7343 },
7344 });
7345
7346 /**
7347 * @class ListValue
7348 * @memberof LuCI.form
7349 * @augments LuCI.form.Value
7350 * @hideconstructor
7351 * @classdesc
7352 *
7353 * The `ListValue` class implements a simple static HTML select element
7354 * allowing the user chose a single value from a set of predefined choices.
7355 * It builds upon the {@link LuCI.ui.Select} widget.
7356 *
7357 * @param {LuCI.form.Map|LuCI.form.JSONMap} form
7358 * The configuration form this section is added to. It is automatically passed
7359 * by [option()]{@link LuCI.form.AbstractSection#option} or
7360 * [taboption()]{@link LuCI.form.AbstractSection#taboption} when adding the
7361 * option to the section.
7362 *
7363 * @param {LuCI.form.AbstractSection} section
7364 * The configuration section this option is added to. It is automatically passed
7365 * by [option()]{@link LuCI.form.AbstractSection#option} or
7366 * [taboption()]{@link LuCI.form.AbstractSection#taboption} when adding the
7367 * option to the section.
7368 *
7369 * @param {string} option
7370 * The name of the UCI option to map.
7371 *
7372 * @param {string} [title]
7373 * The title caption of the option element.
7374 *
7375 * @param {string} [description]
7376 * The description text of the option element.
7377 */
7378 var CBIListValue = CBIValue.extend(/** @lends LuCI.form.ListValue.prototype */ {
7379 __name__: 'CBI.ListValue',
7380
7381 __init__: function() {
7382 this.super('__init__', arguments);
7383 this.widget = 'select';
7384 this.orientation = 'horizontal';
7385 this.deplist = [];
7386 },
7387
7388 /**
7389 * Set the size attribute of the underlying HTML select element.
7390 *
7391 * @name LuCI.form.ListValue.prototype#size
7392 * @type number
7393 * @default null
7394 */
7395
7396 /**
7397 * Set the type of the underlying form controls.
7398 *
7399 * May be one of `select` or `radio`. If set to `select`, an HTML
7400 * select element is rendered, otherwise a collection of `radio`
7401 * elements is used.
7402 *
7403 * @name LuCI.form.ListValue.prototype#widget
7404 * @type string
7405 * @default select
7406 */
7407
7408 /**
7409 * Set the orientation of the underlying radio or checkbox elements.
7410 *
7411 * May be one of `horizontal` or `vertical`. Only applies to non-select
7412 * widget types.
7413 *
7414 * @name LuCI.form.ListValue.prototype#orientation
7415 * @type string
7416 * @default horizontal
7417 */
7418
7419 /** @private */
7420 renderWidget: function(section_id, option_index, cfgvalue) {
7421 var choices = this.transformChoices();
7422 var widget = new ui.Select((cfgvalue != null) ? cfgvalue : this.default, choices, {
7423 id: this.cbid(section_id),
7424 size: this.size,
7425 sort: this.keylist,
7426 widget: this.widget,
7427 optional: this.optional,
7428 orientation: this.orientation,
7429 placeholder: this.placeholder,
7430 validate: L.bind(this.validate, this, section_id),
7431 disabled: (this.readonly != null) ? this.readonly : this.map.readonly
7432 });
7433
7434 return widget.render();
7435 },
7436 });
7437
7438 /**
7439 * @class FlagValue
7440 * @memberof LuCI.form
7441 * @augments LuCI.form.Value
7442 * @hideconstructor
7443 * @classdesc
7444 *
7445 * The `FlagValue` element builds upon the {@link LuCI.ui.Checkbox} widget to
7446 * implement a simple checkbox element.
7447 *
7448 * @param {LuCI.form.Map|LuCI.form.JSONMap} form
7449 * The configuration form this section is added to. It is automatically passed
7450 * by [option()]{@link LuCI.form.AbstractSection#option} or
7451 * [taboption()]{@link LuCI.form.AbstractSection#taboption} when adding the
7452 * option to the section.
7453 *
7454 * @param {LuCI.form.AbstractSection} section
7455 * The configuration section this option is added to. It is automatically passed
7456 * by [option()]{@link LuCI.form.AbstractSection#option} or
7457 * [taboption()]{@link LuCI.form.AbstractSection#taboption} when adding the
7458 * option to the section.
7459 *
7460 * @param {string} option
7461 * The name of the UCI option to map.
7462 *
7463 * @param {string} [title]
7464 * The title caption of the option element.
7465 *
7466 * @param {string} [description]
7467 * The description text of the option element.
7468 */
7469 var CBIFlagValue = CBIValue.extend(/** @lends LuCI.form.FlagValue.prototype */ {
7470 __name__: 'CBI.FlagValue',
7471
7472 __init__: function() {
7473 this.super('__init__', arguments);
7474
7475 this.enabled = '1';
7476 this.disabled = '0';
7477 this.default = this.disabled;
7478 },
7479
7480 /**
7481 * Sets the input value to use for the checkbox checked state.
7482 *
7483 * @name LuCI.form.FlagValue.prototype#enabled
7484 * @type string
7485 * @default 1
7486 */
7487
7488 /**
7489 * Sets the input value to use for the checkbox unchecked state.
7490 *
7491 * @name LuCI.form.FlagValue.prototype#disabled
7492 * @type string
7493 * @default 0
7494 */
7495
7496 /**
7497 * Set a tooltip for the flag option.
7498 *
7499 * If set to a string, it will be used as-is as a tooltip.
7500 *
7501 * If set to a function, the function will be invoked and the return
7502 * value will be shown as a tooltip. If the return value of the function
7503 * is `null` no tooltip will be set.
7504 *
7505 * @name LuCI.form.FlagValue.prototype#tooltip
7506 * @type string|function
7507 * @default null
7508 */
7509
7510 /**
7511 * Set a tooltip icon for the flag option.
7512 *
7513 * If set, this icon will be shown for the default one.
7514 * This could also be a png icon from the resources directory.
7515 *
7516 * @name LuCI.form.FlagValue.prototype#tooltipicon
7517 * @type string
7518 * @default 'ℹ️';
7519 */
7520
7521 /** @private */
7522 renderWidget: function(section_id, option_index, cfgvalue) {
7523 var tooltip = null;
7524
7525 if (typeof(this.tooltip) == 'function')
7526 tooltip = this.tooltip.apply(this, [section_id]);
7527 else if (typeof(this.tooltip) == 'string')
7528 tooltip = (arguments.length > 1) ? ''.format.apply(this.tooltip, this.varargs(arguments, 1)) : this.tooltip;
7529
7530 var widget = new ui.Checkbox((cfgvalue != null) ? cfgvalue : this.default, {
7531 id: this.cbid(section_id),
7532 value_enabled: this.enabled,
7533 value_disabled: this.disabled,
7534 validate: L.bind(this.validate, this, section_id),
7535 tooltip: tooltip,
7536 tooltipicon: this.tooltipicon,
7537 disabled: (this.readonly != null) ? this.readonly : this.map.readonly
7538 });
7539
7540 return widget.render();
7541 },
7542
7543 /**
7544 * Query the checked state of the underlying checkbox widget and return
7545 * either the `enabled` or the `disabled` property value, depending on
7546 * the checked state.
7547 *
7548 * @override
7549 */
7550 formvalue: function(section_id) {
7551 var elem = this.getUIElement(section_id),
7552 checked = elem ? elem.isChecked() : false;
7553 return checked ? this.enabled : this.disabled;
7554 },
7555
7556 /**
7557 * Query the checked state of the underlying checkbox widget and return
7558 * either a localized `Yes` or `No` string, depending on the checked state.
7559 *
7560 * @override
7561 */
7562 textvalue: function(section_id) {
7563 var cval = this.cfgvalue(section_id);
7564
7565 if (cval == null)
7566 cval = this.default;
7567
7568 return (cval == this.enabled) ? _('Yes') : _('No');
7569 },
7570
7571 /** @override */
7572 parse: function(section_id) {
7573 if (this.isActive(section_id)) {
7574 var fval = this.formvalue(section_id);
7575
7576 if (!this.isValid(section_id)) {
7577 var title = this.stripTags(this.title).trim();
7578 var error = this.getValidationError(section_id);
7579 return Promise.reject(new TypeError(
7580 _('Option "%s" contains an invalid input value.').format(title || this.option) + ' ' + error));
7581 }
7582
7583 if (fval == this.default &amp;&amp; (this.optional || this.rmempty))
7584 return Promise.resolve(this.remove(section_id));
7585 else
7586 return Promise.resolve(this.write(section_id, fval));
7587 }
7588 else if (!this.retain) {
7589 return Promise.resolve(this.remove(section_id));
7590 }
7591 },
7592 });
7593
7594 /**
7595 * @class MultiValue
7596 * @memberof LuCI.form
7597 * @augments LuCI.form.DynamicList
7598 * @hideconstructor
7599 * @classdesc
7600 *
7601 * The `MultiValue` class is a modified variant of the `DynamicList` element
7602 * which leverages the {@link LuCI.ui.Dropdown} widget to implement a multi
7603 * select dropdown element.
7604 *
7605 * @param {LuCI.form.Map|LuCI.form.JSONMap} form
7606 * The configuration form this section is added to. It is automatically passed
7607 * by [option()]{@link LuCI.form.AbstractSection#option} or
7608 * [taboption()]{@link LuCI.form.AbstractSection#taboption} when adding the
7609 * option to the section.
7610 *
7611 * @param {LuCI.form.AbstractSection} section
7612 * The configuration section this option is added to. It is automatically passed
7613 * by [option()]{@link LuCI.form.AbstractSection#option} or
7614 * [taboption()]{@link LuCI.form.AbstractSection#taboption} when adding the
7615 * option to the section.
7616 *
7617 * @param {string} option
7618 * The name of the UCI option to map.
7619 *
7620 * @param {string} [title]
7621 * The title caption of the option element.
7622 *
7623 * @param {string} [description]
7624 * The description text of the option element.
7625 */
7626 var CBIMultiValue = CBIDynamicList.extend(/** @lends LuCI.form.MultiValue.prototype */ {
7627 __name__: 'CBI.MultiValue',
7628
7629 __init__: function() {
7630 this.super('__init__', arguments);
7631 this.placeholder = _('-- Please choose --');
7632 },
7633
7634 /**
7635 * Allows to specify the [display_items]{@link LuCI.ui.Dropdown.InitOptions}
7636 * property of the underlying dropdown widget. If omitted, the value of
7637 * the `size` property is used or `3` when `size` is unspecified as well.
7638 *
7639 * @name LuCI.form.MultiValue.prototype#display_size
7640 * @type number
7641 * @default null
7642 */
7643
7644 /**
7645 * Allows to specify the [dropdown_items]{@link LuCI.ui.Dropdown.InitOptions}
7646 * property of the underlying dropdown widget. If omitted, the value of
7647 * the `size` property is used or `-1` when `size` is unspecified as well.
7648 *
7649 * @name LuCI.form.MultiValue.prototype#dropdown_size
7650 * @type number
7651 * @default null
7652 */
7653
7654 /** @private */
7655 renderWidget: function(section_id, option_index, cfgvalue) {
7656 var value = (cfgvalue != null) ? cfgvalue : this.default,
7657 choices = this.transformChoices();
7658
7659 var widget = new ui.Dropdown(L.toArray(value), choices, {
7660 id: this.cbid(section_id),
7661 sort: this.keylist,
7662 multiple: true,
7663 optional: this.optional || this.rmempty,
7664 select_placeholder: this.placeholder,
7665 display_items: this.display_size || this.size || 3,
7666 dropdown_items: this.dropdown_size || this.size || -1,
7667 validate: L.bind(this.validate, this, section_id),
7668 disabled: (this.readonly != null) ? this.readonly : this.map.readonly
7669 });
7670
7671 return widget.render();
7672 },
7673 });
7674
7675 /**
7676 * @class TextValue
7677 * @memberof LuCI.form
7678 * @augments LuCI.form.Value
7679 * @hideconstructor
7680 * @classdesc
7681 *
7682 * The `TextValue` class implements a multi-line textarea input using
7683 * {@link LuCI.ui.Textarea}.
7684 *
7685 * @param {LuCI.form.Map|LuCI.form.JSONMap} form
7686 * The configuration form this section is added to. It is automatically passed
7687 * by [option()]{@link LuCI.form.AbstractSection#option} or
7688 * [taboption()]{@link LuCI.form.AbstractSection#taboption} when adding the
7689 * option to the section.
7690 *
7691 * @param {LuCI.form.AbstractSection} section
7692 * The configuration section this option is added to. It is automatically passed
7693 * by [option()]{@link LuCI.form.AbstractSection#option} or
7694 * [taboption()]{@link LuCI.form.AbstractSection#taboption} when adding the
7695 * option to the section.
7696 *
7697 * @param {string} option
7698 * The name of the UCI option to map.
7699 *
7700 * @param {string} [title]
7701 * The title caption of the option element.
7702 *
7703 * @param {string} [description]
7704 * The description text of the option element.
7705 */
7706 var CBITextValue = CBIValue.extend(/** @lends LuCI.form.TextValue.prototype */ {
7707 __name__: 'CBI.TextValue',
7708
7709 /** @ignore */
7710 value: null,
7711
7712 /**
7713 * Enforces the use of a monospace font for the textarea contents when set
7714 * to `true`.
7715 *
7716 * @name LuCI.form.TextValue.prototype#monospace
7717 * @type boolean
7718 * @default false
7719 */
7720
7721 /**
7722 * Allows to specify the [cols]{@link LuCI.ui.Textarea.InitOptions}
7723 * property of the underlying textarea widget.
7724 *
7725 * @name LuCI.form.TextValue.prototype#cols
7726 * @type number
7727 * @default null
7728 */
7729
7730 /**
7731 * Allows to specify the [rows]{@link LuCI.ui.Textarea.InitOptions}
7732 * property of the underlying textarea widget.
7733 *
7734 * @name LuCI.form.TextValue.prototype#rows
7735 * @type number
7736 * @default null
7737 */
7738
7739 /**
7740 * Allows to specify the [wrap]{@link LuCI.ui.Textarea.InitOptions}
7741 * property of the underlying textarea widget.
7742 *
7743 * @name LuCI.form.TextValue.prototype#wrap
7744 * @type number
7745 * @default null
7746 */
7747
7748 /** @private */
7749 renderWidget: function(section_id, option_index, cfgvalue) {
7750 var value = (cfgvalue != null) ? cfgvalue : this.default;
7751
7752 var widget = new ui.Textarea(value, {
7753 id: this.cbid(section_id),
7754 optional: this.optional || this.rmempty,
7755 placeholder: this.placeholder,
7756 monospace: this.monospace,
7757 cols: this.cols,
7758 rows: this.rows,
7759 wrap: this.wrap,
7760 validate: L.bind(this.validate, this, section_id),
7761 disabled: (this.readonly != null) ? this.readonly : this.map.readonly
7762 });
7763
7764 return widget.render();
7765 }
7766 });
7767
7768 /**
7769 * @class DummyValue
7770 * @memberof LuCI.form
7771 * @augments LuCI.form.Value
7772 * @hideconstructor
7773 * @classdesc
7774 *
7775 * The `DummyValue` element wraps an {@link LuCI.ui.Hiddenfield} widget and
7776 * renders the underlying UCI option or default value as readonly text.
7777 *
7778 * @param {LuCI.form.Map|LuCI.form.JSONMap} form
7779 * The configuration form this section is added to. It is automatically passed
7780 * by [option()]{@link LuCI.form.AbstractSection#option} or
7781 * [taboption()]{@link LuCI.form.AbstractSection#taboption} when adding the
7782 * option to the section.
7783 *
7784 * @param {LuCI.form.AbstractSection} section
7785 * The configuration section this option is added to. It is automatically passed
7786 * by [option()]{@link LuCI.form.AbstractSection#option} or
7787 * [taboption()]{@link LuCI.form.AbstractSection#taboption} when adding the
7788 * option to the section.
7789 *
7790 * @param {string} option
7791 * The name of the UCI option to map.
7792 *
7793 * @param {string} [title]
7794 * The title caption of the option element.
7795 *
7796 * @param {string} [description]
7797 * The description text of the option element.
7798 */
7799 var CBIDummyValue = CBIValue.extend(/** @lends LuCI.form.DummyValue.prototype */ {
7800 __name__: 'CBI.DummyValue',
7801
7802 /**
7803 * Set a URL which is opened when clicking on the dummy value text.
7804 *
7805 * By setting this property, the dummy value text is wrapped in an `&lt;a>`
7806 * element with the property value used as `href` attribute.
7807 *
7808 * @name LuCI.form.DummyValue.prototype#href
7809 * @type string
7810 * @default null
7811 */
7812
7813 /**
7814 * Treat the UCI option value (or the `default` property value) as HTML.
7815 *
7816 * By default, the value text is HTML escaped before being rendered as
7817 * text. In some cases it may be needed to actually interpret and render
7818 * HTML contents as-is. When set to `true`, HTML escaping is disabled.
7819 *
7820 * @name LuCI.form.DummyValue.prototype#rawhtml
7821 * @type boolean
7822 * @default null
7823 */
7824
7825 /**
7826 * Render the UCI option value as hidden using the HTML display: none style property.
7827 *
7828 * By default, the value is displayed
7829 *
7830 * @name LuCI.form.DummyValue.prototype#hidden
7831 * @type boolean
7832 * @default null
7833 */
7834
7835 /** @private */
7836 renderWidget: function(section_id, option_index, cfgvalue) {
7837 var value = (cfgvalue != null) ? cfgvalue : this.default,
7838 hiddenEl = new ui.Hiddenfield(value, { id: this.cbid(section_id) }),
7839 outputEl = E('div', { 'style': this.hidden ? 'display:none' : null });
7840
7841 if (this.href &amp;&amp; !((this.readonly != null) ? this.readonly : this.map.readonly))
7842 outputEl.appendChild(E('a', { 'href': this.href }));
7843
7844 dom.append(outputEl.lastChild || outputEl,
7845 this.rawhtml ? value : [ value ]);
7846
7847 return E([
7848 outputEl,
7849 hiddenEl.render()
7850 ]);
7851 },
7852
7853 /** @override */
7854 remove: function() {},
7855
7856 /** @override */
7857 write: function() {}
7858 });
7859
7860 /**
7861 * @class ButtonValue
7862 * @memberof LuCI.form
7863 * @augments LuCI.form.Value
7864 * @hideconstructor
7865 * @classdesc
7866 *
7867 * The `DummyValue` element wraps an {@link LuCI.ui.Hiddenfield} widget and
7868 * renders the underlying UCI option or default value as readonly text.
7869 *
7870 * @param {LuCI.form.Map|LuCI.form.JSONMap} form
7871 * The configuration form this section is added to. It is automatically passed
7872 * by [option()]{@link LuCI.form.AbstractSection#option} or
7873 * [taboption()]{@link LuCI.form.AbstractSection#taboption} when adding the
7874 * option to the section.
7875 *
7876 * @param {LuCI.form.AbstractSection} section
7877 * The configuration section this option is added to. It is automatically passed
7878 * by [option()]{@link LuCI.form.AbstractSection#option} or
7879 * [taboption()]{@link LuCI.form.AbstractSection#taboption} when adding the
7880 * option to the section.
7881 *
7882 * @param {string} option
7883 * The name of the UCI option to map.
7884 *
7885 * @param {string} [title]
7886 * The title caption of the option element.
7887 *
7888 * @param {string} [description]
7889 * The description text of the option element.
7890 */
7891 var CBIButtonValue = CBIValue.extend(/** @lends LuCI.form.ButtonValue.prototype */ {
7892 __name__: 'CBI.ButtonValue',
7893
7894 /**
7895 * Override the rendered button caption.
7896 *
7897 * By default, the option title - which is passed as fourth argument to the
7898 * constructor - is used as caption for the button element. When setting
7899 * this property to a string, it is used as `String.format()` pattern with
7900 * the underlying UCI section name passed as first format argument. When
7901 * set to a function, it is invoked passing the section ID as sole argument
7902 * and the resulting return value is converted to a string before being
7903 * used as button caption.
7904 *
7905 * The default is `null`, means the option title is used as caption.
7906 *
7907 * @name LuCI.form.ButtonValue.prototype#inputtitle
7908 * @type string|function
7909 * @default null
7910 */
7911
7912 /**
7913 * Override the button style class.
7914 *
7915 * By setting this property, a specific `cbi-button-*` CSS class can be
7916 * selected to influence the style of the resulting button.
7917 *
7918 * Suitable values which are implemented by most themes are `positive`,
7919 * `negative` and `primary`.
7920 *
7921 * The default is `null`, means a neutral button styling is used.
7922 *
7923 * @name LuCI.form.ButtonValue.prototype#inputstyle
7924 * @type string
7925 * @default null
7926 */
7927
7928 /**
7929 * Override the button click action.
7930 *
7931 * By default, the underlying UCI option (or default property) value is
7932 * copied into a hidden field tied to the button element and the save
7933 * action is triggered on the parent form element.
7934 *
7935 * When this property is set to a function, it is invoked instead of
7936 * performing the default actions. The handler function will receive the
7937 * DOM click element as first and the underlying configuration section ID
7938 * as second argument.
7939 *
7940 * @name LuCI.form.ButtonValue.prototype#onclick
7941 * @type function
7942 * @default null
7943 */
7944
7945 /** @private */
7946 renderWidget: function(section_id, option_index, cfgvalue) {
7947 var value = (cfgvalue != null) ? cfgvalue : this.default,
7948 hiddenEl = new ui.Hiddenfield(value, { id: this.cbid(section_id) }),
7949 outputEl = E('div'),
7950 btn_title = this.titleFn('inputtitle', section_id) || this.titleFn('title', section_id);
7951
7952 if (value !== false)
7953 dom.content(outputEl, [
7954 E('button', {
7955 'class': 'cbi-button cbi-button-%s'.format(this.inputstyle || 'button'),
7956 'click': ui.createHandlerFn(this, function(section_id, ev) {
7957 if (this.onclick)
7958 return this.onclick(ev, section_id);
7959
7960 ev.currentTarget.parentNode.nextElementSibling.value = value;
7961 return this.map.save();
7962 }, section_id),
7963 'disabled': ((this.readonly != null) ? this.readonly : this.map.readonly) || null
7964 }, [ btn_title ])
7965 ]);
7966 else
7967 dom.content(outputEl, ' - ');
7968
7969 return E([
7970 outputEl,
7971 hiddenEl.render()
7972 ]);
7973 }
7974 });
7975
7976 /**
7977 * @class HiddenValue
7978 * @memberof LuCI.form
7979 * @augments LuCI.form.Value
7980 * @hideconstructor
7981 * @classdesc
7982 *
7983 * The `HiddenValue` element wraps an {@link LuCI.ui.Hiddenfield} widget.
7984 *
7985 * Hidden value widgets used to be necessary in legacy code which actually
7986 * submitted the underlying HTML form the server. With client side handling of
7987 * forms, there are more efficient ways to store hidden state data.
7988 *
7989 * Since this widget has no visible content, the title and description values
7990 * of this form element should be set to `null` as well to avoid a broken or
7991 * distorted form layout when rendering the option element.
7992 *
7993 * @param {LuCI.form.Map|LuCI.form.JSONMap} form
7994 * The configuration form this section is added to. It is automatically passed
7995 * by [option()]{@link LuCI.form.AbstractSection#option} or
7996 * [taboption()]{@link LuCI.form.AbstractSection#taboption} when adding the
7997 * option to the section.
7998 *
7999 * @param {LuCI.form.AbstractSection} section
8000 * The configuration section this option is added to. It is automatically passed
8001 * by [option()]{@link LuCI.form.AbstractSection#option} or
8002 * [taboption()]{@link LuCI.form.AbstractSection#taboption} when adding the
8003 * option to the section.
8004 *
8005 * @param {string} option
8006 * The name of the UCI option to map.
8007 *
8008 * @param {string} [title]
8009 * The title caption of the option element.
8010 *
8011 * @param {string} [description]
8012 * The description text of the option element.
8013 */
8014 var CBIHiddenValue = CBIValue.extend(/** @lends LuCI.form.HiddenValue.prototype */ {
8015 __name__: 'CBI.HiddenValue',
8016
8017 /** @private */
8018 renderWidget: function(section_id, option_index, cfgvalue) {
8019 var widget = new ui.Hiddenfield((cfgvalue != null) ? cfgvalue : this.default, {
8020 id: this.cbid(section_id)
8021 });
8022
8023 return widget.render();
8024 }
8025 });
8026
8027 /**
8028 * @class FileUpload
8029 * @memberof LuCI.form
8030 * @augments LuCI.form.Value
8031 * @hideconstructor
8032 * @classdesc
8033 *
8034 * The `FileUpload` element wraps an {@link LuCI.ui.FileUpload} widget and
8035 * offers the ability to browse, upload and select remote files.
8036 *
8037 * @param {LuCI.form.Map|LuCI.form.JSONMap} form
8038 * The configuration form this section is added to. It is automatically passed
8039 * by [option()]{@link LuCI.form.AbstractSection#option} or
8040 * [taboption()]{@link LuCI.form.AbstractSection#taboption} when adding the
8041 * option to the section.
8042 *
8043 * @param {LuCI.form.AbstractSection} section
8044 * The configuration section this option is added to. It is automatically passed
8045 * by [option()]{@link LuCI.form.AbstractSection#option} or
8046 * [taboption()]{@link LuCI.form.AbstractSection#taboption} when adding the
8047 * option to the section.
8048 *
8049 * @param {string} option
8050 * The name of the UCI option to map.
8051 *
8052 * @param {string} [title]
8053 * The title caption of the option element.
8054 *
8055 * @param {string} [description]
8056 * The description text of the option element.
8057 */
8058 var CBIFileUpload = CBIValue.extend(/** @lends LuCI.form.FileUpload.prototype */ {
8059 __name__: 'CBI.FileSelect',
8060
8061 __init__: function(/* ... */) {
8062 this.super('__init__', arguments);
8063
8064 this.show_hidden = false;
8065 this.enable_upload = true;
8066 this.enable_remove = true;
8067 this.root_directory = '/etc/luci-uploads';
8068 },
8069
8070 /**
8071 * Toggle display of hidden files.
8072 *
8073 * Display hidden files when rendering the remote directory listing.
8074 * Note that this is merely a cosmetic feature, hidden files are always
8075 * included in received remote file listings.
8076 *
8077 * The default is `false`, means hidden files are not displayed.
8078 *
8079 * @name LuCI.form.FileUpload.prototype#show_hidden
8080 * @type boolean
8081 * @default false
8082 */
8083
8084 /**
8085 * Toggle file upload functionality.
8086 *
8087 * When set to `true`, the underlying widget provides a button which lets
8088 * the user select and upload local files to the remote system.
8089 * Note that this is merely a cosmetic feature, remote upload access is
8090 * controlled by the session ACL rules.
8091 *
8092 * The default is `true`, means file upload functionality is displayed.
8093 *
8094 * @name LuCI.form.FileUpload.prototype#enable_upload
8095 * @type boolean
8096 * @default true
8097 */
8098
8099 /**
8100 * Toggle remote file delete functionality.
8101 *
8102 * When set to `true`, the underlying widget provides a buttons which let
8103 * the user delete files from remote directories. Note that this is merely
8104 * a cosmetic feature, remote delete permissions are controlled by the
8105 * session ACL rules.
8106 *
8107 * The default is `true`, means file removal buttons are displayed.
8108 *
8109 * @name LuCI.form.FileUpload.prototype#enable_remove
8110 * @type boolean
8111 * @default true
8112 */
8113
8114 /**
8115 * Specify the root directory for file browsing.
8116 *
8117 * This property defines the topmost directory the file browser widget may
8118 * navigate to, the UI will not allow browsing directories outside this
8119 * prefix. Note that this is merely a cosmetic feature, remote file access
8120 * and directory listing permissions are controlled by the session ACL
8121 * rules.
8122 *
8123 * The default is `/etc/luci-uploads`.
8124 *
8125 * @name LuCI.form.FileUpload.prototype#root_directory
8126 * @type string
8127 * @default /etc/luci-uploads
8128 */
8129
8130 /** @private */
8131 renderWidget: function(section_id, option_index, cfgvalue) {
8132 var browserEl = new ui.FileUpload((cfgvalue != null) ? cfgvalue : this.default, {
8133 id: this.cbid(section_id),
8134 name: this.cbid(section_id),
8135 show_hidden: this.show_hidden,
8136 enable_upload: this.enable_upload,
8137 enable_remove: this.enable_remove,
8138 root_directory: this.root_directory,
8139 disabled: (this.readonly != null) ? this.readonly : this.map.readonly
8140 });
8141
8142 return browserEl.render();
8143 }
8144 });
8145
8146 /**
8147 * @class SectionValue
8148 * @memberof LuCI.form
8149 * @augments LuCI.form.Value
8150 * @hideconstructor
8151 * @classdesc
8152 *
8153 * The `SectionValue` widget embeds a form section element within an option
8154 * element container, allowing to nest form sections into other sections.
8155 *
8156 * @param {LuCI.form.Map|LuCI.form.JSONMap} form
8157 * The configuration form this section is added to. It is automatically passed
8158 * by [option()]{@link LuCI.form.AbstractSection#option} or
8159 * [taboption()]{@link LuCI.form.AbstractSection#taboption} when adding the
8160 * option to the section.
8161 *
8162 * @param {LuCI.form.AbstractSection} section
8163 * The configuration section this option is added to. It is automatically passed
8164 * by [option()]{@link LuCI.form.AbstractSection#option} or
8165 * [taboption()]{@link LuCI.form.AbstractSection#taboption} when adding the
8166 * option to the section.
8167 *
8168 * @param {string} option
8169 * The internal name of the option element holding the section. Since a section
8170 * container element does not read or write any configuration itself, the name
8171 * is only used internally and does not need to relate to any underlying UCI
8172 * option name.
8173 *
8174 * @param {LuCI.form.AbstractSection} subsection_class
8175 * The class to use for instantiating the nested section element. Note that
8176 * the class value itself is expected here, not a class instance obtained by
8177 * calling `new`. The given class argument must be a subclass of the
8178 * `AbstractSection` class.
8179 *
8180 * @param {...*} [class_args]
8181 * All further arguments are passed as-is to the subclass constructor. Refer
8182 * to the corresponding class constructor documentations for details.
8183 */
8184 var CBISectionValue = CBIValue.extend(/** @lends LuCI.form.SectionValue.prototype */ {
8185 __name__: 'CBI.ContainerValue',
8186 __init__: function(map, section, option, cbiClass /*, ... */) {
8187 this.super('__init__', [map, section, option]);
8188
8189 if (!CBIAbstractSection.isSubclass(cbiClass))
8190 throw 'Sub section must be a descendent of CBIAbstractSection';
8191
8192 this.subsection = cbiClass.instantiate(this.varargs(arguments, 4, this.map));
8193 this.subsection.parentoption = this;
8194 },
8195
8196 /**
8197 * Access the embedded section instance.
8198 *
8199 * This property holds a reference to the instantiated nested section.
8200 *
8201 * @name LuCI.form.SectionValue.prototype#subsection
8202 * @type LuCI.form.AbstractSection
8203 * @readonly
8204 */
8205
8206 /** @override */
8207 load: function(section_id) {
8208 return this.subsection.load(section_id);
8209 },
8210
8211 /** @override */
8212 parse: function(section_id) {
8213 return this.subsection.parse(section_id);
8214 },
8215
8216 /** @private */
8217 renderWidget: function(section_id, option_index, cfgvalue) {
8218 return this.subsection.render(section_id);
8219 },
8220
8221 /** @private */
8222 checkDepends: function(section_id) {
8223 this.subsection.checkDepends(section_id);
8224 return CBIValue.prototype.checkDepends.apply(this, [ section_id ]);
8225 },
8226
8227 /**
8228 * Since the section container is not rendering an own widget,
8229 * its `value()` implementation is a no-op.
8230 *
8231 * @override
8232 */
8233 value: function() {},
8234
8235 /**
8236 * Since the section container is not tied to any UCI configuration,
8237 * its `write()` implementation is a no-op.
8238 *
8239 * @override
8240 */
8241 write: function() {},
8242
8243 /**
8244 * Since the section container is not tied to any UCI configuration,
8245 * its `remove()` implementation is a no-op.
8246 *
8247 * @override
8248 */
8249 remove: function() {},
8250
8251 /**
8252 * Since the section container is not tied to any UCI configuration,
8253 * its `cfgvalue()` implementation will always return `null`.
8254 *
8255 * @override
8256 * @returns {null}
8257 */
8258 cfgvalue: function() { return null },
8259
8260 /**
8261 * Since the section container is not tied to any UCI configuration,
8262 * its `formvalue()` implementation will always return `null`.
8263 *
8264 * @override
8265 * @returns {null}
8266 */
8267 formvalue: function() { return null }
8268 });
8269
8270 /**
8271 * @class form
8272 * @memberof LuCI
8273 * @hideconstructor
8274 * @classdesc
8275 *
8276 * The LuCI form class provides high level abstractions for creating
8277 * UCI- or JSON backed configurations forms.
8278 *
8279 * To import the class in views, use `'require form'`, to import it in
8280 * external JavaScript, use `L.require("form").then(...)`.
8281 *
8282 * A typical form is created by first constructing a
8283 * {@link LuCI.form.Map} or {@link LuCI.form.JSONMap} instance using `new` and
8284 * by subsequently adding sections and options to it. Finally
8285 * [render()]{@link LuCI.form.Map#render} is invoked on the instance to
8286 * assemble the HTML markup and insert it into the DOM.
8287 *
8288 * Example:
8289 *
8290 * &lt;pre>
8291 * 'use strict';
8292 * 'require form';
8293 *
8294 * var m, s, o;
8295 *
8296 * m = new form.Map('example', 'Example form',
8297 * 'This is an example form mapping the contents of /etc/config/example');
8298 *
8299 * s = m.section(form.NamedSection, 'first_section', 'example', 'The first section',
8300 * 'This sections maps "config example first_section" of /etc/config/example');
8301 *
8302 * o = s.option(form.Flag, 'some_bool', 'A checkbox option');
8303 *
8304 * o = s.option(form.ListValue, 'some_choice', 'A select element');
8305 * o.value('choice1', 'The first choice');
8306 * o.value('choice2', 'The second choice');
8307 *
8308 * m.render().then(function(node) {
8309 * document.body.appendChild(node);
8310 * });
8311 * &lt;/pre>
8312 */
8313 return baseclass.extend(/** @lends LuCI.form.prototype */ {
8314 Map: CBIMap,
8315 JSONMap: CBIJSONMap,
8316 AbstractSection: CBIAbstractSection,
8317 AbstractValue: CBIAbstractValue,
8318
8319 TypedSection: CBITypedSection,
8320 TableSection: CBITableSection,
8321 GridSection: CBIGridSection,
8322 NamedSection: CBINamedSection,
8323
8324 Value: CBIValue,
8325 DynamicList: CBIDynamicList,
8326 ListValue: CBIListValue,
8327 Flag: CBIFlagValue,
8328 MultiValue: CBIMultiValue,
8329 TextValue: CBITextValue,
8330 DummyValue: CBIDummyValue,
8331 Button: CBIButtonValue,
8332 HiddenValue: CBIHiddenValue,
8333 FileUpload: CBIFileUpload,
8334 SectionValue: CBISectionValue
8335 });
8336 </code></pre>
8337 </article>
8338 </section>
8339
8340
8341
8342
8343
8344
8345
8346
8347 <footer>
8348 Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Fri Jan 26 2024 01:00:30 GMT+0000 (Coordinated Universal Time)
8349 </footer>
8350 </div>
8351 </div>
8352 <script>prettyPrint();</script>
8353 <script src="scripts/jaguar.js"></script>
8354 </body>
8355 </html>