From 5f6cf664e4c128a7e2416f2d08639c9e6b8ec96c Mon Sep 17 00:00:00 2001 From: Melvin Carvalho Date: Sat, 26 Oct 2024 14:12:16 +0200 Subject: [PATCH] Add striped background to DataContentPane table rows --- src/dataContentPane.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/dataContentPane.js b/src/dataContentPane.js index a07a12f..2ee2ec4 100644 --- a/src/dataContentPane.js +++ b/src/dataContentPane.js @@ -153,7 +153,7 @@ export const dataContentPane = { if ( UI.utils.ancestor(newTable, 'TABLE') && UI.utils.ancestor(newTable, 'TABLE').style.backgroundColor === - 'white' + 'white' ) { newTable.style.backgroundColor = '#eee' } else { @@ -198,6 +198,7 @@ export const dataContentPane = { } for (let i = 0; i < roots.length; i++) { const tr = myDocument.createElement('tr') + tr.setAttribute('style', `background-color: ${i % 2 === 0 ? '#f0f0f0' : 'white'};`) rep.appendChild(tr) const subjectTD = myDocument.createElement('td') tr.appendChild(subjectTD)