mirror of
https://github.com/grocy/grocy.git
synced 2025-04-30 01:55:47 +00:00
Optimized chore/battery tracking input focus handling
This commit is contained in:
parent
b4a7642af5
commit
edd372f8c4
@ -53,7 +53,12 @@ $('#battery_id').on('change', function(e)
|
|||||||
if (batteryId)
|
if (batteryId)
|
||||||
{
|
{
|
||||||
Grocy.Components.BatteryCard.Refresh(batteryId);
|
Grocy.Components.BatteryCard.Refresh(batteryId);
|
||||||
$('#tracked_time').find('input').focus();
|
|
||||||
|
setTimeout(function()
|
||||||
|
{
|
||||||
|
$('#tracked_time').find('input').focus();
|
||||||
|
}, 200);
|
||||||
|
|
||||||
Grocy.FrontendHelpers.ValidateForm('batterytracking-form');
|
Grocy.FrontendHelpers.ValidateForm('batterytracking-form');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -117,7 +122,7 @@ $(document).on("Grocy.BarcodeScanned", function(e, barcode, target)
|
|||||||
$("#battery_id_text_input").focusout();
|
$("#battery_id_text_input").focusout();
|
||||||
$("#battery_id_text_input").focus();
|
$("#battery_id_text_input").focus();
|
||||||
$("#battery_id_text_input").blur();
|
$("#battery_id_text_input").blur();
|
||||||
Grocy.Components.DateTimePicker.GetInputElement().focus();
|
$('#tracked_time').find('input').focus();
|
||||||
}, 200);
|
}, 200);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -170,3 +175,8 @@ $('#battery_id_text_input').on('blur', function(e)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$("#tracked_time").find("input").on("focus", function(e)
|
||||||
|
{
|
||||||
|
$(this).select();
|
||||||
|
});
|
||||||
|
@ -76,7 +76,12 @@ $('#chore_id').on('change', function(e)
|
|||||||
);
|
);
|
||||||
|
|
||||||
Grocy.Components.ChoreCard.Refresh(choreId);
|
Grocy.Components.ChoreCard.Refresh(choreId);
|
||||||
Grocy.Components.DateTimePicker.GetInputElement().focus();
|
|
||||||
|
setTimeout(function()
|
||||||
|
{
|
||||||
|
Grocy.Components.DateTimePicker.GetInputElement().focus();
|
||||||
|
}, 200);
|
||||||
|
|
||||||
Grocy.FrontendHelpers.ValidateForm('choretracking-form');
|
Grocy.FrontendHelpers.ValidateForm('choretracking-form');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -133,7 +138,7 @@ $(document).on("Grocy.BarcodeScanned", function(e, barcode, target)
|
|||||||
$("#chore_id_text_input").focusout();
|
$("#chore_id_text_input").focusout();
|
||||||
$("#chore_id_text_input").focus();
|
$("#chore_id_text_input").focus();
|
||||||
$("#chore_id_text_input").blur();
|
$("#chore_id_text_input").blur();
|
||||||
Grocy.Components.DateTimePicker.GetInputElement().focus();
|
$('#tracked_time').find('input').focus();
|
||||||
}, 200);
|
}, 200);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -190,3 +195,8 @@ $('#chore_id_text_input').on('blur', function(e)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$("#tracked_time").find("input").on("focus", function(e)
|
||||||
|
{
|
||||||
|
$(this).select();
|
||||||
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user