mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
HTML: don't show cylinders or weights table if they don't exist
Don't show the table header of cylinders or weights if they are not available. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
d2891ecbd0
commit
27e400f5e4
1 changed files with 6 additions and 0 deletions
|
@ -816,6 +816,9 @@ function get_weight_HTML(weight)
|
|||
*/
|
||||
function get_weights_HTML(dive)
|
||||
{
|
||||
if (!dive.Weights.length)
|
||||
return "";
|
||||
|
||||
var result = "";
|
||||
result += '<table><tr><td class="words">' + translate.Weight + '</td><td class="words">' + translate.Type + '</td></tr>';
|
||||
for (var i in dive.Weights) {
|
||||
|
@ -850,6 +853,9 @@ function get_cylinder_HTML(cylinder)
|
|||
*/
|
||||
function get_cylinders_HTML(dive)
|
||||
{
|
||||
if (!dive.Cylinders.length)
|
||||
return "";
|
||||
|
||||
var result = "";
|
||||
result += '<h2 class="det_hed">' + translate.Dive_equipments + '</h2><table><tr><td class="words">' + translate.Type + '</td><td class="words">' + translate.Size + '</td><td class="words">' + translate.Work_Pressure + '</td><td class="words">' + translate.Start_Pressure + '</td><td class="words">' + translate.End_Pressure + '</td><td class="words">O2</td></tr>';
|
||||
for (var i in dive.Cylinders) {
|
||||
|
|
Loading…
Reference in a new issue