luci-base: restore titles class
authorPaul Donald <newtwen+github@gmail.com>
Mon, 2 Feb 2026 16:11:24 +0000 (17:11 +0100)
committerPaul Donald <newtwen+github@gmail.com>
Mon, 2 Feb 2026 17:22:15 +0000 (18:22 +0100)
follow-up to 720c96ce5b85583c8c6db6ef31857dc8a3eeb600

While ::before CSS styling has been deactivated, and
'content' removed, cbi-value-first-field is a bit
ambiguous. So, restore cbi-section-table-titles, and
replace the ::before tags in CSS.

Remove also the data-title for title rows. We already
insert titles for named headers and rows via HTML and
not via CSS after the mentioned commit.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
modules/luci-base/htdocs/luci-static/resources/form.js
themes/luci-theme-bootstrap/htdocs/luci-static/bootstrap/cascade.css
themes/luci-theme-material/htdocs/luci-static/material/cascade.css
themes/luci-theme-openwrt-2020/htdocs/luci-static/openwrt2020/cascade.css
themes/luci-theme-openwrt/htdocs/luci-static/openwrt.org/cascade.css

index 502bf7032c83625f21cbac53d5d1298a3f1df51e..0464b9ef71e4e698080f2cfed4497a664b31e101 100644 (file)
@@ -2633,8 +2633,11 @@ const CBITableSection = CBITypedSection.extend(/** @lends LuCI.form.TableSection
                        if (this.extedit || this.rowcolors)
                                trEl.classList.add(!(tableEl.childNodes.length % 2)
                                        ? 'cbi-rowstyle-1' : 'cbi-rowstyle-2');
+
                        if  (sectionname && (!this.anonymous || this.sectiontitle)) {
-                               trEl.appendChild(E('td', {'class': 'td cbi-value-field cbi-value-first-field'}, [ (sectionname && (!this.anonymous || this.sectiontitle)) ? sectionname : null ]));
+                               trEl.appendChild(E('td', {'class': 'td cbi-value-field cbi-section-table-titles'}, [
+                                       (sectionname && (!this.anonymous || this.sectiontitle)) ? sectionname : null
+                               ]));
                        }
 
                        for (let j = 0; j < max_cols && nodes[i].firstChild; j++)
@@ -2676,16 +2679,16 @@ const CBITableSection = CBITypedSection.extend(/** @lends LuCI.form.TableSection
 
                if (has_titles) {
                        const trEl = E('tr', {
-                               'class': `tr cbi-value-first-field cbi-section-table-titles ${anon_class}`,
-                               'data-title': (!this.anonymous || this.sectiontitle) ? _('Name') : null,
+                               'class': `tr cbi-section-table-titles ${anon_class}`,
                                'click': this.sortable ? ui.createHandlerFn(this, 'handleSort') : null
                        });
+
                        if (!this.anonymous || this.sectiontitle) {
                                trEl.appendChild(E('th', {
-                                               'class': 'th cbi-section-table-cell',
-                                               'data-sortable-row': this.sortable ? '' : null
-                                               },      (!this.anonymous || this.sectiontitle) ? _('Name') : null
-                                       ));
+                                       'class': 'th cbi-section-table-cell',
+                                       'data-sortable-row': this.sortable ? '' : null
+                                       },      (!this.anonymous || this.sectiontitle) ? _('Name') : null
+                               ));
                        }
 
                        for (let i = 0, opt; i < max_cols && (opt = this.children[i]) != null; i++) {
index 7d8922e6fc7a25165fdabd4f7e5ac262b13148fd..c1b214fc1380c17ed77d2ed72a2a0c2d7a5579b8 100644 (file)
@@ -2034,7 +2034,10 @@ form.inline { display: inline; margin-bottom: 0; }
        font-weight: normal;
 }
 
-.cbi-section-table-titles.named::before,
+.cbi-section-table-titles {
+       font-weight: bold;
+}
+
 .cbi-section-table-descr.named::before,
 .cbi-section-table-row[data-title]::before {
        content: none;
@@ -2319,10 +2322,6 @@ div.cbi-value var,
        color: #0069d6;
 }
 
-.cbi-value-first-field {
-       font-weight: bold;      
-}
-
 div.cbi-value var[data-tooltip],
 .td.cbi-value-field var[data-tooltip],
 div.cbi-value var.cbi-tooltip-container,
index f31b5edd9eb9e58b7b4524ef297a46d2b0db8820..f512312c97c1a5c75d41ac38bc3a031a0ee02f04 100644 (file)
@@ -1323,6 +1323,10 @@ td > table > tbody > tr > td,
        display: none;
 }
 
+.tr.cbi-section-table-titles {
+       font-weight: bold;
+}
+
 .tr[data-title]::before,
 .tr.cbi-section-table-titles.named::before {
        content: none;
@@ -2158,10 +2162,6 @@ td.cbi-value-field var,
        color: #0069d6;
 }
 
-.cbi-value-first-field {
-       font-weight: bold;      
-}
-
 .cbi-optionals {
        padding: 1rem 1rem 0 1rem;
        border-top: thin solid #ccc;
index 521bcc5572f0128fbc40cc918ef7fb41e3d22840..e72f600fbad63791402fcc130d7bc7f84e04113f 100644 (file)
@@ -299,9 +299,8 @@ table {
        border-collapse: collapse;
 }
 
-tr.cbi-section-table-titles[data-title]::before {
+tr.cbi-section-table-titles {
        font-weight: bold;
-       border-top: none;
 }
 
 tr[data-title]::before {
@@ -1156,10 +1155,6 @@ textarea {
        flex: 1 1 100%;
 }
 
-.cbi-value-first-field {
-       font-weight: bold;      
-}
-
 .cbi-map-descr,
 .cbi-tab-descr,
 .cbi-section-descr,
@@ -1784,8 +1779,6 @@ ul.errors {
                padding-bottom: .5em;
        }
 
-       tr.cbi-section-table-titles[data-title]::before,
-       tr.cbi-section-table-titles,
        tr.cbi-section-table-descr {
                display: none;
        }
index fb05910e3637910c74846dfebcd13a2ac3d367a0..a16908da609e4b7326d454f8563878f46ae3c37c 100644 (file)
@@ -1035,10 +1035,6 @@ div.cbi-optionals {
        color: #2222FF;
 }
 
-.cbi-value-first-field {
-       font-weight: bold;      
-}
-
 
 ul.cbi-tabmenu {
        list-style-type: none;
@@ -1923,8 +1919,11 @@ select + .cbi-button {
                margin: 0;
        }
 
+       .cbi-section-table-titles {
+               font-weight: bold;
+       }
+
        .tr.table-titles,
-       .cbi-section-table-titles,
        .cbi-section-table-descr {
                display: none;
        }