mirror of
https://github.com/grocy/grocy.git
synced 2025-10-14 17:24:07 +00:00
Replaced the default number input arrow buttons with own ones to better support touch input (references #44)
This commit is contained in:
@@ -67,6 +67,15 @@ a.discrete-link:focus {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
/* Hide the default up/down arrow buttons for number inputs because we use our own buttons in numberpicker */
|
||||
input[type='number'] {
|
||||
-moz-appearance: textfield;
|
||||
}
|
||||
input::-webkit-outer-spin-button,
|
||||
input::-webkit-inner-spin-button {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
/* Navigation style customizations */
|
||||
#mainNav {
|
||||
background-color: #e5e5e5 !important;
|
||||
|
13
public/viewjs/components/numberpicker.js
Normal file
13
public/viewjs/components/numberpicker.js
Normal file
@@ -0,0 +1,13 @@
|
||||
$(".numberpicker-down-button").unbind('click').on("click", function ()
|
||||
{
|
||||
var inputElement = $(this).parent().parent().find('input[type="number"]')[0];
|
||||
inputElement.stepDown();
|
||||
$(inputElement).trigger('change');
|
||||
});
|
||||
|
||||
$(".numberpicker-up-button").unbind('click').on("click", function()
|
||||
{
|
||||
var inputElement = $(this).parent().parent().find('input[type="number"]')[0];
|
||||
inputElement.stepUp();
|
||||
$(inputElement).trigger('change');
|
||||
});
|
Reference in New Issue
Block a user