//Prevents resubmit on refresh or back if ( window.history.replaceState ) { window.history.replaceState( null, null, window.location.href ); } //Data Tables Options $('#dt').dataTable( { "aaSorting": [], "order": [], language: { search: '_INPUT_', searchPlaceholder: "Enter search...", sLengthMenu: "_MENU_", sInfo: "records: _START_-_END_ of _TOTAL_", paginate: { previous: '', next: '' } } }); // Call the dataTables jQuery plugin $('#dataTable').DataTable(); $('#dT').dataTable( { "order": [], "columnDefs": [ { "orderable": false, "targets":[""]} ], "orderCellsTop": true, language: { search: "_INPUT_", searchPlaceholder: "Search", sLengthMenu: "_MENU_", sInfo: "_START_-_END_ of _TOTAL_", paginate: { previous: '', next: '' } } }); // Highlight the active nav link on side nav $(function() { var url = window.location.pathname; var filename = url.substr(url.lastIndexOf('/') + 1); $('.navbar-nav a[href$="' + filename + '"]').parent().addClass("active"); }); new EasyMDE({ autoDownloadFontAwesome: false, element: document.getElementById('addClientNote') }); new EasyMDE({ autoDownloadFontAwesome: false, element: document.getElementById('editClientNote') }); $('#selectIt').select2({ theme: 'bootstrap4', dropdownParent: $('#addInvoiceModal') });