app/assets/javascripts/wco/application.js in wco_models-3.1.0.65 vs app/assets/javascripts/wco/application.js in wco_models-3.1.0.66

- old
+ new

@@ -20,9 +20,30 @@ //= require ./shared // $(function() { + +if ('function' === typeof $('body').DataTable) { + const _props = { + dom: 'lpftrip', + lengthChange: true, + lengthMenu: [[10, 25, 100, -1], [10, 25, 100, 'All']], + pageLength: -1, + aoColumnDefs: [ { + bSortable: false, + aTargets: [ "nosort" ], + } ], + order: [ 4, 'desc' ], + } + $('.data-table').DataTable(_props) +} + +if ('function' === typeof $('body').datepicker) { + $(".datepicker").datepicker({ dateFormat: 'yy-mm-dd' }) +} + + if (!!$('body').select2) { $('.select2').each(function() { $( this ).select2({ width: '100%', })