mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-25 09:13:05 +08:00
Fix barcode scanning in modals [SCI-6022]
This commit is contained in:
parent
6d92af4b2f
commit
73241e87bb
2 changed files with 3 additions and 2 deletions
|
@ -1,6 +1,7 @@
|
||||||
$(document).on('click', '.barcode-scanner', function() {
|
$(document).on('click', '.barcode-scanner', function() {
|
||||||
var search = $('.search-container .search-field');
|
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.val('');
|
||||||
search.attr('disabled', true).addClass('barcode-mode');
|
search.attr('disabled', true).addClass('barcode-mode');
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4 bar-code-container">
|
<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>
|
<img id="bar-code-image"></img>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue