|
Lines 2-8
Link Here
|
| 2 |
[% USE Asset %] |
2 |
[% USE Asset %] |
| 3 |
[% USE KohaDates %] |
3 |
[% USE KohaDates %] |
| 4 |
[% USE Branches %] |
4 |
[% USE Branches %] |
| 5 |
[% SET footerjs = 1 %] |
|
|
| 6 |
[% INCLUDE 'doc-head-open.inc' %] |
5 |
[% INCLUDE 'doc-head-open.inc' %] |
| 7 |
<title>Koha › Acquisitions › Order staged MARC records |
6 |
<title>Koha › Acquisitions › Order staged MARC records |
| 8 |
[% IF ( batch_details ) %] |
7 |
[% IF ( batch_details ) %] |
|
Lines 12-19
Link Here
|
| 12 |
[% END %] |
11 |
[% END %] |
| 13 |
</title> |
12 |
</title> |
| 14 |
[% Asset.css("css/datatables.css") | $raw %] |
13 |
[% Asset.css("css/datatables.css") | $raw %] |
| 15 |
<style type="text/css">#dataPreview { width : 80%; } @media (max-width: 767px) { #dataPreview { margin: 0; width : auto; } }</style> |
14 |
<style>@media (max-width: 767px) { #dataPreview { margin: 0; width : auto; } }</style> |
| 16 |
[% INCLUDE 'doc-head-close.inc' %] |
15 |
[% INCLUDE 'doc-head-close.inc' %] |
|
|
16 |
[% Asset.js("js/acquisitions-menu.js") | $raw %] |
| 17 |
[% INCLUDE 'datatables.inc' %] |
| 18 |
[% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %] |
| 19 |
[% Asset.js("js/acq.js") | $raw %] |
| 20 |
[% Asset.js("js/funds_sorts.js") | $raw %] |
| 21 |
<script> |
| 22 |
$(document).ready(function() { |
| 23 |
$("#files").dataTable($.extend(true, {}, dataTablesDefaults, { |
| 24 |
"aoColumnDefs": [ |
| 25 |
{ "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] }, |
| 26 |
{ "sType": "anti-the", "aTargets" : [ "anti-the" ] }, |
| 27 |
{ "sType": "title-string", "aTargets" : [ "title-string" ] } |
| 28 |
], |
| 29 |
"sPaginationType": "four_button", |
| 30 |
"aaSorting": [] |
| 31 |
} ) ); |
| 32 |
|
| 33 |
$("#records_to_import fieldset.rows div").hide(); |
| 34 |
$('input:checkbox[name="import_record_id"]').change(function(){ |
| 35 |
var container = $(this).parents("fieldset"); |
| 36 |
if ( $(this).is(':checked') ) { |
| 37 |
$(container).addClass("selected"); |
| 38 |
$(container).removeClass("unselected"); |
| 39 |
$(container).find("div").toggle(true); |
| 40 |
} else { |
| 41 |
$(container).addClass("unselected"); |
| 42 |
$(container).removeClass("selected"); |
| 43 |
$(container).find("div").toggle(false); |
| 44 |
} |
| 45 |
} ); |
| 46 |
|
| 47 |
$("input:checkbox").prop("checked", false); |
| 48 |
$("div.biblio.unselected select").prop('disabled', false); |
| 49 |
$("div.biblio.unselected input").prop('disabled', false); |
| 50 |
|
| 51 |
$("#checkAll").click(function(){ |
| 52 |
$("#Aform").checkCheckboxes(); |
| 53 |
$("input:checkbox[name='import_record_id']").change(); |
| 54 |
return false; |
| 55 |
}); |
| 56 |
$("#unCheckAll").click(function(){ |
| 57 |
$("#Aform").unCheckCheckboxes(); |
| 58 |
$("input:checkbox[name='import_record_id']").change(); |
| 59 |
return false; |
| 60 |
}); |
| 61 |
|
| 62 |
$("#Aform").on("submit", function(){ |
| 63 |
if ( $("input:checkbox[name='import_record_id']:checked").length < 1 ) { |
| 64 |
alert(_("There is no record selected")); |
| 65 |
return false; |
| 66 |
} |
| 67 |
|
| 68 |
var error = 0; |
| 69 |
$("input:checkbox[name='import_record_id']:checked").parents('fieldset').find('input[name="quantity"]').each(function(){ |
| 70 |
if ( $(this).val().length < 1 || isNaN( $(this).val() ) ) { |
| 71 |
error++; |
| 72 |
} |
| 73 |
}); |
| 74 |
if ( error > 0 ) { |
| 75 |
alert(error + " " + _("quantity values are not filled in or are not numbers")); |
| 76 |
return false; |
| 77 |
|
| 78 |
} |
| 79 |
|
| 80 |
return disableUnchecked($(this)); |
| 81 |
}); |
| 82 |
$('#tabs').tabs(); |
| 83 |
$(".previewData").on("click", function(e){ |
| 84 |
e.preventDefault(); |
| 85 |
var ltitle = $(this).text(); |
| 86 |
var page = $(this).attr("href"); |
| 87 |
$("#dataPreviewLabel").text(ltitle); |
| 88 |
$("#dataPreview .modal-body").load(page + " div"); |
| 89 |
$('#dataPreview').modal({show:true}); |
| 90 |
}); |
| 91 |
$("#dataPreview").on("hidden.bs.modal", function(){ |
| 92 |
$("#dataPreviewLabel").html(""); |
| 93 |
$("#dataPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface | html %]/[% theme | html %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>"); |
| 94 |
}); |
| 95 |
}); |
| 96 |
|
| 97 |
function disableUnchecked(form){ |
| 98 |
$("fieldset.biblio.unselected").each(function(){ |
| 99 |
$(this).remove(); |
| 100 |
}); |
| 101 |
return 1; |
| 102 |
} |
| 103 |
</script> |
| 17 |
</head> |
104 |
</head> |
| 18 |
|
105 |
|
| 19 |
<body id="acq_addorderiso2709" class="acq"> |
106 |
<body id="acq_addorderiso2709" class="acq"> |
|
Lines 425-519
Link Here
|
| 425 |
</div> [% # /div.col-sm-6 %] |
512 |
</div> [% # /div.col-sm-6 %] |
| 426 |
</div> [% # /div.row %] |
513 |
</div> [% # /div.row %] |
| 427 |
|
514 |
|
| 428 |
[% MACRO jsinclude BLOCK %] |
|
|
| 429 |
[% Asset.js("js/acquisitions-menu.js") | $raw %] |
| 430 |
[% INCLUDE 'datatables.inc' %] |
| 431 |
[% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %] |
| 432 |
[% Asset.js("js/acq.js") | $raw %] |
| 433 |
[% Asset.js("js/funds_sorts.js") | $raw %] |
| 434 |
<script type="text/JavaScript"> |
| 435 |
$(document).ready(function() { |
| 436 |
$("#files").dataTable($.extend(true, {}, dataTablesDefaults, { |
| 437 |
"aoColumnDefs": [ |
| 438 |
{ "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] }, |
| 439 |
{ "sType": "anti-the", "aTargets" : [ "anti-the" ] }, |
| 440 |
{ "sType": "title-string", "aTargets" : [ "title-string" ] } |
| 441 |
], |
| 442 |
"sPaginationType": "four_button", |
| 443 |
"aaSorting": [] |
| 444 |
} ) ); |
| 445 |
|
| 446 |
$("#records_to_import fieldset.rows div").hide(); |
| 447 |
$('input:checkbox[name="import_record_id"]').change(function(){ |
| 448 |
var container = $(this).parents("fieldset"); |
| 449 |
if ( $(this).is(':checked') ) { |
| 450 |
$(container).addClass("selected"); |
| 451 |
$(container).removeClass("unselected"); |
| 452 |
$(container).find("div").toggle(true); |
| 453 |
} else { |
| 454 |
$(container).addClass("unselected"); |
| 455 |
$(container).removeClass("selected"); |
| 456 |
$(container).find("div").toggle(false); |
| 457 |
} |
| 458 |
} ); |
| 459 |
|
| 460 |
$("input:checkbox").prop("checked", false); |
| 461 |
$("div.biblio.unselected select").prop('disabled', false); |
| 462 |
$("div.biblio.unselected input").prop('disabled', false); |
| 463 |
|
| 464 |
$("#checkAll").click(function(){ |
| 465 |
$("#Aform").checkCheckboxes(); |
| 466 |
$("input:checkbox[name='import_record_id']").change(); |
| 467 |
return false; |
| 468 |
}); |
| 469 |
$("#unCheckAll").click(function(){ |
| 470 |
$("#Aform").unCheckCheckboxes(); |
| 471 |
$("input:checkbox[name='import_record_id']").change(); |
| 472 |
return false; |
| 473 |
}); |
| 474 |
|
| 475 |
$("#Aform").on("submit", function(){ |
| 476 |
if ( $("input:checkbox[name='import_record_id']:checked").length < 1 ) { |
| 477 |
alert(_("There is no record selected")); |
| 478 |
return false; |
| 479 |
} |
| 480 |
|
| 481 |
var error = 0; |
| 482 |
$("input:checkbox[name='import_record_id']:checked").parents('fieldset').find('input[name="quantity"]').each(function(){ |
| 483 |
if ( $(this).val().length < 1 || isNaN( $(this).val() ) ) { |
| 484 |
error++; |
| 485 |
} |
| 486 |
}); |
| 487 |
if ( error > 0 ) { |
| 488 |
alert(error + " " + _("quantity values are not filled in or are not numbers")); |
| 489 |
return false; |
| 490 |
|
| 491 |
} |
| 492 |
|
| 493 |
return disableUnchecked($(this)); |
| 494 |
}); |
| 495 |
$('#tabs').tabs(); |
| 496 |
$(".previewData").on("click", function(e){ |
| 497 |
e.preventDefault(); |
| 498 |
var ltitle = $(this).text(); |
| 499 |
var page = $(this).attr("href"); |
| 500 |
$("#dataPreviewLabel").text(ltitle); |
| 501 |
$("#dataPreview .modal-body").load(page + " div"); |
| 502 |
$('#dataPreview').modal({show:true}); |
| 503 |
}); |
| 504 |
$("#dataPreview").on("hidden.bs.modal", function(){ |
| 505 |
$("#dataPreviewLabel").html(""); |
| 506 |
$("#dataPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface | html %]/[% theme | html %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>"); |
| 507 |
}); |
| 508 |
}); |
| 509 |
|
| 510 |
function disableUnchecked(form){ |
| 511 |
$("fieldset.biblio.unselected").each(function(){ |
| 512 |
$(this).remove(); |
| 513 |
}); |
| 514 |
return 1; |
| 515 |
} |
| 516 |
</script> |
| 517 |
[% END %] |
| 518 |
|
| 519 |
[% INCLUDE 'intranet-bottom.inc' %] |
515 |
[% INCLUDE 'intranet-bottom.inc' %] |
| 520 |
- |
|
|