Fix barcode scanning in modals [SCI-6022]

This commit is contained in:
Martin Artnik 2021-08-31 14:37:02 +02:00
parent 6d92af4b2f
commit 73241e87bb
2 changed files with 3 additions and 2 deletions

View file

@ -1,6 +1,7 @@
$(document).on('click', '.barcode-scanner', function() {
var search = $('.search-container .search-field');
var input = $('<input>').attr('type', 'text').css('opacity', 0).appendTo('body');
var input = $('<input>').attr('type', 'text').css({ position: 'absolute', right: 0, opacity: 0 })
.appendTo($('.search-container').parent());
search.val('');
search.attr('disabled', true).addClass('barcode-mode');

View file

@ -46,7 +46,7 @@
</p>
</div>
<div class="col-md-4 bar-code-container">
<canvas id="bar-code-canvas" class="hidden" data-id="<%= @repository_row.parent_id || @repository_row.id %>"></canvas>
<canvas id="bar-code-canvas" class="hidden" data-id="<%= @repository_row.code %>"></canvas>
<img id="bar-code-image"></img>
</div>
</div>