mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 17:45:39 +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)
|
||||
{
|
||||
e.preventDefault();
|
||||
|
||||
var inputElement = $(e.currentTarget).prev();
|
||||
if (inputElement.hasAttr("disabled"))
|
||||
{
|
||||
@ -154,8 +153,17 @@ $(document).on("click", "#barcodescanner-start-button", function(e)
|
||||
},
|
||||
size: 'big',
|
||||
backdrop: true,
|
||||
closeButton: false,
|
||||
closeButton: true,
|
||||
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: {
|
||||
label: __t('Cancel'),
|
||||
className: 'btn-secondary responsive-button',
|
||||
@ -166,11 +174,9 @@ $(document).on("click", "#barcodescanner-start-button", function(e)
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Grocy.Components.BarcodeScanner.StartScanning();
|
||||
});
|
||||
|
||||
|
||||
setTimeout(function()
|
||||
{
|
||||
$(".barcodescanner-input:visible").each(function()
|
||||
|
Loading…
x
Reference in New Issue
Block a user