summaryrefslogtreecommitdiffstats
path: root/theme/list_lib.js
diff options
context:
space:
mode:
authorGravatar Gehad elrobey <gehadelrobey@gmail.com>2015-03-09 22:33:14 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-03-11 11:02:16 -0700
commitd922dbbd99d1da3b86bff5371dd10d32aec2ac61 (patch)
tree0352a1c86bbaf311840bee3883d0f500ed885618 /theme/list_lib.js
parent1e81dff946b8dd4e0c9526329cf095b55a9c7ccc (diff)
downloadsubsurface-d922dbbd99d1da3b86bff5371dd10d32aec2ac61.tar.gz
HTML: fix the value of cylinder gas in trimix dives
Value of He must be showed in trimix dives, also fixes the format of the dive events table. Gas change should be something like O2: 50 - He 0 Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'theme/list_lib.js')
-rw-r--r--theme/list_lib.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/theme/list_lib.js b/theme/list_lib.js
index 72880dcd1..ceaa9c9bc 100644
--- a/theme/list_lib.js
+++ b/theme/list_lib.js
@@ -855,7 +855,14 @@ function get_cylinder_HTML(cylinder)
cEPressure = Math.round(put_pressure_unit(nonZeroCEPressure)).toFixed(1) + " " + pressure_unit;
}
- return '<tr><td class="Cyl">' + cylinder.Type + '</td><td class="Cyl">' + cylinder.Size + '</td><td class="Cyl">' + cylinder.WPressure + '</td>' + '<td class="Cyl">' + cSPressure + '</td><td class="Cyl">' + cEPressure + '</td><td class="Cyl">' + cylinder.O2 + '</td></tr>';
+ var pressure_string = cylinder.O2;
+ if (cylinder.O2 !== "Air") {
+ pressure_string = 'O2: ' + cylinder.O2;
+ }
+ if (cylinder.He && cylinder.He !== "0.0%") {
+ pressure_string += ' / He: ' + cylinder.He;
+ }
+ return '<tr><td class="Cyl">' + cylinder.Type + '</td><td class="Cyl">' + cylinder.Size + '</td><td class="Cyl">' + cylinder.WPressure + '</td>' + '<td class="Cyl">' + cSPressure + '</td><td class="Cyl">' + cEPressure + '</td><td class="Cyl">' + pressure_string + '</td></tr>';
}
/**
@@ -880,7 +887,7 @@ function get_event_value(event)
if (event.type == 11 || event.type == 25) { // gas change
var he = event.value >> 16;
var o2 = event.value & 0xffff;
- return 'He: ' + he + ' - O2: ' + o2;
+ return 'O2: ' + o2 + ' / He: ' + he;
}
if (event.type == 23) { // heading
return event.value;