Bug 29407: Make the pickup locations dropdown JS reusable
[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             "aoColumnDefs": [
20                 { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
21             ],
22             "sPaginationType": "full"
23         } ));
24     }
25
26
27 });