Bug 19656: Move rotating collections templates JS to the footer
[koha.git] / koha-tmpl / intranet-tmpl / prog / js / rotating-collections.js
blobbed5e9a093dc92241ffca174f37f09f9c986c9ee
1 /* global _ dataTablesDefaults */
3 $(document).ready(function(){
4     $("#barcode").focus();
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     });
16     if( $('#rotating-collections-table').length > 0 ){
17         $('#rotating-collections-table').dataTable($.extend(true, {}, dataTablesDefaults, {
18             "autoWidth": false,
19             "aoColumnDefs": [
20                 { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
21             ],
22             "sPaginationType": "four_button"
23         } ));
24     }
27 });