31 lines
1.2 KiB
JavaScript
31 lines
1.2 KiB
JavaScript
// JavaScript imports
|
|
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 = 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 || {};
|
|
}
|