Revision bc63503b
Added by Michael Newton over 7 years ago
src/usr/local/www/widgets/javascript/thermal_sensors.js | ||
---|---|---|
196 | 196 |
|
197 | 197 |
$('#' + 'temperaturemsg' + bar + widgetKey).html(widgetUnit === 'F' ? getFahrenheitValue(percent) : percent); |
198 | 198 |
} |
199 |
|
|
200 |
events.push(function(){ |
|
201 |
$("#thermal_sensors_widget_show_fahrenheit").on("change", function(e) { |
|
202 |
if (this.checked) { |
|
203 |
$("#thermal_sensors_widget_zone_warning_threshold").val(function(){return getFahrenheitValue(this.value);}); |
|
204 |
$("#thermal_sensors_widget_zone_critical_threshold").val(function(){return getFahrenheitValue(this.value);}); |
|
205 |
$("#thermal_sensors_widget_core_warning_threshold").val(function(){return getFahrenheitValue(this.value);}); |
|
206 |
$("#thermal_sensors_widget_core_critical_threshold").val(function(){return getFahrenheitValue(this.value);}); |
|
207 |
} else { |
|
208 |
$("#thermal_sensors_widget_zone_warning_threshold").val(function(){return getCelsiusValue(this.value);}); |
|
209 |
$("#thermal_sensors_widget_zone_critical_threshold").val(function(){return getCelsiusValue(this.value);}); |
|
210 |
$("#thermal_sensors_widget_core_warning_threshold").val(function(){return getCelsiusValue(this.value);}); |
|
211 |
$("#thermal_sensors_widget_core_critical_threshold").val(function(){return getCelsiusValue(this.value);}); |
|
212 |
} |
|
213 |
}); |
|
214 |
}); |
Also available in: Unified diff
Moving this code to PHP for i18n