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:
parent
7dac50008a
commit
328f9695d8
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
||||
/******************************************************************************/
|
||||
|
|
Loading…
Reference in a new issue