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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (-6 / +14 lines)
Lines 1152-1157 Link Here
1152
            var newin = window.open(link, 'popup', 'width=600,height=400,resizable=1,toolbar=0,scrollbars=1,top');
1152
            var newin = window.open(link, 'popup', 'width=600,height=400,resizable=1,toolbar=0,scrollbars=1,top');
1153
        }
1153
        }
1154
        $(document).ready(function() {
1154
        $(document).ready(function() {
1155
            let barcodeSubmitInFlight = false;
1156
            $('#barcode').off('keypress.preventDouble').on('keypress.preventDouble', function(e) {
1157
                if (barcodeSubmitInFlight) {
1158
                    $('#barcodeSubmittedModal').modal('show');
1159
                    e.preventDefault();
1160
                }
1161
            });
1162
            window.addEventListener('pageshow', function(event) {
1163
                if (event.persisted) {
1164
                    barcodeSubmitInFlight = false;
1165
                }
1166
            });
1155
            [% IF waiting_holds.count > 0 %]
1167
            [% IF waiting_holds.count > 0 %]
1156
                $('#circ-warnwaitingholds-modal .btn-primary').on('click',function() {
1168
                $('#circ-warnwaitingholds-modal .btn-primary').on('click',function() {
1157
                    $('#mainform').submit();
1169
                    $('#mainform').submit();
Lines 1178-1188 Link Here
1178
            [% END %]
1190
            [% END %]
1179
1191
1180
            $('#mainform').on('submit',function() {
1192
            $('#mainform').on('submit',function() {
1181
                if ($("#barcode") && $("#barcode").val()) {
1193
                if ($("#barcode").length && $("#barcode").val()) {
1182
                    $('#barcode').on('keypress',function(event) {
1194
                    barcodeSubmitInFlight = true;
1183
                        $('#barcodeSubmittedModal').modal('show');
1184
                        event.preventDefault(); }
1185
                    );
1186
                }
1195
                }
1187
            });
1196
            });
1188
1197
1189
- 

Return to bug 40643