Webtags (preserving history): Difference between revisions

m
Line 721: Line 721:
=== JavaScript example ===
=== JavaScript example ===


I have a script that works with the standard log editor in the admin interface to calculate (and recalculate after any edit) the derived fields from the source fields.  To make these calculations work for anyone, I need to find out what units the Cumulus MX user is using. Here is the code (with the api call written using jQuery):
Some people might feel the admin interface could be improved on some of its pages by showing additional information. It is possible from MX 3.7.0 to obtain extra information. 
 
I wanted to improve the log file editing pages, and that was partly by adding validation, and partly by changing the way the editing is done.  For the standard log file editor I wanted to achieve even more, I added a script to calculate (and recalculate after any edit) the derived fields from the source fields.  To make these calculations work for anyone, I needed to find out what units the Cumulus MX user is using. Although my revised log file editing did not make it into a public release, I can share the units obtaining api here.
 
Here is the code (with the api call written using jQuery):
<pre>/*    Some new variables connected with new api call (MX 3.7.0)  */
<pre>/*    Some new variables connected with new api call (MX 3.7.0)  */
var tempLetter;  // C or F
var tempLetter;  // C or F
5,838

edits