1
0
Fork 0
mirror of https://github.com/gorhill/uMatrix.git synced 2024-06-02 10:24:59 +12:00

add ability to vertically expand a specific row

This commit is contained in:
Raymond Hill 2018-01-15 12:38:03 -05:00
parent 7dac50008a
commit 328f9695d8
No known key found for this signature in database
GPG key ID: 25E1490B761470C2
2 changed files with 9 additions and 5 deletions

View file

@ -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;
}

View file

@ -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);
/******************************************************************************/