diff --git a/application/views/CisVue/Cms/Content.php b/application/views/CisVue/Cms/Content.php index 2a623568d..f957bb7f9 100644 --- a/application/views/CisVue/Cms/Content.php +++ b/application/views/CisVue/Cms/Content.php @@ -8,13 +8,8 @@ $includesArray = array( ] ); -if(isset($template_kurzbz)){ - switch($template_kurzbz){ - case 'raum_contentmittitel': - $includesArray['tabulator5'] = true; - break; - } -} +// adds the tabulator5 dependency for all templates to replace the tablesorter +$includesArray['tabulator5'] = true; if(defined('CIS4')){ $this->load->view('templates/CISVUE-Header', $includesArray); diff --git a/public/js/components/Cis/Cms/Content.js b/public/js/components/Cis/Cms/Content.js index 53689f162..914b35106 100644 --- a/public/js/components/Cis/Cms/Content.js +++ b/public/js/components/Cis/Cms/Content.js @@ -30,13 +30,11 @@ export default { data() { return { content: null, - }; }, computed:{ computeContentType: function(){ switch(this.content_type){ - case "raum_contentmittitel": return "raum_contentmittitel"; default: @@ -51,12 +49,11 @@ export default { }); }, mounted(){ - + }, template: /*html*/ `

No content is available to display

- `, }; diff --git a/public/js/components/Cis/Cms/Content_types/General.js b/public/js/components/Cis/Cms/Content_types/General.js index 4071d356a..985e9c556 100644 --- a/public/js/components/Cis/Cms/Content_types/General.js +++ b/public/js/components/Cis/Cms/Content_types/General.js @@ -7,6 +7,22 @@ export default { }, }, mounted(){ + + // replaces the tablesorter with the tabulator + let tables = document.getElementsByClassName("tablesorter"); + + for (let table of tables) { + new Tabulator(table, { + layout: "fitDataStretch", + + columnDefaults: { + formatter: "html", + resizable: false, + minWidth: "100px", + } + }) + } + document.querySelectorAll("#cms [data-confirm]").forEach((el) => { el.addEventListener("click", (evt) => { evt.preventDefault(); diff --git a/public/js/components/Cis/Cms/Content_types/Raum_contentmittitel.js b/public/js/components/Cis/Cms/Content_types/Raum_contentmittitel.js index 934b921c0..948fca79f 100644 --- a/public/js/components/Cis/Cms/Content_types/Raum_contentmittitel.js +++ b/public/js/components/Cis/Cms/Content_types/Raum_contentmittitel.js @@ -7,22 +7,20 @@ export default { }, }, mounted(){ - let tables = document.getElementsByClassName("tablesorter"); - - for(let table of tables){ - new Tabulator(table, { - layout:"fitDataStretch", - - columnDefaults:{ - formatter:"html", - resizable:false, - minWidth: "100px", - } - }) + // replaces the tablesorter with the tabulator + let tables = document.getElementsByClassName("tablesorter"); - table.classList.add("mx-auto"); - table.style.width="30em"; - } + for (let table of tables) { + new Tabulator(table, { + layout: "fitDataStretch", + + columnDefaults: { + formatter: "html", + resizable: false, + minWidth: "100px", + } + }) + } }, template: /*html*/ ` diff --git a/public/js/components/Cis/Mylv/LvMenu.js b/public/js/components/Cis/Mylv/LvMenu.js index 868aa6c9e..d5e091f31 100644 --- a/public/js/components/Cis/Mylv/LvMenu.js +++ b/public/js/components/Cis/Mylv/LvMenu.js @@ -37,7 +37,7 @@ export default {