Owen Leonard
93866a2320
This patch makes two categories of changes: 1. CSS changes to accommodate changes in DataTables default CSS and markup structure. I've tried to make sure all of our Koha-specific styles are still applying. This change necessitates a rebuild of staff interface CSS. 2. DataTables option names: In this version of DataTables you can't override a default which uses CamelCase (e.g. "pagingType") with one in "Hungarian" notation, e.g. "sPaginationType." Since we define many default options in prog/js/datatables.js in camel case, any template which previously used a Hungarian notation option to override the default has now been updated to use the CamelCase version. See https://datatables.net/upgrade/1.10-convert#Options for a summary of the different option name changes. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
27 lines
777 B
JavaScript
27 lines
777 B
JavaScript
/* global _ dataTablesDefaults */
|
|
|
|
$(document).ready(function(){
|
|
$("#barcode").focus();
|
|
|
|
$(".confirmdelete").click(function(){
|
|
$(this).parents('tr').addClass("warn");
|
|
if(confirm(__("Are you sure you want to delete this rotating collection?"))){
|
|
return true;
|
|
} else {
|
|
$(this).parents('tr').removeClass("warn");
|
|
return false;
|
|
}
|
|
});
|
|
|
|
if( $('#rotating-collections-table').length > 0 ){
|
|
$('#rotating-collections-table').dataTable($.extend(true, {}, dataTablesDefaults, {
|
|
"autoWidth": false,
|
|
"columnDefs": [
|
|
{ "targets": [ -1 ], "orderable": false, "searchable": false },
|
|
],
|
|
"pagingType": "full"
|
|
} ));
|
|
}
|
|
|
|
|
|
});
|