|
Lines 42-55
Link Here
|
| 42 |
<fieldset class="rows"> |
42 |
<fieldset class="rows"> |
| 43 |
<legend>Use a barcode file</legend> |
43 |
<legend>Use a barcode file</legend> |
| 44 |
<ol> |
44 |
<ol> |
| 45 |
<li><label for="uploadbarcodes">Barcode file: </label> <input type="file" id="uploadbarcodes" name="uploadbarcodes" /></li> |
45 |
<li><label for="uploadbarcodes">Barcode file: </label> <input type="file" id="uploadbarcodes" name="uploadbarcodes" /> |
| 46 |
<li><label for="setdate">Set inventory date to:</label> <input type="text" id="setdate" name="setdate" value="[% today | $KohaDates %]" class="datepicker" disabled /></li> |
46 |
<input type="button" id="resetuploadbarcodes" name="resetuploadbarcodes" value="Reset" /></li> |
| 47 |
<li><label for="compareinv2barcd">Compare barcodes list to results: </label><input type="checkbox" name="compareinv2barcd" id="compareinv2barcd" disabled /></li> |
|
|
| 48 |
<li><label for="dont_checkin">Do not check in items scanned during inventory: </label><input type="checkbox" name="dont_checkin" id="dont_checkin" disabled /></li> |
| 49 |
<li><label for="out_of_order">Check barcodes list for items shelved out of order: </label><input type="checkbox" name="out_of_order" id="out_of_order" disabled /></li> |
| 50 |
</ol> |
47 |
</ol> |
| 51 |
</fieldset> |
48 |
</fieldset> |
| 52 |
|
49 |
<fieldset class="rows"> |
|
|
50 |
<legend>Or scan items one by one</legend> |
| 51 |
<ol> |
| 52 |
<li> |
| 53 |
<label for="barcodelist">Barcode list (one barcode per line): </label> |
| 54 |
<textarea rows="10" cols="30" id="barcodelist" name="barcodelist"></textarea> |
| 55 |
</li> |
| 56 |
</ol> |
| 57 |
</fieldset> |
| 58 |
<fieldset class="rows"> |
| 59 |
<legend>Parameters</legend> |
| 60 |
<ol> |
| 61 |
<li><label for="setdate">Set inventory date to:</label> <input type="text" id="setdate" name="setdate" value="[% today | $KohaDates %]" class="datepicker" disabled /></li> |
| 62 |
<li><label for="compareinv2barcd">Compare barcodes list to results: </label><input type="checkbox" name="compareinv2barcd" id="compareinv2barcd" disabled /></li> |
| 63 |
<li><label for="dont_checkin">Do not check in items scanned during inventory: </label><input type="checkbox" name="dont_checkin" id="dont_checkin" disabled /></li> |
| 64 |
<li><label for="out_of_order">Check barcodes list for items shelved out of order: </label><input type="checkbox" name="out_of_order" id="out_of_order" disabled /></li> |
| 65 |
</ol> |
| 66 |
</fieldset> |
| 53 |
<fieldset class="rows"> |
67 |
<fieldset class="rows"> |
| 54 |
<legend>Item location filters</legend> |
68 |
<legend>Item location filters</legend> |
| 55 |
<ol><li> |
69 |
<ol><li> |
|
Lines 276-282
Link Here
|
| 276 |
[% INCLUDE 'calendar.inc' %] |
290 |
[% INCLUDE 'calendar.inc' %] |
| 277 |
<script type="text/javascript"> |
291 |
<script type="text/javascript"> |
| 278 |
function checkForm() { |
292 |
function checkForm() { |
| 279 |
if ( $('#uploadbarcodes').val() ) { |
293 |
if ( $('#uploadbarcodes').val() && $('#barcodelist').val() ) { |
|
|
294 |
alert(_("You have uploaded a barcode file and scanned barcodes at the same time. Please choose one of the options before.")); |
| 295 |
return false; |
| 296 |
} |
| 297 |
if ( $('#uploadbarcodes').val() || $('#barcodelist').val() ) { |
| 280 |
if ( !( |
298 |
if ( !( |
| 281 |
$('#branchloop').val() || |
299 |
$('#branchloop').val() || |
| 282 |
$('#locationloop').val() || |
300 |
$('#locationloop').val() || |
|
Lines 295-300
Link Here
|
| 295 |
return true; |
313 |
return true; |
| 296 |
} |
314 |
} |
| 297 |
|
315 |
|
|
|
316 |
function barcodesProvided() { |
| 317 |
if( $("#uploadbarcodes").val() || $("#barcodelist").val() ) { |
| 318 |
$("#setdate").prop('disabled',false); |
| 319 |
$("#compareinv2barcd").prop('disabled',false); |
| 320 |
$("#compareinv2barcd").attr('checked',true); // default |
| 321 |
$("#dont_checkin").prop('disabled',false); |
| 322 |
$("#out_of_order").prop('disabled',false); |
| 323 |
if( $("#compareinv2barcd").attr('checked') ) { |
| 324 |
$("fieldset#optionalfilters").show(); |
| 325 |
$("#ignoreissued").attr('checked',true); // default |
| 326 |
} else { |
| 327 |
$("fieldset#optionalfilters").hide(); |
| 328 |
$("#ignoreissued").attr('checked',false); |
| 329 |
} |
| 330 |
} else { |
| 331 |
$("#setdate").prop('disabled',true); |
| 332 |
$("#compareinv2barcd").prop('disabled',true); |
| 333 |
$("#compareinv2barcd").attr('checked',false); |
| 334 |
$("#dont_checkin").prop('disabled',true); |
| 335 |
$("#dont_checkin").attr('checked',false); |
| 336 |
$("#out_of_order").prop('disabled',true); |
| 337 |
$("#out_of_order").attr('checked',false); |
| 338 |
$("fieldset#optionalfilters").show(); |
| 339 |
} |
| 340 |
} |
| 341 |
|
| 298 |
$(document).ready(function(){ |
342 |
$(document).ready(function(){ |
| 299 |
inventorydt = $('#inventoryt').dataTable($.extend(true, {}, dataTablesDefaults, { |
343 |
inventorydt = $('#inventoryt').dataTable($.extend(true, {}, dataTablesDefaults, { |
| 300 |
'sPaginationType': 'full_numbers', |
344 |
'sPaginationType': 'full_numbers', |
|
Lines 367-399
Link Here
|
| 367 |
return checkForm(); |
411 |
return checkForm(); |
| 368 |
}); |
412 |
}); |
| 369 |
|
413 |
|
|
|
414 |
$("#resetuploadbarcodes").click(function() { |
| 415 |
$("#uploadbarcodes").val(""); |
| 416 |
barcodesProvided(); |
| 417 |
}); |
| 418 |
|
| 370 |
// #uploadbarcodes and #compareinv2barcd determine the behavior of |
419 |
// #uploadbarcodes and #compareinv2barcd determine the behavior of |
| 371 |
// the controls within the barcode fieldset and the optional filters |
420 |
// the controls within the barcode fieldset and the optional filters |
| 372 |
$("#uploadbarcodes").change(function() { |
421 |
$("#uploadbarcodes").change(barcodesProvided); |
| 373 |
if( $("#uploadbarcodes").val() ) { |
422 |
$("#barcodelist").on("change keyup paste", barcodesProvided); |
| 374 |
$("#setdate").prop('disabled',false); |
423 |
|
| 375 |
$("#compareinv2barcd").prop('disabled',false); |
|
|
| 376 |
$("#compareinv2barcd").attr('checked',true); // default |
| 377 |
$("#dont_checkin").prop('disabled',false); |
| 378 |
$("#out_of_order").prop('disabled',false); |
| 379 |
if( $("#compareinv2barcd").attr('checked') ) { |
| 380 |
$("fieldset#optionalfilters").show(); |
| 381 |
$("#ignoreissued").attr('checked',true); // default |
| 382 |
} else { |
| 383 |
$("fieldset#optionalfilters").hide(); |
| 384 |
$("#ignoreissued").attr('checked',false); |
| 385 |
} |
| 386 |
} else { |
| 387 |
$("#setdate").prop('disabled',true); |
| 388 |
$("#compareinv2barcd").prop('disabled',true); |
| 389 |
$("#compareinv2barcd").attr('checked',false); |
| 390 |
$("#dont_checkin").prop('disabled',true); |
| 391 |
$("#dont_checkin").attr('checked',false); |
| 392 |
$("#out_of_order").prop('disabled',true); |
| 393 |
$("#out_of_order").attr('checked',false); |
| 394 |
$("fieldset#optionalfilters").show(); |
| 395 |
} |
| 396 |
}); |
| 397 |
$("#compareinv2barcd").click(function() { |
424 |
$("#compareinv2barcd").click(function() { |
| 398 |
if( $("#compareinv2barcd").attr('checked') ) { |
425 |
if( $("#compareinv2barcd").attr('checked') ) { |
| 399 |
$("fieldset#optionalfilters").show(); |
426 |
$("fieldset#optionalfilters").show(); |