From 328f9695d86852dc20f8f69c93b72d703f80e131 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Mon, 15 Jan 2018 12:38:03 -0500 Subject: [PATCH] add ability to vertically expand a specific row --- src/css/logger-ui.css | 3 ++- src/js/logger-ui.js | 11 +++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/css/logger-ui.css b/src/css/logger-ui.css index d85f256..120fc73 100644 --- a/src/css/logger-ui.css +++ b/src/css/logger-ui.css @@ -140,13 +140,14 @@ body #content td { #content table tr td:last-of-type { border-right: none; } -body.compactView #content td { +body.compactView #content tr:not(.vExpanded) td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } #content table tr td:nth-of-type(1) { + cursor: default; text-align: right; white-space: nowrap; } diff --git a/src/js/logger-ui.js b/src/js/logger-ui.js index 0f8e70e..41064fd 100644 --- a/src/js/logger-ui.js +++ b/src/js/logger-ui.js @@ -724,10 +724,12 @@ var cleanBuffer = function() { /******************************************************************************/ var toggleCompactView = function() { - document.body.classList.toggle( - 'compactView', - document.body.classList.contains('compactView') === false - ); + document.body.classList.toggle('compactView'); + uDom('#content table .vExpanded').removeClass('vExpanded'); +}; + +var toggleCompactRow = function(ev) { + ev.target.parentElement.classList.toggle('vExpanded'); }; /******************************************************************************/ @@ -897,6 +899,7 @@ uDom('#compactViewToggler').on('click', toggleCompactView); uDom('#clean').on('click', cleanBuffer); uDom('#clear').on('click', clearBuffer); uDom('#maxEntries').on('change', onMaxEntriesChanged); +uDom('#content table').on('click', 'tr > td:nth-of-type(1)', toggleCompactRow); uDom('#content table').on('click', 'tr.canMtx > td:nth-of-type(2)', popupManager.toggleOn); /******************************************************************************/