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