|
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 277-283
Link Here
|
| 277 |
[% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %] |
291 |
[% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %] |
| 278 |
<script type="text/javascript"> |
292 |
<script type="text/javascript"> |
| 279 |
function checkForm() { |
293 |
function checkForm() { |
| 280 |
if ( $('#uploadbarcodes').val() ) { |
294 |
if ( $('#uploadbarcodes').val() && $('#barcodelist').val() ) { |
|
|
295 |
alert(_("You have uploaded a barcode file and scanned barcodes at the same time. Please choose one of the options before.")); |
| 296 |
return false; |
| 297 |
} |
| 298 |
if ( $('#uploadbarcodes').val() || $('#barcodelist').val() ) { |
| 281 |
if ( !( |
299 |
if ( !( |
| 282 |
$('#branchloop').val() || |
300 |
$('#branchloop').val() || |
| 283 |
$('#locationloop').val() || |
301 |
$('#locationloop').val() || |
|
Lines 296-301
Link Here
|
| 296 |
return true; |
314 |
return true; |
| 297 |
} |
315 |
} |
| 298 |
|
316 |
|
|
|
317 |
function barcodesProvided() { |
| 318 |
if( $("#uploadbarcodes").val() || $("#barcodelist").val() ) { |
| 319 |
$("#setdate").prop('disabled',false); |
| 320 |
$("#compareinv2barcd").prop('disabled',false); |
| 321 |
$("#compareinv2barcd").attr('checked',true); // default |
| 322 |
$("#dont_checkin").prop('disabled',false); |
| 323 |
$("#out_of_order").prop('disabled',false); |
| 324 |
if( $("#compareinv2barcd").attr('checked') ) { |
| 325 |
$("fieldset#optionalfilters").show(); |
| 326 |
$("#ignoreissued").attr('checked',true); // default |
| 327 |
} else { |
| 328 |
$("fieldset#optionalfilters").hide(); |
| 329 |
$("#ignoreissued").attr('checked',false); |
| 330 |
} |
| 331 |
} else { |
| 332 |
$("#setdate").prop('disabled',true); |
| 333 |
$("#compareinv2barcd").prop('disabled',true); |
| 334 |
$("#compareinv2barcd").attr('checked',false); |
| 335 |
$("#dont_checkin").prop('disabled',true); |
| 336 |
$("#dont_checkin").attr('checked',false); |
| 337 |
$("#out_of_order").prop('disabled',true); |
| 338 |
$("#out_of_order").attr('checked',false); |
| 339 |
$("fieldset#optionalfilters").show(); |
| 340 |
} |
| 341 |
} |
| 342 |
|
| 299 |
$(document).ready(function(){ |
343 |
$(document).ready(function(){ |
| 300 |
inventorydt = $('#inventoryt').dataTable($.extend(true, {}, dataTablesDefaults, { |
344 |
inventorydt = $('#inventoryt').dataTable($.extend(true, {}, dataTablesDefaults, { |
| 301 |
'sPaginationType': 'full_numbers', |
345 |
'sPaginationType': 'full_numbers', |
|
Lines 363-395
Link Here
|
| 363 |
return checkForm(); |
407 |
return checkForm(); |
| 364 |
}); |
408 |
}); |
| 365 |
|
409 |
|
|
|
410 |
$("#resetuploadbarcodes").click(function() { |
| 411 |
$("#uploadbarcodes").val(""); |
| 412 |
barcodesProvided(); |
| 413 |
}); |
| 414 |
|
| 366 |
// #uploadbarcodes and #compareinv2barcd determine the behavior of |
415 |
// #uploadbarcodes and #compareinv2barcd determine the behavior of |
| 367 |
// the controls within the barcode fieldset and the optional filters |
416 |
// the controls within the barcode fieldset and the optional filters |
| 368 |
$("#uploadbarcodes").change(function() { |
417 |
$("#uploadbarcodes").change(barcodesProvided); |
| 369 |
if( $("#uploadbarcodes").val() ) { |
418 |
$("#barcodelist").on("change keyup paste", barcodesProvided); |
| 370 |
$("#setdate").prop('disabled',false); |
419 |
|
| 371 |
$("#compareinv2barcd").prop('disabled',false); |
|
|
| 372 |
$("#compareinv2barcd").attr('checked',true); // default |
| 373 |
$("#dont_checkin").prop('disabled',false); |
| 374 |
$("#out_of_order").prop('disabled',false); |
| 375 |
if( $("#compareinv2barcd").attr('checked') ) { |
| 376 |
$("fieldset#optionalfilters").show(); |
| 377 |
$("#ignoreissued").attr('checked',true); // default |
| 378 |
} else { |
| 379 |
$("fieldset#optionalfilters").hide(); |
| 380 |
$("#ignoreissued").attr('checked',false); |
| 381 |
} |
| 382 |
} else { |
| 383 |
$("#setdate").prop('disabled',true); |
| 384 |
$("#compareinv2barcd").prop('disabled',true); |
| 385 |
$("#compareinv2barcd").attr('checked',false); |
| 386 |
$("#dont_checkin").prop('disabled',true); |
| 387 |
$("#dont_checkin").attr('checked',false); |
| 388 |
$("#out_of_order").prop('disabled',true); |
| 389 |
$("#out_of_order").attr('checked',false); |
| 390 |
$("fieldset#optionalfilters").show(); |
| 391 |
} |
| 392 |
}); |
| 393 |
$("#compareinv2barcd").click(function() { |
420 |
$("#compareinv2barcd").click(function() { |
| 394 |
if( $("#compareinv2barcd").attr('checked') ) { |
421 |
if( $("#compareinv2barcd").attr('checked') ) { |
| 395 |
$("fieldset#optionalfilters").show(); |
422 |
$("fieldset#optionalfilters").show(); |