mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-04-04 07:09:14 +00:00
Style stock popout
This commit is contained in:
@@ -85,8 +85,8 @@
|
||||
%td.field
|
||||
= variant_form.text_field :price, 'aria-label': t('admin.products_page.columns.price'), value: number_to_currency(variant.price, unit: '')&.strip # TODO: add a spec to prove that this formatting is necessary. If so, it should be in a shared form helper for currency inputs
|
||||
= error_message_on variant, :price
|
||||
%td.field
|
||||
%div.on-hand__wrapper
|
||||
%td.field.on-hand__wrapper
|
||||
%div.on-hand__popout
|
||||
.field
|
||||
= variant_form.number_field :on_hand, 'aria-label': t('admin.products_page.columns.on_hand')
|
||||
= error_message_on variant, :on_hand
|
||||
|
||||
@@ -114,8 +114,17 @@
|
||||
}
|
||||
}
|
||||
|
||||
.field {
|
||||
padding: 0;
|
||||
margin-bottom: 0.75em;
|
||||
}
|
||||
|
||||
label {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
// "Naked" inputs. Row hover helps reveal them.
|
||||
input {
|
||||
input:not([type="checkbox"]) {
|
||||
border-color: transparent;
|
||||
background-color: $color-tbl-cell-bg;
|
||||
height: auto;
|
||||
@@ -265,4 +274,28 @@
|
||||
z-index: 1; // Ensure tom-select is covered
|
||||
}
|
||||
}
|
||||
|
||||
// Stock popout widget
|
||||
.on-hand {
|
||||
&__wrapper {
|
||||
position: relative;
|
||||
}
|
||||
&__popout {
|
||||
position: absolute;
|
||||
top: -1em;
|
||||
left: -1em;
|
||||
z-index: 1; // Cover below row when hover
|
||||
width: 9em;
|
||||
|
||||
padding: $padding-tbl-cell;
|
||||
|
||||
background: $color-tbl-cell-bg;
|
||||
border-radius: 3px; //todo: check
|
||||
box-shadow: 0px 0px 8px 0px rgba($near-black, 0.25);
|
||||
|
||||
.field:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user