Bug 34913: Adjust "Manage staged MARC records"
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
99eb44c6c3
commit
80b2970b74
2 changed files with 19 additions and 23 deletions
|
@ -460,7 +460,14 @@
|
|||
"searching": false,
|
||||
"processing": true,
|
||||
"serverSide": true,
|
||||
"ajax": 'batch_records_ajax.pl',
|
||||
ajax: {
|
||||
url: "batch_records_ajax.pl",
|
||||
type: "POST",
|
||||
data: function ( d ) {
|
||||
d.import_batch_id = [% import_batch_id | html %];
|
||||
return d;
|
||||
},
|
||||
},
|
||||
"pagingType": "full_numbers",
|
||||
"dom": '<"top pager"iflp>rt<"bottom pager"flp><"clear">',
|
||||
"columns": [
|
||||
|
@ -472,19 +479,6 @@
|
|||
{ "data": null, "defaultContent": "" },
|
||||
{ "data": "matched" }
|
||||
],
|
||||
"fnServerData": function(sSource, aoData, fnCallback) {
|
||||
aoData.push({ "name": "import_batch_id", "value": [% import_batch_id | html %] });
|
||||
|
||||
$.ajax({
|
||||
'dataType': 'json',
|
||||
'type': 'POST',
|
||||
'url': sSource,
|
||||
'data': aoData,
|
||||
'success': function(json) {
|
||||
fnCallback(json);
|
||||
}
|
||||
});
|
||||
},
|
||||
"rowCallback": function(nRow, aData, iDisplayIndex, iDisplayIndexFull) {
|
||||
[% IF(record_type == 'auth') %]
|
||||
var record_details_url = "/cgi-bin/koha/authorities/detail.pl?authid=";
|
||||
|
|
|
@ -44,10 +44,11 @@ my @sort_columns =
|
|||
qw/import_record_id title status overlay_status overlay_status/;
|
||||
|
||||
my $import_batch_id = $input->param('import_batch_id');
|
||||
my $offset = $input->param('iDisplayStart');
|
||||
my $results_per_page = $input->param('iDisplayLength');
|
||||
my $sorting_column = $sort_columns[ $input->param('iSortCol_0') // 0 ];
|
||||
my $sorting_direction = $input->param('sSortDir_0');
|
||||
my $offset = $input->param('start');
|
||||
my $results_per_page = $input->param('length');
|
||||
# FIXME We handle sorting on one column only!
|
||||
my $sorting_column = $sort_columns[ $input->param('order[0][column]') // 0 ];
|
||||
my $sorting_direction = $input->param('order[0][dir]');
|
||||
|
||||
$results_per_page = undef if $results_per_page && $results_per_page == -1;
|
||||
|
||||
|
@ -108,10 +109,11 @@ foreach my $record (@$records) {
|
|||
};
|
||||
}
|
||||
|
||||
my $data;
|
||||
$data->{'iTotalRecords'} = $batch->{'num_records'};
|
||||
$data->{'iTotalDisplayRecords'} = $batch->{'num_records'};
|
||||
$data->{'sEcho'} = $input->param('sEcho') || undef;
|
||||
$data->{'aaData'} = \@list;
|
||||
my $data = {
|
||||
recordsTotal => $batch->{num_records},
|
||||
recordsFiltered => $batch->{num_records},
|
||||
draw => $input->param('draw') || undef,
|
||||
data => \@list,
|
||||
};
|
||||
|
||||
print to_json($data);
|
||||
|
|
Loading…
Reference in a new issue