diff --git a/app/views/admin/products_v3/_table.html.haml b/app/views/admin/products_v3/_table.html.haml index fe3eebe782..28fe3a6d55 100644 --- a/app/views/admin/products_v3/_table.html.haml +++ b/app/views/admin/products_v3/_table.html.haml @@ -53,7 +53,8 @@ %th.align-right= t('admin.products_page.columns.actions') - products.each_with_index do |product, product_index| = form.fields_for("products", product, index: product_index) do |product_form| - %tbody.relaxed{ data: { 'record-id': product_form.object.id, controller: "nested-form", + %tbody.relaxed.naked_inputs{ data: { 'record-id': product_form.object.id, + controller: "nested-form", action: 'nested-form:add->bulk-form#registerElements' } } %tr = render partial: 'product_row', locals: { product:, f: product_form } diff --git a/app/webpacker/css/admin/products_v3.scss b/app/webpacker/css/admin/products_v3.scss index 731f487dba..9d53342edf 100644 --- a/app/webpacker/css/admin/products_v3.scss +++ b/app/webpacker/css/admin/products_v3.scss @@ -73,7 +73,7 @@ } // Row hover - tr:hover { + tbody tr:hover { td { background-color: $light-grey; position: relative; @@ -89,6 +89,11 @@ } } + // "Naked" inputs. Row hover helps reveal them. + input:not([type="checkbox"]) { + background-color: $color-tbl-cell-bg; + } + // Reveal naked button text when any part of row is hovered button.naked { color: $color-link; @@ -163,22 +168,6 @@ label { margin: 0; } - - // "Naked" inputs. Row hover helps reveal them. - tbody { - input:not([type="checkbox"]) { - background-color: $color-tbl-cell-bg; - height: auto; - font-size: inherit; - font-weight: inherit; - } - - :not(.field_with_errors) > { - input:not([type="checkbox"]):not(:focus):not(.changed):not([disabled]) { - border-color: transparent; - } - } - } } #no-products { diff --git a/app/webpacker/css/admin_v3/shared/forms.scss b/app/webpacker/css/admin_v3/shared/forms.scss index b6dfa00240..90423ca0f2 100644 --- a/app/webpacker/css/admin_v3/shared/forms.scss +++ b/app/webpacker/css/admin_v3/shared/forms.scss @@ -23,6 +23,17 @@ fieldset { font-size: 14px; line-height: 22px; + + // Appears just like other text on the page. + // See table.products tr:hover for example of revealing them + .naked_inputs & { + background-color: inherit; + height: auto; + font-size: inherit; + font-weight: inherit; + border-color: transparent; + } + &:focus { outline: none; border-color: $color-txt-hover-brd;