Lines 252-257
$(document).ready(function() {
Link Here
|
252 |
return title; |
252 |
return title; |
253 |
} |
253 |
} |
254 |
}, |
254 |
}, |
|
|
255 |
{ "mDataProp": "enumchron" }, //bVisible: controlled by the fnInitComplete if enumchron is used in the table |
255 |
{ "mDataProp": "itemtype_description" }, |
256 |
{ "mDataProp": "itemtype_description" }, |
256 |
{ "mDataProp": "issuedate_formatted" }, |
257 |
{ "mDataProp": "issuedate_formatted" }, |
257 |
{ "mDataProp": "branchname" }, |
258 |
{ "mDataProp": "branchname" }, |
Lines 399-404
$(document).ready(function() {
Link Here
|
399 |
} |
400 |
} |
400 |
} |
401 |
} |
401 |
|
402 |
|
|
|
403 |
doHideEnumchron( $( oSettings.nTable ).DataTable() , oSettings.fnRecordsTotal() , '.col_enumchron' ); |
404 |
|
402 |
oSettings.aaSortingFixed = null; |
405 |
oSettings.aaSortingFixed = null; |
403 |
}, |
406 |
}, |
404 |
}).rowGrouping( |
407 |
}).rowGrouping( |
Lines 487-492
$(document).ready(function() {
Link Here
|
487 |
return title; |
490 |
return title; |
488 |
} |
491 |
} |
489 |
}, |
492 |
}, |
|
|
493 |
{ "mDataProp": "enumchron" }, |
490 |
{ "mDataProp": "itemtype" }, |
494 |
{ "mDataProp": "itemtype" }, |
491 |
{ "mDataProp": "issuedate_formatted" }, |
495 |
{ "mDataProp": "issuedate_formatted" }, |
492 |
{ "mDataProp": "branchname" }, |
496 |
{ "mDataProp": "branchname" }, |
Lines 523-528
$(document).ready(function() {
Link Here
|
523 |
fnCallback(json) |
527 |
fnCallback(json) |
524 |
} ); |
528 |
} ); |
525 |
}, |
529 |
}, |
|
|
530 |
"fnInitComplete": function(oSettings) { |
531 |
doHideEnumchron( $( oSettings.nTable ).DataTable() , oSettings.fnRecordsTotal() , '.col_enumchron' ); |
532 |
}, |
526 |
}); |
533 |
}); |
527 |
} |
534 |
} |
528 |
}); |
535 |
}); |
Lines 544-546
$(document).ready(function() {
Link Here
|
544 |
} ).attr( 'checked', false ); |
551 |
} ).attr( 'checked', false ); |
545 |
} |
552 |
} |
546 |
}); |
553 |
}); |
|
|
554 |
|
555 |
function doHideEnumchron (table, rowCount, colDefinition) { |
556 |
//Get the presence of a enumchron and hide the column if no enumchron present. |
557 |
var enumchronPresent = 0; |
558 |
var col_enumchron = table.column( colDefinition ); |
559 |
var col_enumchron_data = col_enumchron.data(); |
560 |
|
561 |
for(var i=0;i<rowCount;i++) { |
562 |
if ( col_enumchron_data[ i ] ) { |
563 |
enumchronPresent = 1; |
564 |
break; |
565 |
} |
566 |
} |
567 |
if (! enumchronPresent) { |
568 |
col_enumchron.visible(false); |
569 |
} |
570 |
} |