- Changes to the list views - now using tabulator with filtering and sorting, client-side pagination, ...
- Adaptation of all list views in the app
This commit is contained in:
@@ -43,8 +43,28 @@ import 'select2';
|
||||
import { createJSONEditor } from 'vanilla-jsoneditor';
|
||||
window.createJSONEditor = createJSONEditor;
|
||||
|
||||
// Importeer Tabulator en maak deze globaal beschikbaar
|
||||
import { TabulatorFull } from 'tabulator-tables';
|
||||
window.Tabulator = TabulatorFull;
|
||||
|
||||
import './tabulator-setup.js';
|
||||
|
||||
// Importeer extra tabulator setup script
|
||||
import '../../../eveai_app/static/assets/js/eveai-tabulator-setup.js';
|
||||
|
||||
// Controleer of alle benodigde Tabulator modules correct zijn geladen
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
if (typeof window.Tabulator === 'function') {
|
||||
console.log(`Tabulator versie: ${window.Tabulator.version || 'onbekend'}`);
|
||||
|
||||
// Zorg ervoor dat benodigde modules beschikbaar zijn
|
||||
window.Tabulator.modules = window.Tabulator.modules || {};
|
||||
window.Tabulator.modules.format = window.Tabulator.modules.format || { formatters: {} };
|
||||
window.Tabulator.modules.sort = window.Tabulator.modules.sort || { sorters: {} };
|
||||
window.Tabulator.modules.filter = window.Tabulator.modules.filter || { filters: {} };
|
||||
}
|
||||
});
|
||||
|
||||
import { createApp } from 'vue';
|
||||
window.Vue = { createApp };
|
||||
|
||||
|
||||
@@ -1,5 +1,30 @@
|
||||
// JavaScript imports
|
||||
import { TabulatorFull as Tabulator } from 'tabulator-tables';
|
||||
import { TabulatorFull } from 'tabulator-tables';
|
||||
/**
|
||||
* Basis Tabulator Setup
|
||||
* Dit bestand bevat configuratie voor Tabulator tabellen
|
||||
*/
|
||||
|
||||
// Algemene instellingen voor Tabulator
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
if (typeof TabulatorFull === 'function') {
|
||||
console.log('Tabulator bibliotheek is geladen en geconfigureerd');
|
||||
} else {
|
||||
console.error('Tabulator bibliotheek is niet beschikbaar');
|
||||
}
|
||||
});
|
||||
// Maak Tabulator globaal beschikbaar
|
||||
window.Tabulator = Tabulator;
|
||||
window.Tabulator = TabulatorFull;
|
||||
|
||||
// Zorg ervoor dat de formattermodule correct is geregistreerd
|
||||
if (typeof TabulatorFull.prototype.moduleRegistered !== 'function' ||
|
||||
!TabulatorFull.prototype.moduleRegistered('format')) {
|
||||
console.warn('Format module niet gevonden in Tabulator, wordt toegevoegd');
|
||||
// Basismodule definiëren indien niet aanwezig
|
||||
TabulatorFull.prototype.moduleRegistered = function(name) {
|
||||
return this.modules && this.modules[name];
|
||||
};
|
||||
TabulatorFull.modules = TabulatorFull.modules || {};
|
||||
TabulatorFull.modules.format = TabulatorFull.modules.format || {};
|
||||
TabulatorFull.modules.format.formatters = TabulatorFull.modules.format.formatters || {};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user