From 5f7869c1809169048753b54ccb116da13bc4fb51 Mon Sep 17 00:00:00 2001 From: Jan Michel Date: Sun, 4 Aug 2013 17:06:12 +0200 Subject: [PATCH] alternate stylesheet for jtageditor --- layout/jtageditor.css | 2 +- layout/jtageditor_blue.css | 11 +++++++++-- tools/jtageditor.pl | 10 +++++----- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/layout/jtageditor.css b/layout/jtageditor.css index dd5b8e0..d56ed72 100644 --- a/layout/jtageditor.css +++ b/layout/jtageditor.css @@ -166,7 +166,7 @@ table.fields td.button_move_deac { font-variant:small-caps; } -.bitfield { +.bitfield, .visiblebitfield { background:#dea; visibility:collapse; } diff --git a/layout/jtageditor_blue.css b/layout/jtageditor_blue.css index c51a8a4..6ae8076 100644 --- a/layout/jtageditor_blue.css +++ b/layout/jtageditor_blue.css @@ -166,10 +166,17 @@ table.fields td.button_move_deac { font-variant:small-caps; } -.bitfield { +.bitfield, .visiblebitfield { background:#dea; visibility:collapse; - max-height:auto; + max-height:0px; + transition: all .4s; +} + +.visiblebitfield { + background:#dea; + visibility:visible; + max-height:600px; transition: all .4s; } diff --git a/tools/jtageditor.pl b/tools/jtageditor.pl index 08e8361..9872ee8 100755 --- a/tools/jtageditor.pl +++ b/tools/jtageditor.pl @@ -740,12 +740,12 @@ function toggleVis(elementId,t) { if(document.getElementById(elementId)){ if( document.getElementById(elementId).style.visibility == "visible") { document.getElementById(elementId).style.visibility = "collapse"; - document.getElementById(elementId).style.height = "0px"; + document.getElementById(elementId).style.class = "bitfield"; visHash[elementId]=false; t.innerHTML = " + "; } else { document.getElementById(elementId).style.visibility = "visible" ; - document.getElementById(elementId).style.height = "auto"; + document.getElementById(elementId).style.class = "visiblebitfield"; visHash[elementId]=true; t.innerHTML = " − "; } @@ -754,21 +754,21 @@ if( document.getElementById(elementId).style.visibility == "visible") { function showElement(elementId) { if(document.getElementById(elementId)){ document.getElementById(elementId).style.visibility = "visible" ; - document.getElementById(elementId).style.height = "auto"; + document.getElementById(elementId).class = "visiblebitfield"; visHash[elementId]=true; } } function hideElement(elementId) { if(document.getElementById(elementId)){ document.getElementById(elementId).style.visibility = "hidden" ; - document.getElementById(elementId).style.height = "0px"; + document.getElementById(elementId).class = "bitfield"; visHash[elementId]=false; } } function collapseElement(elementId) { if(document.getElementById(elementId)){ document.getElementById(elementId).style.visibility = "collapse" ; - document.getElementById(elementId).style.height = "0px"; + document.getElementById(elementId).class = "bitfield"; visHash[elementId]=false; } } -- 2.43.0