mirror of
https://github.com/grocy/grocy.git
synced 2025-08-18 19:37:12 +00:00
Replaced the default number input arrow buttons with own ones to better support touch input (references #44)
This commit is contained in:
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