PluginProbe
wp-forecast / 3.6
wp-forecast v3.6
10.0 trunk 1.4 1.6 1.7 1.8 1.9 2.0 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 3..5 3..8 3.0 3.1 3.2 3.3 3.4 3.6 All 86 releases
wp-forecast / wpf_sa_js.php

wpf_sa_js.php in wp-forecast 3.6, at wpf_sa_js.php

156 lines 5.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 // this is the javascript code for the ckeck/uncheck all forecast boxes
3 ?>
4 <script type="text/javascript">
5 function check(fname)
6 {
7 if (fname=="day") {
8 sammelvalue=document.options.alldays.checked;
9 document.options.day1.checked=sammelvalue;
10 document.options.day2.checked=sammelvalue;
11 document.options.day3.checked=sammelvalue;
12 document.options.day4.checked=sammelvalue;
13 document.options.day5.checked=sammelvalue;
14 document.options.day6.checked=sammelvalue;
15 document.options.day7.checked=sammelvalue;
16 document.options.day8.checked=sammelvalue;
17 document.options.day9.checked=sammelvalue;
18 } else {
19 sammelvalue=document.options.allnight.checked;
20 document.options.night1.checked=sammelvalue;
21 document.options.night2.checked=sammelvalue;
22 document.options.night3.checked=sammelvalue;
23 document.options.night4.checked=sammelvalue;
24 document.options.night5.checked=sammelvalue;
25 document.options.night6.checked=sammelvalue;
26 document.options.night7.checked=sammelvalue;
27 document.options.night8.checked=sammelvalue;
28 document.options.night9.checked=sammelvalue;
29 }
30 return !sammelvalue;
31 }
32 <?php
33 // this is the javascript code for switchgin between weather providers
34 ?>
35 function apifields(service)
36 {
37 if (service=="accu") {
38 document.options.apikey1.disabled=true;
39 // document.options.apikey2.disabled=true;
40 if (typeof(document.options.allnight) != "undefined"){
41 document.options.allnight.disabled=false;
42 document.options.night1.disabled=false;
43 document.options.night2.disabled=false;
44 document.options.night3.disabled=false;
45 document.options.night4.disabled=false;
46 document.options.night5.disabled=false;
47 document.options.night6.disabled=false;
48 document.options.night7.disabled=false;
49 document.options.night8.disabled=false;
50 document.options.night9.disabled=false;
51 document.options.day8.disabled=false;
52 document.options.day9.disabled=false;
53 document.options.d_d_wind.disabled=false;
54 document.options.d_n_wind.disabled=false;
55 document.options.d_d_wgusts.disabled=false;
56 document.options.d_n_wgusts.disabled=false;
57 }
58 }
59
60 if (service=="com") {
61 document.options.apikey1.disabled=false;
62 //document.options.apikey2.disabled=false;
63 }
64
65 if (service=="google") {
66 document.woptions.apikey1.disabled=false;
67 //document.woptions.apikey2.disabled=false;
68 if (typeof(document.woptions.allnight) != "undefined"){
69 document.woptions.allnight.disabled=true;
70 document.woptions.night1.disabled=true;
71 document.woptions.night2.disabled=true;
72 document.woptions.night3.disabled=true;
73 document.woptions.night4.disabled=true;
74 document.woptions.night5.disabled=true;
75 document.woptions.night6.disabled=true;
76 document.woptions.night7.disabled=true;
77 document.woptions.night8.disabled=true;
78 document.woptions.night9.disabled=true;
79 document.woptions.day6.disabled=true;
80 document.woptions.day7.disabled=true;
81 document.woptions.day8.disabled=true;
82 document.woptions.day9.disabled=true;
83 document.woptions.d_c_sunrise.checked=false;
84 document.woptions.d_c_sunset.checked=false;
85 document.woptions.d_d_wind.checked=false;
86 document.woptions.d_n_wind.checked=false;
87 document.woptions.d_c_wgusts.checked=false;
88 document.woptions.d_d_wgusts.checked=false;
89 document.woptions.d_n_wgusts.checked=false;
90 document.woptions.d_c_humid.checked=false;
91 document.woptions.d_c_press.checked=false;
92 document.woptions.d_c_real.checked=false;
93 document.woptions.d_c_sunrise.disabled=true;
94 document.woptions.d_c_sunset.disabled=true;
95 document.woptions.d_d_wind.disabled=true;
96 document.woptions.d_n_wind.disabled=true;
97 document.woptions.d_c_humid.disabled=true;
98 document.woptions.d_c_press.disabled=true;
99 document.woptions.d_c_real.disabled=true;
100 document.woptions.d_c_wgusts.disabled=true;
101 document.woptions.d_d_wgusts.disabled=true;
102 document.woptions.d_n_wgusts.disabled=true;
103 }
104 }
105
106 if (service=="bug") {
107 document.options.apikey1.disabled=false;
108 //document.options.apikey2.disabled=true;
109 if (typeof(document.options.allnight) != "undefined"){
110 document.options.allnight.disabled=true;
111 document.options.night1.disabled=true;
112 document.options.night2.disabled=true;
113 document.options.night3.disabled=true;
114 document.options.night4.disabled=true;
115 document.options.night5.disabled=true;
116 document.options.night6.disabled=true;
117 document.options.night7.disabled=true;
118 document.options.night8.disabled=true;
119 document.options.night9.disabled=true;
120 document.options.day8.disabled=true;
121 document.options.day9.disabled=true;
122 document.options.d_d_wind.checked=false;
123 document.options.d_n_wind.checked=false;
124 document.options.d_d_wgusts.checked=false;
125 document.options.d_n_wgusts.checked=false;
126 document.options.d_d_wind.disabled=true;
127 document.options.d_n_wind.disabled=true;
128 document.options.d_d_wgusts.disabled=true;
129 document.options.d_n_wgusts.disabled=true;
130 }
131 }
132 return 0;
133 }
134 <?php
135 // this toggles the pulldown fields
136 ?>
137
138 function pdfields_update()
139 {
140 obja=document.getElementById('pdforecast');
141 objb=document.getElementById('pdfirstday');
142 objb.disabled = (obja.checked == false);
143 }
144 <?php
145 // this toggles the new window field
146 ?>
147
148 function nwfields_update()
149 {
150 obja=document.getElementById('d_c_accuweather');
151 objb=document.getElementById('d_c_aw_newwindow');
152 objb.disabled = (obja.checked == false);
153 }
154 </script>
155
156