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

(-)a/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js (-6 / +3 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
                    console.log(oObj.sort_order);
178
                            return "1" + oObj.timestamp;
178
                        return oObj.sort_order;
179
                        } else {
180
                            return "0" + oObj.date_due;
181
                        }
182
                    }
179
                    }
183
                },
180
                },
184
                {
181
                {
Lines 414-420 $(document).ready(function() { Link Here
414
            {
411
            {
415
                iGroupingColumnIndex: 1,
412
                iGroupingColumnIndex: 1,
416
                iGroupingOrderByColumnIndex: 0,
413
                iGroupingOrderByColumnIndex: 0,
417
                sGroupingColumnSortDirection: "desc"
414
                sGroupingColumnSortDirection: "asc"
418
            }
415
            }
419
        );
416
        );
420
417
(-)a/svc/checkouts (-2 / +9 lines)
Lines 204-216 while ( my $c = $sth->fetchrow_hashref() ) { Link Here
204
    }
204
    }
205
}
205
}
206
206
207
208
@checkouts_today = sort { $a->{timstamp} cmp $b->{timestamp} } @checkouts_today;
207
@checkouts_today = reverse(@checkouts_today)
209
@checkouts_today = reverse(@checkouts_today)
208
  if ( C4::Context->preference('todaysIssuesDefaultSortOrder') eq 'desc' );
210
  unless ( C4::Context->preference('todaysIssuesDefaultSortOrder') eq 'desc' );
211
212
@checkouts_previous = sort { $a->{date_due} cmp $b->{date_due} } @checkouts_previous;
209
@checkouts_previous = reverse(@checkouts_previous)
213
@checkouts_previous = reverse(@checkouts_previous)
210
  if ( C4::Context->preference('previousIssuesDefaultSortOrder') eq 'desc' );
214
  if ( C4::Context->preference('previousIssuesDefaultSortOrder') eq 'desc' );
211
215
212
my @checkouts = ( @checkouts_today, @checkouts_previous );
216
my @checkouts = ( @checkouts_today, @checkouts_previous );
213
217
218
my $i = 1;
219
map { $_->{sort_order} = $i++ } @checkouts;
220
221
214
my $data;
222
my $data;
215
$data->{'iTotalRecords'}        = scalar @checkouts;
223
$data->{'iTotalRecords'}        = scalar @checkouts;
216
$data->{'iTotalDisplayRecords'} = scalar @checkouts;
224
$data->{'iTotalDisplayRecords'} = scalar @checkouts;
217
- 

Return to bug 13908