From 98142a1caa443102e330a98639a90d2ab3b157e0 Mon Sep 17 00:00:00 2001 From: Florian Lentsch Date: Fri, 7 Jun 2024 15:56:35 +0200 Subject: [PATCH] Fixes #73 --- .../bootstrap_and_overrides.css.less | 22 +++++++++++++++---- .../shared/_article_fields_units.html.haml | 2 +- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/app/assets/stylesheets/bootstrap_and_overrides.css.less b/app/assets/stylesheets/bootstrap_and_overrides.css.less index a60e646f..6c0ff2b0 100644 --- a/app/assets/stylesheets/bootstrap_and_overrides.css.less +++ b/app/assets/stylesheets/bootstrap_and_overrides.css.less @@ -362,12 +362,26 @@ td.symbol, th.symbol { .partused .symbol { color: tint(@articlePartusedColor, @nonessentialDim); } .unavailable .symbol { color: @articleUnavailColor; } -.article-form .icon-warning-sign { - margin-top: 8px; - margin-left: 10px; - color: @articleCustomUnitWarning; +.article-form { + .icon-warning-sign { + margin-top: 8px; + margin-left: 10px; + color: @articleCustomUnitWarning; + } + + input[type=number]::-webkit-outer-spin-button, + input[type=number]::-webkit-inner-spin-button { + -webkit-appearance: none; + margin: 0; + } + + /* Firefox */ + input[type=number] { + -moz-appearance: textfield; + } } + // hide symbols completely on small screens to save space @media (max-width: 768px) { .symbol { diff --git a/app/views/shared/_article_fields_units.html.haml b/app/views/shared/_article_fields_units.html.haml index 67885336..48b2a78f 100644 --- a/app/views/shared/_article_fields_units.html.haml +++ b/app/views/shared/_article_fields_units.html.haml @@ -29,5 +29,5 @@ .fold-line = f.input :billing_unit, as: :select, collection: [], input_html: {'data-initial-value': article.billing_unit, class: 'input-medium'}, include_blank: false .fold-line - = f.input :group_order_granularity, input_html: {class: 'input-mini'} + = f.input :group_order_granularity, input_html: {class: 'input-mini', step: 0.001} = f.input :group_order_unit, as: :select, collection: [], input_html: {'data-initial-value': article.group_order_unit, class: 'input-medium'}, label: '×'.html_safe, include_blank: false