Changeset 941781
- Timestamp:
- 07/01/2014 07:24:40 PM (12 years ago)
- Location:
- farm-calculators/trunk
- Files:
-
- 4 edited
-
farm-calculators.php (modified) (7 diffs)
-
js/calculators.js (modified) (1 diff)
-
readme.md (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
farm-calculators/trunk/farm-calculators.php
r764318 r941781 7 7 Description: Add farm calculators to your website to help users determine various farming and crop related information. 8 8 9 Version: 0. 49 Version: 0.5 10 10 Author: Bryce Johnston 11 Author URI: http://www. wingdspur.com11 Author URI: http://www.cropquest.com 12 12 13 13 ****************************************************************************************** 14 Copyright (C) 201 3 Bryce Johnston (email: bryce@wingdspur.com)14 Copyright (C) 2014 Bryce Johnston (email: bjohnston@cropquest.com) 15 15 16 16 This program is free software: you can redistribute it and/or modify … … 28 28 *******************************************************************************************/ 29 29 30 $fc_version = '0. 4';30 $fc_version = '0.5'; 31 31 $fc_dirname = plugin_basename(dirname(__FILE__)); 32 32 … … 130 130 </p> 131 131 <p> 132 <label for="hoop_size">Hoop Sizein Inches:</label><br />132 <label for="hoop_size">Hoop Diameter in Inches:</label><br /> 133 133 <input name="hoop_size" id="hoop_size" type="number" step="any" class="input-medium" /> 134 134 </p> … … 190 190 <p><i>Also recommended to check standing crop for pre-harvest losses.</i></p> 191 191 <p> 192 <label for="kern als_count">Kernals Counted on Ground:</label><br />193 <input name="kern als_count" id="kernals_count" type="number" step="any" class="input-medium" />194 </p> 195 <p> 196 <label for="kern als_area">Area Kernals were Counted (ft<sup>2</sup>):</label><br />197 <input name="kern als_area" id="kernals_area" type="number" step="any" class="input-medium" />192 <label for="kernels_count">Kernels Counted on Ground:</label><br /> 193 <input name="kernels_count" id="kernels_count" type="number" step="any" class="input-medium" /> 194 </p> 195 <p> 196 <label for="kernels_area">Area Kernels were Counted (ft<sup>2</sup>):</label><br /> 197 <input name="kernels_area" id="kernels_area" type="number" step="any" class="input-medium" /> 198 198 </p> 199 199 <p> … … 224 224 <legend>Wheat Harvest Loss</legend>'; 225 225 $code .=' 226 <label for="kern als_count">Kernals Counted on Ground:</label>227 <input name="kern als_count" id="kernals_count" type="number" step="any" class="input-medium" />228 <label for="kern als_area">Area Kernals were Counted (ft<sup>2</sup>):</label>229 <input name="kern als_area" id="kernals_area" type="number" step="any" class="input-medium" /><br />226 <label for="kernels_count">Kernels Counted on Ground:</label> 227 <input name="kernels_count" id="kernels_count" type="number" step="any" class="input-medium" /> 228 <label for="kernels_area">Area Kernels were Counted (ft<sup>2</sup>):</label> 229 <input name="kernels_area" id="kernels_area" type="number" step="any" class="input-medium" /><br /> 230 230 <button type="submit" class="btn" name="calculateWheatHarvestYieldLoss" id="calculateWheatHarvestYieldLoss">Calculate</button> 231 231 </fieldset>'; … … 254 254 <p><i>Also recommended to check standing crop for pre-harvest losses.</i></p> 255 255 <p> 256 <label for="kern als_count">Kernals Counted on Ground:</label><br />257 <input name="kern als_count" id="kernals_count" type="number" step="any" class="input-medium" />258 </p> 259 <p> 260 <label for="kern als_area">Area Kernals were Counted (ft<sup>2</sup>):</label><br />261 <input name="kern als_area" id="kernals_area" type="number" step="any" class="input-medium" />256 <label for="kernels_count">Kernels Counted on Ground:</label><br /> 257 <input name="kernels_count" id="kernels_count" type="number" step="any" class="input-medium" /> 258 </p> 259 <p> 260 <label for="kernels_area">Area Kernels were Counted (ft<sup>2</sup>):</label><br /> 261 <input name="kernels_area" id="kernels_area" type="number" step="any" class="input-medium" /> 262 262 </p> 263 263 <p> … … 288 288 <legend>Grain Sorghum Harvest Loss</legend>'; 289 289 $code .=' 290 <label for="kern als_count">Kernals Counted on Ground:</label>291 <input name="kern als_count" id="kernals_count" type="number" step="any" class="input-medium" />292 <label for="kern als_area">Area Kernals were Counted (ft<sup>2</sup>):</label>293 <input name="kern als_area" id="kernals_area" type="number" step="any" class="input-medium" /><br />290 <label for="kernels_count">Kernels Counted on Ground:</label> 291 <input name="kernels_count" id="kernels_count" type="number" step="any" class="input-medium" /> 292 <label for="kernels_area">Area Kernels were Counted (ft<sup>2</sup>):</label> 293 <input name="kernels_area" id="kernels_area" type="number" step="any" class="input-medium" /><br /> 294 294 <button type="submit" class="btn" name="calculateSorghumHarvestYieldLoss" id="calculateSorghumHarvestYieldLoss">Calculate</button> 295 295 </fieldset>'; -
farm-calculators/trunk/js/calculators.js
r764318 r941781 86 86 87 87 function calculateWheatHarvestYieldLoss(form) { 88 if (!isValid(form.kern als_count, 0, 1000)) {88 if (!isValid(form.kernels_count, 0, 1000)) { 89 89 return false; 90 } else if (!isValid(form.kern als_area, 0, 1000)) {90 } else if (!isValid(form.kernels_area, 0, 1000)) { 91 91 return false; 92 92 } 93 var kern als_count = form.kernals_count.value;94 var kern als_area = form.kernals_area.value;93 var kernels_count = form.kernels_count.value; 94 var kernels_area = form.kernels_area.value; 95 95 var yield_loss = 0; 96 yield_loss = kern als_count/kernals_area/20;96 yield_loss = kernels_count/kernels_area/20; 97 97 form.yield_loss.value = roundTenth(yield_loss); 98 98 } 99 99 100 100 function calculateSorghumHarvestYieldLoss(form) { 101 if (!isValid(form.kern als_count, 0, 1000)) {101 if (!isValid(form.kernels_count, 0, 1000)) { 102 102 return false; 103 } else if (!isValid(form.kern als_area, 0, 1000)) {103 } else if (!isValid(form.kernels_area, 0, 1000)) { 104 104 return false; 105 105 } 106 var kern als_count = form.kernals_count.value;107 var kern als_area = form.kernals_area.value;106 var kernels_count = form.kernels_count.value; 107 var kernels_area = form.kernels_area.value; 108 108 var yield_loss = 0; 109 yield_loss = kern als_count/kernals_area/18.5;109 yield_loss = kernels_count/kernels_area/18.5; 110 110 form.yield_loss.value = roundTenth(yield_loss); 111 111 } -
farm-calculators/trunk/readme.md
r764341 r941781 3 3 Contributors: wingdspur 4 4 Requires at least: 3.0 5 Tested up to: 3. 66 Stable tag: 0. 45 Tested up to: 3.9 6 Stable tag: 0.5 7 7 Tags: farm, crop, farming, calculator, yield, population, agriculture 8 8 License: GPLv3 or later … … 62 62 ## Screenshots 63 63 64 1. screenshot-1.png 64  65 65 66 66 ## Changelog 67 68 ### 0.5 69 * Minor spelling and wording adjustments. 67 70 68 71 ### 0.4 -
farm-calculators/trunk/readme.txt
r764341 r941781 3 3 Contributors: wingdspur 4 4 Requires at least: 3.0 5 Tested up to: 3. 66 Stable tag: 0. 45 Tested up to: 3.9 6 Stable tag: 0.5 7 7 Tags: farm, crop, farming, calculator, yield, population, agriculture 8 8 License: GPLv3 or later … … 66 66 == Changelog == 67 67 68 = 0.5 = 69 * Minor spelling and wording adjustments. 70 68 71 = 0.4 = 69 72 * Added wheat harvest yield loss calculator.
Note: See TracChangeset
for help on using the changeset viewer.