diff --git a/config/importmap.rb b/config/importmap.rb --- a/config/importmap.rb +++ b/config/importmap.rb @@ -3,56 +3,25 @@ #entry point pin "application" pin "prepend_jquery" -pin "datatable_late" +pin "my_sprocket" pin_all_from "app/javascript/controllers", under: "controllers" -pin "jquery", to: 'jquery.js' -pin "bootstrap", to: "bootstrap.bundle.min.js" +pin "jquery", to: 'jquery.js', preload: true +pin "bootstrap", to: "bootstrap.bundle.min.js", preload: true #no need popper, because bundled already in bootstrap #pin "@popperjs/core", to: "https://ga.jspm.io/npm:@popperjs/core@2.11.6/lib/index.js" +# datatable +# I have to fix vfs_font.js for this to work pin "jszip", to: "jszip.min.js" pin "pdfmake" - -#pin "", to: "JSZip-2.5.0/jszip.min.js" -#pin "", to: "pdfmake-0.1.36/pdfmake.min.js" -#pin "", to: "pdfmake-0.1.36/vfs_fonts.js" - -## pin "datatables", to: "datatables/DataTables-1.12.1/js/jquery.dataTables.min.js" -## pin "datatables-bs5", to: "datatables/DataTables-1.12.1/js/dataTables.bootstrap5.min.js" -## pin "datatables-editor", to: "datatables/Editor-2.0.9/js/dataTables.editor.min.js" -## pin "datatables-editor-bs5", to: "datatables/Editor-2.0.9/js/editor.bootstrap5.min.js" -## pin "datatables-autofill", to: "datatables/AutoFill-2.4.0/js/dataTables.autoFill.min.js" -## pin "datatables-autofill-bs5", to: "datatables/AutoFill-2.4.0/js/autoFill.bootstrap5.min.js" -## pin "datatables-button", to: "datatables/Buttons-2.2.3/js/dataTables.buttons.min.js" -## pin "datatables-button-bs5", to: "datatables/Buttons-2.2.3/js/buttons.bootstrap5.min.js" -## pin "datatables-button-colvis", to: "datatables/Buttons-2.2.3/js/buttons.colVis.min.js" -## pin "datatables-button-html5", to: "datatables/Buttons-2.2.3/js/buttons.html5.min.js" -## pin "datatables-button-print", to: "datatables/Buttons-2.2.3/js/buttons.print.min.js" -## pin "datatables-colrecorder", to: "datatables/ColReorder-1.5.6/js/dataTables.colReorder.min.js" -## pin "datatables-datetime", to: "datatables/DateTime-1.1.2/js/dataTables.dateTime.min.js" -## pin "datatables-fixedcolumns", to: "datatables/FixedColumns-4.1.0/js/dataTables.fixedColumns.min.js" -## pin "datatables-fixedheader", to: "datatables/FixedHeader-3.2.4/js/dataTables.fixedHeader.min.js" -## pin "datatables-keytable", to: "datatables/KeyTable-2.7.0/js/dataTables.keyTable.min.js" -## pin "datatables-responsive", to: "datatables/Responsive-2.3.0/js/dataTables.responsive.min.js" -## pin "datatables-responsive-bs5", to: "datatables/Responsive-2.3.0/js/responsive.bootstrap5.js" -## pin "datatables-rowgroup", to: "datatables/RowGroup-1.2.0/js/dataTables.rowGroup.min.js" -## pin "datatables-rowreorder", to: "datatables/RowReorder-1.2.8/js/dataTables.rowReorder.min.js" -## pin "datatables-scroller", to: "datatables/Scroller-2.0.7/js/dataTables.scroller.min.js" -## pin "datatables-searchbuilder", to: "datatables/SearchBuilder-1.3.4/js/dataTables.searchBuilder.min.js" -## pin "datatables-searchbuilder-bs5", to: "datatables/SearchBuilder-1.3.4/js/searchBuilder.bootstrap5.min.js" -## pin "datatables-searchpanes", to: "datatables/SearchPanes-2.0.2/js/dataTables.searchPanes.min.js" -## pin "datatables-searchpanes-bs5", to: "datatables/SearchPanes-2.0.2/js/searchPanes.bootstrap5.min.js" -## pin "datatables-select", to: "datatables/Select-1.4.0/js/dataTables.select.min.js" -## pin "datatables-staterestore", to: "datatables/StateRestore-1.1.1/js/dataTables.stateRestore.min.js" -## pin "datatables-staterestore-bs5", to: "datatables/StateRestore-1.1.1/js/stateRestore.bootstrap5.min.js" +pin "pdfmake-vfs", to: 'datatables/pdfmake-0.1.36/vfs_fonts.js' pin "datatables-bundle", to: 'datatables/datatables.js' -pin "pdfmake-vfs", to: 'datatables/pdfmake-0.1.36/vfs_fonts.js' pin "datatables", to: "datatables/DataTables-1.12.1/js/jquery.dataTables.js" pin "datatables-bs5", to: "datatables/DataTables-1.12.1/js/dataTables.bootstrap5.js" pin "datatables-editor", to: "datatables/Editor-2.0.9/js/dataTables.editor.js" -pin "datatables-editor-bs5", to: "datatables/Editor-2.0.9/js/editor.bootstrap5.js" +pin "datatables-editor-bs5", to: "datatables/Editor-2.0.9/js/editor.bootstrap5.min.js" pin "datatables-autofill", to: "datatables/AutoFill-2.4.0/js/dataTables.autoFill.js" pin "datatables-autofill-bs5", to: "datatables/AutoFill-2.4.0/js/autoFill.bootstrap5.js" pin "datatables-button", to: "datatables/Buttons-2.2.3/js/dataTables.buttons.js" @@ -77,3 +46,11 @@ pin "datatables-select", to: "datatables/Select-1.4.0/js/dataTables.select.js" pin "datatables-staterestore", to: "datatables/StateRestore-1.1.1/js/dataTables.stateRestore.js" pin "datatables-staterestore-bs5", to: "datatables/StateRestore-1.1.1/js/stateRestore.bootstrap5.js" + +#select2 +pin "select2", to: "select2.min.js" + +#my local js +pin "custom", to: "custom.js" + +#pin "ace-rails-ap"