diff --git a/band-plan.html b/band-plan.html
index 64754d6..02e7c37 100644
--- a/band-plan.html
+++ b/band-plan.html
@@ -257,12 +257,15 @@ div>label {
// e. g. cell-bandwidth-2700
// 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().replaceAll("+", "_plus_").replace(/[^\w,]+/g, " ").replaceAll(" ", "_");
+ let f = String(cell.getField()).toLowerCase().replace(/[\W]+/g, " ").replaceAll(" ", "_").replace(/__+/g, "_");
+ let v = String(cell.getValue()).toLowerCase().replaceAll("+", "_plus_").replace(/[^\w,-]+/g, " ").replaceAll(" ", "_").replace(/__+/g, "_");
v.split(",").forEach((s) => {
cell.getElement().classList.add("cell-" + f + "-" + s.replace(/^_+|_+$/g, ""));
});
cell.getElement().classList.add("cell-" + f);
+ if ((f === "frequency") && (v.indexOf("-") > -1)) {
+ cell.getElement().classList.add("cell-" + f + "-" + "is_range");
+ }
return cell.getValue();
}
});
@@ -274,11 +277,14 @@ div>label {
// list like cw, narrow will be split to two entries
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().replaceAll("+", "_plus_").replace(/[^\w,]+/g, " ").replaceAll(" ", "_");
+ let k = String(key).toLowerCase().replace(/[\W]+/g, " ").replaceAll(" ", "_").replace(/__+/g, "_");
+ let v = String(value).toLowerCase().replaceAll("+", "_plus_").replace(/[^\w,-]+/g, " ").replaceAll(" ", "_").replace(/__+/g, "_");
v.split(",").forEach((s) => {
row.getElement().classList.add("row-" + k + "-" + s.replace(/^_+|_+$/g, ""));
});
+ if ((k === "frequency") && (v.indexOf("-") > -1)) {
+ row.getElement().classList.add("row-" + k + "-" + "is_range");
+ }
}
},
});