Bug 34913: DataTables upgrade: Update CSS and option names
[koha.git] / koha-tmpl / intranet-tmpl / prog / js / rotating-collections.js
1 /* global _ dataTablesDefaults */
2
3 $(document).ready(function(){
4     $("#barcode").focus();
5
6     $(".confirmdelete").click(function(){
7         $(this).parents('tr').addClass("warn");
8         if(confirm(__("Are you sure you want to delete this rotating collection?"))){
9             return true;
10         } else {
11             $(this).parents('tr').removeClass("warn");
12             return false;
13         }
14     });
15
16     if( $('#rotating-collections-table').length > 0 ){
17         $('#rotating-collections-table').dataTable($.extend(true, {}, dataTablesDefaults, {
18             "autoWidth": false,
19             "columnDefs":  [
20                 { "targets":  [ -1 ], "orderable":  false, "searchable":  false },
21             ],
22             "pagingType":  "full"
23         } ));
24     }
25
26
27 });