thead_row.before(clone);
}
- table.dataTable($.extend(true, {}, dataTablesDefaults, dt_parameters));
+ var new_parameters = {}
+ $.extend(true, new_parameters, dataTablesDefaults, dt_parameters);
+ var default_column_defs = [
+ { "aTargets": [ "title-string" ], "sType": "title-string" },
+ { "aTargets": [ "string-sort" ], "sType": "string" },
+ { "aTargets": [ "anti-the" ], "sType": "anti-the" },
+ { "aTargets": [ "NoSort" ], "bSortable": false, "bSearchable": false },
+ ];
+ if ( new_parameters["aoColumnDefs"] === undefined ) {
+ new_parameters["aoColumnDefs"] = default_column_defs;
+ } else {
+ $.extend(true, new_parameters, default_column_defs);
+ }
+ table.dataTable(new_parameters);
table.DataTable().on("column-visibility.dt", function(){
if( typeof columnsInit == 'function' ){
// This function can be created separately and used to trigger
[% SET table_settings = TablesSettings.GetTableSettings( 'acqui', 'basket', 'orders' ) %];
$(document).ready(function() {
KohaTable("orders", {
- [% IF ( active ) %]
- "aoColumnDefs": [
- { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
- { "sType": "anti-the", "aTargets": [ "anti-the" ] }
- ],
- [% END %]
"sPaginationType": "full",
"autoWidth": false,
"exportColumns": [0,1,2,3,4,5,6,7,8,9,10,11,12,13],
$('span.hint').hide();
var columns_settings;// = [% TablesSettings.GetColumns( 'acqui', 'histsearch', 'histsearcht', 'json' ) | $raw %];
KohaTable("table_orders", {
- "aoColumnDefs": [
- { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
- { "sType": "title-string", "aTargets" : [ "title-string" ] }
- ],
"bPaginate": false
}, columns_settings );
$(document).ready(function() {
var columns_settings = [% TablesSettings.GetColumns( 'acqui', 'histsearch', 'histsearcht', 'json' ) | $raw %];
KohaTable("histsearcht", {
- "aoColumnDefs": [
- { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
- { "sType": "title-string", "aTargets" : [ "title-string" ] }
- ],
"sPaginationType": "full"
}, columns_settings );
var columns_settings = [% TablesSettings.GetColumns( 'acqui', 'lateorders', 'late_orders', 'json' ) | $raw %];
late_orderst = KohaTable("late_orders", {
- "aoColumnDefs": [
- { "targets": [ "NoSort" ],"sortable": false,"searchable": false },
- { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
- { "sType": "title-string", "aTargets" : [ "title-string" ] }
- ],
"sorting": [[ 1, "asc" ]],
"sPaginationType": "full",
"bAutoWidth": false,
<th>Description (OPAC)</th>
<th>Icon</th>
<th>Library limitations</th>
- <th class="noExport">Actions</th>
+ <th class="noExport NoSort">Actions</th>
</tr>
</thead><tbody>
[% FOREACH loo IN loop %]
var columns_settings = []; // Empty because there are no columns we want to be configurable
KohaTable("categoriest", {
- "aoColumnDefs": [
- { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
- ],
"aaSorting": [[ 0, "asc" ]],
"sPaginationType": "full"
}, columns_settings);
<th class="title-string">Last updated</th>
<th>Active</th>
<th>Archived</th>
- <th>Actions</th>
+ <th class="NoSort">Actions</th>
</tr>
</thead>
<tbody>
columns_settings = [% TablesSettings.GetColumns( 'admin', 'currency', 'currencies-table', 'json' ) | $raw %]
var issuest = KohaTable("currencies-table", {
dom: 'B<"clearfix">t',
- "columnDefs": [
- { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
- { "sType": "title-string", "aTargets" : [ "title-string" ] }
- ],
}, columns_settings );
// prevents users to check active with a currency != 1
<th>Processing fee (when lost)</th>
<th>Checkin message</th>
<th>Library limitations</th>
- <th class="noExport">Actions</th>
+ <th class="noExport NoSort">Actions</th>
</thead>
[% FOREACH itemtype IN itemtypes %]
<tr>
$(document).ready(function() {
KohaTable("table_item_type", {
- "aoColumnDefs": [
- { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
- ],
"aaSorting": [[ 1, "asc" ]],
"iDisplayLength": 10,
"sPaginationType": "full"
'sDom': 't',
'bPaginate': false,
'bAutoWidth': false,
- "aoColumnDefs": [
- { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
- { "sType": "title-string", "aTargets" : [ "title-string" ] }
- ],
"bKohaColumnsUseNames": true,
"sDom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>',
};
'bPaginate': false,
'bAutoWidth': false,
"aaSorting": [[ 4, "desc" ]],
- "aoColumnDefs": [
- { "aTargets": "title-string", "sType": "title-string" }
- ]
}, columns_settings);
[% END %]
columns_settings.splice(0,1);
[% END %]
var table = KohaTable("table_issues", {
- "aoColumnDefs": [
- { "sType": "title-string", "aTargets" : [ "title-string" ] }
- ],
"sDom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>',
"aaSorting": [[ 4, "desc" ]],
"sPaginationType": "full_numbers"
<table id="itemst">
<thead>
<tr>
- <th> </th>
+ <th class="NoSort"> </th>
[% FOREACH item_header IN item_header_loop %]
[% IF item_header.column_name %]
[% IF date_fields.grep(item_header.column_name).size %]
var columns_settings = [% TablesSettings.GetColumns( 'cataloguing', 'z3950_search', 'resultst', 'json' ) | $raw %];
var thetable = KohaTable("resultst", {
"aoColumnDefs": [
- { "targets": [ "NoSort" ],"sortable": false,"searchable": false },
{ "aTargets": [ 1 ], "sType": "nsb-nse" },
],
"aaSorting": [[ 1, "asc" ]],
KohaTable("overduest", {
"sPaginationType": "full",
"aaSorting": [[0, 'asc']],
- "aoColumnDefs": [
- { "sType": "title-string", "aTargets": [ "title-string" ] },
- { "sType": "anti-the", "aTargets" : [ "anti-the" ] }
- ],
"autoWidth": false,
"stateSave": true
}, columns_settings);
$(document).ready(function() {
var columns_settings = [% TablesSettings.GetColumns('circ', 'holds', 'holds-to-pull', 'json') | $raw %];
var holdst = KohaTable("holdst", {
- "aoColumnDefs": [
- { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
- { "sType": "title-string", "aTargets" : [ "title-string" ] },
- { "sType": "string", "aTargets": [ "string-sort" ] }
- ],
"sPaginationType": "full_numbers"
}, columns_settings);
holdst.fnAddFilters("filter");
<table id="holdst">
<thead>
<tr>
- <th class="hq-title">Title</th>
+ <th class="hq-title anti-the">Title</th>
<th class="hq-collection">Collection</th>
<th class="hq-itemtype">Item type</th>
<th class="hq-callnumber">Call number</th>
<th class="hq-barcode">Barcode</th>
<th class="hq-patron">Patron</th>
<th class="hq-sendto">Send to</th>
- <th class="hq-date">Date</th>
+ <th class="hq-date title-string">Date</th>
<th class="hq-notes">Notes</th>
</tr>
<tr>
var columns_settings = [% TablesSettings.GetColumns('circ', 'view_holdsqueue', 'holds-table', 'json') | $raw %];
var holdst = KohaTable("holdst", {
"aaSorting": [[ 3, "asc" ]],
- "aoColumns": [
- { "sType": "anti-the" },null,null,null,null,null,null,null,null,{ "sType": "title-string" },null
- ],
"sDom": 'B<"clearfix">t',
"bSortCellsTop": true,
"bPaginate": false
$(document).ready(function() {
KohaTable("holdst", {
- "aoColumnDefs": [
- { "sortable": false, "searchable": false, 'targets': [ 'NoSort' ] },
- { "type": "anti-the", "targets" : [ "anti-the" ] },
- { "type": "title-string", "targets" : [ "title-string" ] }
- ],
"sPaginationType": "full"
}, holdst_columns_settings);
KohaTable("holdso", {
- "aoColumnDefs": [
- { "sortable": false, "searchable": false, 'targets': [ 'NoSort' ] },
- { "type": "anti-the", "targets" : [ "anti-the" ] },
- { "type": "title-string", "targets" : [ "title-string" ] }
- ],
"sPaginationType": "full"
}, holdso_columns_settings);
<table id="course_reserves_table">
<thead>
<tr>
- <th class="antithe">Title</th>
+ <th class="anti-the">Title</th>
<th>Author</th>
<th>Barcode</th>
<th>Call number</th>
var rtable = KohaTable("course_reserves_table", {
"sPaginationType": "full",
"bAutoWidth": false,
- "aoColumnDefs": [
- { 'bSortable': false, 'aTargets': [ 'NoSort' ] },
- { 'sType': "anti-the", 'aTargets' : [ 'antithe'] }
- ]
}, columns_settings );
$(".delete_item").click(function(){
<th>Note</th>
<th>Amount</th>
<th>Outstanding</th>
- <th>Actions</th>
+ <th class="NoSort">Actions</th>
</tr>
</thead>
"sPaginationType": "full",
'aaSorting': [[0, 'desc']],
"sDom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>',
- "aoColumnDefs": [
- { "sType": "title-string", "aTargets" : [ "title-string" ] },
- { "bSortable": false, "bSearchable": false, "aTargets": [-1] }
- ]
}, columns_settings);
$("#filter_c").html('<p><a href="#" id="filter_transacs"><i class="fa fa-filter"></i> '+txtActivefilter+'</a>');
$('#filter_transacs').click(function(e) {
"sPaginationType": "full",
"aaSorting": [[4, 'desc']],
"sDom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>',
- "aoColumnDefs": [
- { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
- { "sType": "title-string", "aTargets" : [ "title-string" ] }
- ]
}, columns_settings);
});
</script>
var columns_settings = [% TablesSettings.GetColumns('members', 'pay', 'pay-fines-table', 'json') | $raw %];
KohaTable("finest", {
- "columnDefs": [
- { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
- { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
- { "sType": "title-string", "aTargets" : [ "title-string" ] }
- ],
"paging": false,
'sorting': [[ 3, "asc" ]],
"autoWidth": false
"sPaginationType": "full",
"aaSorting": [[10, 'desc']],
"sDom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>',
- "aoColumnDefs": [
- { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
- { "sType": "title-string", "aTargets" : [ "title-string" ] }
- ]
}, columns_settings);
var tabs = $("#tabs").tabs({
<table id="patron-list-table">
<thead>
<tr>
- <th> </th>
+ <th class="NoSort"> </th>
<th>Card</th>
<th>First name</th>
<th>Surname</th>
<th>Address</th>
<th>Category</th>
<th>Library</th>
- <th>Expires on</th>
+ <th class="title-string">Expires on</th>
<th>Circ notes</th>
</tr>
</thead>
var columns_settings_table = [% TablesSettings.GetColumns('members', 'patron-lists', 'patron-list-table', 'json') | $raw %]
KohaTable('patron-list-table', {
"order": [[ 3, "asc" ]],
- "aoColumns": [
- null,null,null,null,null,null,null,{ "sType": "title-string" },null
- ],
- "aoColumnDefs": [
- { "aTargets": [ 0 ], "bSortable": false, "bSearchable": false },
- ],
"sPaginationType": "full"
}, columns_settings_table);
<tr>
<th>Code</th>
<th>Description</th>
- <th>Cost</th>
- <th>Action</th>
+ <th class="NoSort">Cost</th>
+ <th class="NoSort">Action</th>
</tr>
</thead>
<tbody>
var items_table = KohaTable("invoices", {
"sPaginationType": "full",
"aaSorting": [[ 0, "asc" ]],
- "aoColumnDefs": [
- { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable":false },
- ],
}, items_columns_settings);
$(".add_button").on("click", function(e) {
<table id="table_reports">
<thead>
<tr>
- <th> </th>
+ <th class="NoSort"> </th>
<th>ID</th>
<th>Report name</th>
<th>Type</th>
[% ELSE %]
<th class="hidden"> </th>
[% END %]
- <th>Actions</th>
+ <th class="NoSort">Actions</th>
</tr>
</thead>
<tbody>
'sPaginationType': 'full',
'aaSorting': [[ 1, "asc" ]],
'aoColumnDefs': [
- { 'bSortable': false, 'bSearchable':false, 'aTargets': [0, -1] },
{ 'bSearchable': false, 'aTargets': [3] },
{ "aTargets": [ 1, 2 ], "sType": "natural" },
- { "sType": "title-string", "aTargets" : [ "title-string" ] },
{ "visible": false, "aTargets" : [ "hidden" ] }
],
'oLanguage': {
[% SET table_settings = TablesSettings.GetTableSettings( 'reports', 'orders_by_fund', 'funds-table' ) %];
$(document).ready( function () {
var funds_table = KohaTable("funds", {
- "columnDefs": [
- { "sortable": false, "searchable": false, 'targets': [ 'NoSort' ] },
- { "type": "title-string", "targets" : [ "title-string" ] }
- ],
"pageLength": [% table_settings.default_display_length | html %],
"order": [[ [% table_settings.default_sort_order | html %], 'asc']],
'autoWidth': false,
"aoColumnDefs": [
{ "bVisible": false, "aTargets": [ 'NoVisible' ] },
{ "bSortable": false, "aTargets": ["_all"] },
- { "aTargets": "title-string", "sType": "title-string" }
],
'bPaginate': false,
KohaTable("table_[% loop.count| html %]", {
"sorting": [[ 1, "asc" ]],
"autoWidth": false,
- "columnDefs": [
- { "sortable": false, "searchable": false, 'targets': [ 'NoSort' ] },
- { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
- ]
}, columns_settings );
[% END %]
[% END %]
columns_settings.unshift( { cannot_be_toggled: "1" } );
var itemst = KohaTable("itemst", {
- "aoColumnDefs": [
- { "aTargets": [ 0 ], "bSortable": false, "bSearchable": false },
- ],
'bPaginate': false,
'bInfo': false,
"bAutoWidth": false,
"dom": '<"top"flp>rt<"clear">',
"sorting": [[ 1, "asc" ]],
"autoWidth": false,
- "asColumnDefs": [
- { "type": "anti-the", "targets" : [ "anti-the" ] },
- { "type": "title-string", "targets" : [ "title-string" ] },
- ]
}, columns_settings );
});
</script>
"sorting": [[ 1, "asc" ]],
"autoWidth": false,
"asColumnDefs": [
- { "sortable": false, "searchable": false, 'targets': [ 'NoSort' ] },
- { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
{ "aTargets": [ 1 ], "sType": "nsb-nse" },
]
}, columns_settings );
dom: '<"clearfix">t',
"columnDefs": [
{ "targets": [ -1 ], "sortable": false, "searchable": false },
- { "type": "title-string", "targets" : [ "title-string" ] }
],
"bKohaColumnsUseNames": true,
"autoWidth": false
dom: '<"clearfix">t',
"columnDefs": [
{ "targets": [ -1 ], "sortable": false, "searchable": false },
- { "type": "title-string", "targets" : [ "title-string" ] }
],
"bKohaColumnsUseNames": true,
"autoWidth": false
KohaTable("#subscriptionst", {
dom: '<"clearfix">t',
"sorting": [[ 1, "desc" ]],
- "columnDefs": [
- { "type": "title-string", "targets" : [ "title-string" ] }
- ],
"autoWidth": false,
"bKohaColumnsUseNames": true
}, serial_column_settings);