View | Details | Raw Unified | Return to bug 13908
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js (-6 / +2 lines)
Lines 174-184 $(document).ready(function() { Link Here
174
            "aoColumns": [
174
            "aoColumns": [
175
                {
175
                {
176
                    "mDataProp": function( oObj ) {
176
                    "mDataProp": function( oObj ) {
177
                        if ( oObj.issued_today ) {
177
                        return oObj.sort_order;
178
                            return "1" + oObj.timestamp;
179
                        } else {
180
                            return "0" + oObj.date_due;
181
                        }
182
                    }
178
                    }
183
                },
179
                },
184
                {
180
                {
Lines 423-429 $(document).ready(function() { Link Here
423
            {
419
            {
424
                iGroupingColumnIndex: 1,
420
                iGroupingColumnIndex: 1,
425
                iGroupingOrderByColumnIndex: 0,
421
                iGroupingOrderByColumnIndex: 0,
426
                sGroupingColumnSortDirection: "desc"
422
                sGroupingColumnSortDirection: "asc"
427
            }
423
            }
428
        );
424
        );
429
425
(-)a/svc/checkouts (-2 / +9 lines)
Lines 207-219 while ( my $c = $sth->fetchrow_hashref() ) { Link Here
207
    }
207
    }
208
}
208
}
209
209
210
211
@checkouts_today = sort { $a->{timstamp} cmp $b->{timestamp} } @checkouts_today;
210
@checkouts_today = reverse(@checkouts_today)
212
@checkouts_today = reverse(@checkouts_today)
211
  if ( C4::Context->preference('todaysIssuesDefaultSortOrder') eq 'desc' );
213
  unless ( C4::Context->preference('todaysIssuesDefaultSortOrder') eq 'desc' );
214
215
@checkouts_previous = sort { $a->{date_due} cmp $b->{date_due} } @checkouts_previous;
212
@checkouts_previous = reverse(@checkouts_previous)
216
@checkouts_previous = reverse(@checkouts_previous)
213
  if ( C4::Context->preference('previousIssuesDefaultSortOrder') eq 'desc' );
217
  if ( C4::Context->preference('previousIssuesDefaultSortOrder') eq 'desc' );
214
218
215
my @checkouts = ( @checkouts_today, @checkouts_previous );
219
my @checkouts = ( @checkouts_today, @checkouts_previous );
216
220
221
my $i = 1;
222
map { $_->{sort_order} = $i++ } @checkouts;
223
224
217
my $data;
225
my $data;
218
$data->{'iTotalRecords'}        = scalar @checkouts;
226
$data->{'iTotalRecords'}        = scalar @checkouts;
219
$data->{'iTotalDisplayRecords'} = scalar @checkouts;
227
$data->{'iTotalDisplayRecords'} = scalar @checkouts;
220
- 

Return to bug 13908