Lines 27-81
$(document).ready(function(){
Link Here
|
27 |
$(this).parent().hide(); |
27 |
$(this).parent().hide(); |
28 |
}); |
28 |
}); |
29 |
|
29 |
|
30 |
$("#records-table").dataTable({ |
30 |
[% IF import_batch_id %] |
31 |
"aLengthMenu": [[10, 15, 20, 25, 50, 100, -1], [10, 15, 20, 25, 50, 100, _("All")]], |
31 |
$("#records-table").dataTable({ |
32 |
"iDisplayLength" : 20, |
32 |
"aLengthMenu": [[10, 15, 20, 25, 50, 100, -1], [10, 15, 20, 25, 50, 100, _("All")]], |
33 |
"bAutoWidth": false, |
33 |
"iDisplayLength" : 20, |
34 |
"bFilter": false, |
34 |
"bAutoWidth": false, |
35 |
"bProcessing": true, |
35 |
"bFilter": false, |
36 |
"bServerSide": true, |
36 |
"bProcessing": true, |
37 |
"sAjaxSource": 'batch_records_ajax.pl', |
37 |
"bServerSide": true, |
38 |
"sPaginationType": "full_numbers", |
38 |
"sAjaxSource": 'batch_records_ajax.pl', |
39 |
"sDom": '<"top pager"iflp>rt<"bottom pager"flp><"clear">', |
39 |
"sPaginationType": "full_numbers", |
40 |
"aoColumns": [ |
40 |
"sDom": '<"top pager"iflp>rt<"bottom pager"flp><"clear">', |
41 |
{ "mDataProp": "import_record_id" }, |
41 |
"aoColumns": [ |
42 |
{ "mDataProp": "citation" }, |
42 |
{ "mDataProp": "import_record_id" }, |
43 |
{ "mDataProp": "status" }, |
43 |
{ "mDataProp": "citation" }, |
44 |
{ "mDataProp": "overlay_status" }, |
44 |
{ "mDataProp": "status" }, |
45 |
{ "mDataProp": "match_citation" }, |
45 |
{ "mDataProp": "overlay_status" }, |
46 |
{ "mDataProp": "matched" }, |
46 |
{ "mDataProp": "match_citation" }, |
47 |
], |
47 |
{ "mDataProp": "matched" }, |
48 |
"fnServerData": function ( sSource, aoData, fnCallback ) { |
48 |
], |
49 |
aoData.push( { "name": "import_batch_id", "value": [% import_batch_id %] } ); |
49 |
"fnServerData": function ( sSource, aoData, fnCallback ) { |
|
|
50 |
aoData.push( { "name": "import_batch_id", "value": [% import_batch_id %] } ); |
50 |
|
51 |
|
51 |
$.getJSON( sSource, aoData, function (json) { |
52 |
$.getJSON( sSource, aoData, function (json) { |
52 |
fnCallback(json) |
53 |
fnCallback(json) |
53 |
} ); |
54 |
} ); |
54 |
}, |
55 |
}, |
55 |
"fnRowCallback": function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) { |
56 |
"fnRowCallback": function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) { |
56 |
$('td:eq(1)', nRow).html( |
57 |
$('td:eq(1)', nRow).html( |
57 |
'<a href="javascript:void(0)" onclick="show_marc(' |
58 |
'<a href="javascript:void(0)" onclick="show_marc(' |
58 |
+ aData['import_record_id'] |
59 |
+ aData['import_record_id'] |
59 |
+ ')">' + aData['citation'] + '</a>' |
60 |
+ ')">' + aData['citation'] + '</a>' |
60 |
); |
|
|
61 |
|
62 |
if ( aData['match_id'] ) { |
63 |
$('td:eq(4)', nRow).html( |
64 |
_("Matches biblio ") |
65 |
+ aData['match_id'] |
66 |
+ " (" + _("score") + "=" |
67 |
+ aData['score'] |
68 |
+ '):' + '<a target="_blank" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=' |
69 |
+ aData['match_id'] + '">' + aData['match_citation'] + '</a>' |
70 |
); |
61 |
); |
71 |
} |
|
|
72 |
|
62 |
|
73 |
$('td:eq(5)', nRow).html( |
63 |
if ( aData['match_id'] ) { |
74 |
'<a target="_blank" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=' |
64 |
$('td:eq(4)', nRow).html( |
75 |
+ aData['matched'] + '">' + aData['matched'] + '</a>' |
65 |
_("Matches biblio ") |
76 |
); |
66 |
+ aData['match_id'] |
77 |
}, |
67 |
+ " (" + _("score") + "=" |
78 |
}); |
68 |
+ aData['score'] |
|
|
69 |
+ '):' + '<a target="_blank" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=' |
70 |
+ aData['match_id'] + '">' + aData['match_citation'] + '</a>' |
71 |
); |
72 |
} |
73 |
|
74 |
$('td:eq(5)', nRow).html( |
75 |
'<a target="_blank" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=' |
76 |
+ aData['matched'] + '">' + aData['matched'] + '</a>' |
77 |
); |
78 |
}, |
79 |
}); |
80 |
[% END %] |
79 |
}); |
81 |
}); |
80 |
|
82 |
|
81 |
function show_marc( id ) { |
83 |
function show_marc( id ) { |
82 |
- |
|
|