|
Lines 573-591
$(document).ready(function() {
Link Here
|
| 573 |
fnCallback(json) |
573 |
fnCallback(json) |
| 574 |
} ); |
574 |
} ); |
| 575 |
}, |
575 |
}, |
|
|
576 |
"rowGroup":{ |
| 577 |
"dataSrc": "issued_today", |
| 578 |
"startRender": function ( rows, group ) { |
| 579 |
if ( group ) { |
| 580 |
return $('<tr/>').append("<td colspan='100%'><strong>" + TODAYS_CHECKOUTS + "</strong></td>"); |
| 581 |
} else { |
| 582 |
return $('<tr/>').append("<td colspan='100%'><strong>" + PREVIOUS_CHECKOUTS + "</strong></td>"); |
| 583 |
} |
| 584 |
} |
| 585 |
}, |
| 576 |
"fnInitComplete": function(oSettings, json) { |
586 |
"fnInitComplete": function(oSettings, json) { |
| 577 |
// Disable rowGrouping plugin after first use |
587 |
// Disable rowGrouping plugin after first use |
| 578 |
// so any sorting on the table doesn't use it |
588 |
// so any sorting on the table doesn't use it |
| 579 |
var oSettings = issuesTable.fnSettings(); |
589 |
//var oSettings = issuesTable.fnSettings(); |
| 580 |
|
|
|
| 581 |
for (f = 0; f < oSettings.aoDrawCallback.length; f++) { |
| 582 |
if (oSettings.aoDrawCallback[f].sName == 'fnRowGrouping') { |
| 583 |
oSettings.aoDrawCallback.splice(f, 1); |
| 584 |
break; |
| 585 |
} |
| 586 |
} |
| 587 |
|
| 588 |
oSettings.aaSortingFixed = null; |
| 589 |
|
590 |
|
| 590 |
// Build a summary of checkouts grouped by itemtype |
591 |
// Build a summary of checkouts grouped by itemtype |
| 591 |
var checkoutsByItype = json.aaData.reduce(function (obj, row) { |
592 |
var checkoutsByItype = json.aaData.reduce(function (obj, row) { |
|
Lines 605-617
$(document).ready(function() {
Link Here
|
| 605 |
.append(ul) |
606 |
.append(ul) |
| 606 |
.insertBefore(oSettings.nTableWrapper) |
607 |
.insertBefore(oSettings.nTableWrapper) |
| 607 |
}, |
608 |
}, |
| 608 |
}, columns_settings_issues_table).rowGrouping( |
609 |
}, columns_settings_issues_table); |
| 609 |
{ |
|
|
| 610 |
iGroupingColumnIndex: 1, |
| 611 |
iGroupingOrderByColumnIndex: 0, |
| 612 |
sGroupingColumnSortDirection: "asc" |
| 613 |
} |
| 614 |
); |
| 615 |
|
610 |
|
| 616 |
if ( $("#issues-table").length ) { |
611 |
if ( $("#issues-table").length ) { |
| 617 |
$("#issues-table_processing").position({ |
612 |
$("#issues-table_processing").position({ |
| 618 |
- |
|
|