Commit 2eda2d63 authored by Ad Schellevis's avatar Ad Schellevis

(style, opnsense_standard_table_form) reverse zebra to improve heading, drop first grid line

When using opnsense_standard_table_form on a table, the first visible row contains a top border (because the invisible mobile border is placed first).
The change sets border-top-width on the first td,th to 0px and swaps the zebra printing to keep things more consistent.
parent 26568482
......@@ -110,9 +110,14 @@ function hook_stacked_form_tables(match)
root_node.find('tr:visible').each(function () {
$(this).css("background-color", "inherit");
$(this).children().css("background-color", "inherit");
if ( index % 2 == 0) {
if ( index % 2 != 0) {
$(this).css("background-color", root_node.data('stripe-color'));
}
if (index == 0) {
// hide first visible table grid line
$(this).find('td, th').css('border-top-width', '0px');
}
// skip generated mobile headers (group header+content on mobile)
if (!$(this).hasClass('opnsense-table-mobile-header')) {
++index;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment