mirror of
https://github.com/grocy/grocy.git
synced 2025-09-16 09:51:30 +00:00
Optimized datetimepicker next input focus handling (fixes #2807)
This commit is contained in:
@@ -13,6 +13,7 @@
|
|||||||
- Optimized the line plot markers color of the price history chart (product card) (thanks @DeepCoreSystem)
|
- Optimized the line plot markers color of the price history chart (product card) (thanks @DeepCoreSystem)
|
||||||
- Fixed that German Umlauts were removed from product names when looking up a barcode via the built-in Open Food Facts external barcode lookup plugin
|
- Fixed that German Umlauts were removed from product names when looking up a barcode via the built-in Open Food Facts external barcode lookup plugin
|
||||||
- Fixed that when using/scanning a barcode on the purchase page with a note attached (which prefills the note field) and when manually selecting another product afterwards, the note of the previously used barcode was incorrectly prefilled again
|
- Fixed that when using/scanning a barcode on the purchase page with a note attached (which prefills the note field) and when manually selecting another product afterwards, the note of the previously used barcode was incorrectly prefilled again
|
||||||
|
- Fixed that the "next input focus handling" (jumping to the next input after entering a value) didn't work at some places (e.g. after entering a purchased date on the purchase page)
|
||||||
|
|
||||||
### Shopping list
|
### Shopping list
|
||||||
|
|
||||||
|
@@ -139,6 +139,11 @@ Grocy.Components.DateTimePicker.GetInputElement().on('keyup', function(e)
|
|||||||
var format = inputElement.data('format');
|
var format = inputElement.data('format');
|
||||||
var nextInputElement = $(inputElement.data('next-input-selector'));
|
var nextInputElement = $(inputElement.data('next-input-selector'));
|
||||||
|
|
||||||
|
if (!nextInputElement.is("input"))
|
||||||
|
{
|
||||||
|
nextInputElement = nextInputElement.find("input");
|
||||||
|
}
|
||||||
|
|
||||||
// If input is empty and any arrow key is pressed, set date to today
|
// If input is empty and any arrow key is pressed, set date to today
|
||||||
if (value.length === 0 && (e.keyCode === 38 || e.keyCode === 40 || e.keyCode === 37 || e.keyCode === 39))
|
if (value.length === 0 && (e.keyCode === 38 || e.keyCode === 40 || e.keyCode === 37 || e.keyCode === 39))
|
||||||
{
|
{
|
||||||
|
@@ -139,6 +139,11 @@ Grocy.Components.DateTimePicker2.GetInputElement().on('keyup', function(e)
|
|||||||
var format = inputElement.data('format');
|
var format = inputElement.data('format');
|
||||||
var nextInputElement = $(inputElement.data('next-input-selector'));
|
var nextInputElement = $(inputElement.data('next-input-selector'));
|
||||||
|
|
||||||
|
if (!nextInputElement.is("input"))
|
||||||
|
{
|
||||||
|
nextInputElement = nextInputElement.find("input");
|
||||||
|
}
|
||||||
|
|
||||||
// If input is empty and any arrow key is pressed, set date to today
|
// If input is empty and any arrow key is pressed, set date to today
|
||||||
if (value.length === 0 && (e.keyCode === 38 || e.keyCode === 40 || e.keyCode === 37 || e.keyCode === 39))
|
if (value.length === 0 && (e.keyCode === 38 || e.keyCode === 40 || e.keyCode === 37 || e.keyCode === 39))
|
||||||
{
|
{
|
||||||
|
@@ -69,22 +69,20 @@
|
|||||||
<div id="datetimepicker2-earlier-than-info"
|
<div id="datetimepicker2-earlier-than-info"
|
||||||
class="form-text text-info font-italic w-100 d-none">{{ $earlierThanInfoText }}</div>
|
class="form-text text-info font-italic w-100 d-none">{{ $earlierThanInfoText }}</div>
|
||||||
@if(isset($shortcutValue) && isset($shortcutLabel))
|
@if(isset($shortcutValue) && isset($shortcutLabel))
|
||||||
<div class="form-group mt-n2 mb-0>
|
<div class="form-group mt-n2 mb-0">
|
||||||
<div class="
|
<div class="custom-control custom-checkbox">
|
||||||
custom-control
|
<input class="form-check-input custom-control-input"
|
||||||
custom-checkbox">
|
type="checkbox"
|
||||||
<input class="form-check-input custom-control-input"
|
id="datetimepicker2-shortcut"
|
||||||
type="checkbox"
|
name="datetimepicker2-shortcut"
|
||||||
id="datetimepicker2-shortcut"
|
value="1"
|
||||||
name="datetimepicker2-shortcut"
|
data-datetimepicker2-shortcut-value="{{ $shortcutValue }}"
|
||||||
value="1"
|
tabindex="-1">
|
||||||
data-datetimepicker2-shortcut-value="{{ $shortcutValue }}"
|
<label class="form-check-label custom-control-label"
|
||||||
tabindex="-1">
|
for="datetimepicker2-shortcut">{{ $__t($shortcutLabel) }}
|
||||||
<label class="form-check-label custom-control-label"
|
</label>
|
||||||
for="datetimepicker2-shortcut">{{ $__t($shortcutLabel) }}
|
</div>
|
||||||
</label>
|
|
||||||
</div>
|
</div>
|
||||||
|
@endif
|
||||||
</div>
|
</div>
|
||||||
@endif
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user