From a6e4aa701ff9a32a32efff2165864ea7b23779c8 Mon Sep 17 00:00:00 2001 From: dm5wk Date: Wed, 29 May 2024 08:26:35 +0200 Subject: [PATCH] allow css selection for + like in P+ --- band-plan.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/band-plan.html b/band-plan.html index 70a3ec1..64754d6 100644 --- a/band-plan.html +++ b/band-plan.html @@ -258,7 +258,7 @@ div>label { // list like cw, narrow will be split to two entries column.formatter = function(cell) { let f = String(cell.getField()).toLowerCase().replace(/[\W]+/g, " ").replaceAll(" ", "_"); - let v = String(cell.getValue()).toLowerCase().replace(/[^\w,]+/g, " ").replaceAll(" ", "_"); + let v = String(cell.getValue()).toLowerCase().replaceAll("+", "_plus_").replace(/[^\w,]+/g, " ").replaceAll(" ", "_"); v.split(",").forEach((s) => { cell.getElement().classList.add("cell-" + f + "-" + s.replace(/^_+|_+$/g, "")); }); @@ -275,7 +275,7 @@ div>label { rowFormatter: function(row){ for (const [key, value] of Object.entries(row.getData())) { let k = String(key).toLowerCase().replace(/[\W]+/g, " ").replaceAll(" ", "_"); - let v = String(value).toLowerCase().replace(/[^\w,]+/g, " ").replaceAll(" ", "_"); + let v = String(value).toLowerCase().replaceAll("+", "_plus_").replace(/[^\w,]+/g, " ").replaceAll(" ", "_"); v.split(",").forEach((s) => { row.getElement().classList.add("row-" + k + "-" + s.replace(/^_+|_+$/g, "")); });