Implemented "Scan mode"

This commit is contained in:
Bernd Bestel
2020-01-26 15:35:01 +01:00
parent 7a048136c6
commit c7bcb9984a
16 changed files with 190 additions and 22 deletions

View File

@@ -425,7 +425,7 @@ $(document).on("click", "select", function()
});
// Auto saving user setting controls
$(".user-setting-control").on("change", function()
$(document).on("change", ".user-setting-control", function()
{
var element = $(this);
var settingKey = element.attr("data-setting-key");

View File

@@ -0,0 +1,26 @@
Grocy.UISound = { };
Grocy.UISound.Play = function(url)
{
new Audio(url).play();
}
Grocy.UISound.AskForPermission = function()
{
Grocy.UISound.Play(U("/uisounds/silence.mp3"));
}
Grocy.UISound.Success = function()
{
Grocy.UISound.Play(U("/uisounds/success.mp3"));
}
Grocy.UISound.Error = function()
{
Grocy.UISound.Play(U("/uisounds/error.mp3"));
}
Grocy.UISound.BarcodeScannerBeep = function()
{
Grocy.UISound.Play(U("/uisounds/barcodescannerbeep.mp3"));
}