mirror of
https://github.com/grocy/grocy.git
synced 2025-04-30 10:05:45 +00:00
Button to Flashlight ON in Barcodescanner (#574)
* Button to Flash lights ON in barcodereader Only to ON, not OFF (you can Cancel) * First documentation files for ReadThedoc * Delete index.md * Delete mkdocs.yml Co-authored-by: Bernd Bestel <bernd@berrnd.de>
This commit is contained in:
parent
14c9c045e7
commit
51cd81422e
@ -136,7 +136,6 @@ Quagga.onProcessed(function(result)
|
|||||||
$(document).on("click", "#barcodescanner-start-button", function(e)
|
$(document).on("click", "#barcodescanner-start-button", function(e)
|
||||||
{
|
{
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
var inputElement = $(e.currentTarget).prev();
|
var inputElement = $(e.currentTarget).prev();
|
||||||
if (inputElement.hasAttr("disabled"))
|
if (inputElement.hasAttr("disabled"))
|
||||||
{
|
{
|
||||||
@ -154,8 +153,17 @@ $(document).on("click", "#barcodescanner-start-button", function(e)
|
|||||||
},
|
},
|
||||||
size: 'big',
|
size: 'big',
|
||||||
backdrop: true,
|
backdrop: true,
|
||||||
closeButton: false,
|
closeButton: true,
|
||||||
buttons: {
|
buttons: {
|
||||||
|
torch: {
|
||||||
|
label: __t('Torch'),
|
||||||
|
className: 'btn-primary responsive-button',
|
||||||
|
callback: function(){
|
||||||
|
var track = Quagga.CameraAccess.getActiveTrack();
|
||||||
|
track.applyConstraints({advanced: [{torch:true}]});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
},
|
||||||
cancel: {
|
cancel: {
|
||||||
label: __t('Cancel'),
|
label: __t('Cancel'),
|
||||||
className: 'btn-secondary responsive-button',
|
className: 'btn-secondary responsive-button',
|
||||||
@ -166,11 +174,9 @@ $(document).on("click", "#barcodescanner-start-button", function(e)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Grocy.Components.BarcodeScanner.StartScanning();
|
Grocy.Components.BarcodeScanner.StartScanning();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
setTimeout(function()
|
setTimeout(function()
|
||||||
{
|
{
|
||||||
$(".barcodescanner-input:visible").each(function()
|
$(".barcodescanner-input:visible").each(function()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user