View | Details | Raw Unified | Return to bug 28854
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt (-2 / +6 lines)
Lines 472-478 Link Here
472
                                            </table>
472
                                            </table>
473
473
474
                                            <div class="form-group">
474
                                            <div class="form-group">
475
                                                <label for="verify-items-bundle-contents-barcodes">Barcodes</label>
475
                                                <label for="verify-items-bundle-contents-barcodes">Barcodes <span id="verify-progress" class="pull-right" style="display: none"><span id="verified">0</span> of <span id="expected"></span> verified</span></label>
476
                                                <textarea autocomplete="off" id="verify-items-bundle-contents-barcodes" name="verify-items-bundle-contents-barcodes" class="form-control"></textarea>
476
                                                <textarea autocomplete="off" id="verify-items-bundle-contents-barcodes" name="verify-items-bundle-contents-barcodes" class="form-control"></textarea>
477
                                                [% IF item.onloan %]
477
                                                [% IF item.onloan %]
478
                                                <div class="help-block">[% t('Scan all barcodes of items found in the items bundle. If any items are missing, they will be marked as lost') | html %]</div>
478
                                                <div class="help-block">[% t('Scan all barcodes of items found in the items bundle. If any items are missing, they will be marked as lost') | html %]</div>
Lines 1498-1508 Link Here
1498
                if ( char.match(/\n/) ) {
1498
                if ( char.match(/\n/) ) {
1499
                    const barcodes = ev.target.value.split('\n').map(function(s) { return s.trim() });
1499
                    const barcodes = ev.target.value.split('\n').map(function(s) { return s.trim() });
1500
                    const expected = [];
1500
                    const expected = [];
1501
                    let found = 0;
1501
                    $('#items-bundle-contents-table tr').each(function () {
1502
                    $('#items-bundle-contents-table tr').each(function () {
1502
                        const barcode = this.getAttribute('data-barcode');
1503
                        const barcode = this.getAttribute('data-barcode');
1503
                        expected.push(barcode);
1504
                        expected.push(barcode);
1504
                        if (barcodes.includes(barcode)) {
1505
                        if (barcodes.includes(barcode)) {
1505
                            this.classList.add('ok');
1506
                            this.classList.add('ok');
1507
                            found++;
1506
                        } else {
1508
                        } else {
1507
                            this.classList.remove('ok');
1509
                            this.classList.remove('ok');
1508
                        }
1510
                        }
Lines 1521-1526 Link Here
1521
                            feedback.addClass('alert-success').removeClass('alert-danger').html(string).fadeIn(100);
1523
                            feedback.addClass('alert-success').removeClass('alert-danger').html(string).fadeIn(100);
1522
                        });
1524
                        });
1523
                    }
1525
                    }
1526
                    $('#verify-progress').show();
1527
                    $('#verified').text(found);
1528
                    $('#expected').text(expected.length);
1524
                }
1529
                }
1525
            });
1530
            });
1526
1531
1527
- 

Return to bug 28854