diff --git a/application/views/Cis/Documents.php b/application/views/Cis/Documents.php index fa491fa11..fcafff57c 100644 --- a/application/views/Cis/Documents.php +++ b/application/views/Cis/Documents.php @@ -1,9 +1,9 @@ 'Documents', 'tabulator5' => true, - 'fhcApps' => ['Cis/Documents'] -); + 'customJSModules' => ['public/js/apps/Cis/Documents.js'] +)); $this->load->view('templates/CISVUE-Header', $includesArray); ?> diff --git a/application/views/Cis/ProfilUpdate.php b/application/views/Cis/ProfilUpdate.php index 525d261a7..2295a753f 100644 --- a/application/views/Cis/ProfilUpdate.php +++ b/application/views/Cis/ProfilUpdate.php @@ -1,18 +1,18 @@ 'Profil Änderungen', 'vue3' => true, 'bootstrap5' => true, 'fontawesome6'=> true, 'axios027' => true, 'tabulator5' => true, - 'fhcApps' => array( - 'Cis/ProfilUpdateRequests' + 'customJSModules' => array( + 'public/js/apps/Cis/ProfilUpdateRequests.js' ), 'customCSSs' => array( 'public/css/components/FilterComponent.css','public/css/components/FormUnderline.css' ) -); +)); if(defined("CIS4")) { diff --git a/application/views/CisRouterView/CisRouterView.php b/application/views/CisRouterView/CisRouterView.php index ab22fbb81..42e49e38b 100644 --- a/application/views/CisRouterView/CisRouterView.php +++ b/application/views/CisRouterView/CisRouterView.php @@ -1,6 +1,6 @@ 'Cis4', 'axios027' => true, 'bootstrap5' => true, @@ -36,7 +36,7 @@ $includesArray = array( 'public/js/apps/Dashboard/Fhc.js' ), -); +)); $this->load->view('templates/CISVUE-Header', $includesArray); ?> diff --git a/application/views/LVVerwaltung.php b/application/views/LVVerwaltung.php index 5c4c9549e..d2856ad3e 100644 --- a/application/views/LVVerwaltung.php +++ b/application/views/LVVerwaltung.php @@ -1,5 +1,5 @@ 'LVVerwaltung', 'axios027' => true, 'bootstrap5' => true, @@ -17,10 +17,10 @@ 'public/css/Lvverwaltung.css' ], - 'fhcApps' => [ - 'LVVerwaltung' + 'customJSModules' => [ + 'public/js/apps/LVVerwaltung.js' ] - ); + )); $this->load->view('templates/FHC-Header', $includesArray); diff --git a/application/views/Studentenverwaltung.php b/application/views/Studentenverwaltung.php index aa4891e9a..fb0913806 100644 --- a/application/views/Studentenverwaltung.php +++ b/application/views/Studentenverwaltung.php @@ -1,5 +1,5 @@ 'Studentenverwaltung', 'axios027' => true, 'bootstrap5' => true, @@ -26,10 +26,10 @@ #'vendor/npm-asset/primevue/tree/tree.min.js', #'vendor/npm-asset/primevue/toast/toast.min.js' ], - 'fhcApps' => [ - 'Studentenverwaltung' + 'customJSModules' => [ + 'public/js/apps/Studentenverwaltung.js' ] - ); + )); $this->load->view('templates/FHC-Header', $includesArray); ?> diff --git a/application/views/codex/bismeldestichtag.php b/application/views/codex/bismeldestichtag.php index 2f024d25e..fc0311674 100644 --- a/application/views/codex/bismeldestichtag.php +++ b/application/views/codex/bismeldestichtag.php @@ -1,5 +1,5 @@ 'Bismeldestichtage', 'axios027' => true, 'bootstrap5' => true, @@ -10,8 +10,8 @@ 'tabulator5' => true, 'customCSSs' => array('vendor/vuejs/vuedatepicker_css/main.css'), 'customJSs' => array('vendor/vuejs/vuedatepicker_js/vue-datepicker.iife.js'), - 'fhcApps' => array('Bismeldestichtag/Bismeldestichtag') - ); + 'customJSModules' => array('public/js/apps/Bismeldestichtag/Bismeldestichtag.js') + )); $this->load->view('templates/FHC-Header', $includesArray); ?> diff --git a/application/views/lehre/Antrag/Create.php b/application/views/lehre/Antrag/Create.php index 36a39078f..56d1e0a28 100644 --- a/application/views/lehre/Antrag/Create.php +++ b/application/views/lehre/Antrag/Create.php @@ -1,5 +1,5 @@ 'Antrag auf Änderung des Studierendenstatus', 'cis' => true, 'vue3' => true, @@ -8,7 +8,7 @@ $sitesettings = array( 'fontawesome6' => true, 'phrases' => array( ), - 'fhcApps' => array('lehre/Antrag'), + 'customJSModules' => array('public/js/apps/lehre/Antrag.js'), 'customCSSs' => array( 'public/css/Fhc.css', 'public/css/components/primevue.css', @@ -16,7 +16,7 @@ $sitesettings = array( ), 'customJSs' => array( ) -); +)); if(defined('CIS4')){ $this->load->view( diff --git a/application/views/lehre/Antrag/Leitung/List.php b/application/views/lehre/Antrag/Leitung/List.php index b1ba44a4c..f6c95bc86 100644 --- a/application/views/lehre/Antrag/Leitung/List.php +++ b/application/views/lehre/Antrag/Leitung/List.php @@ -2,7 +2,7 @@ use \DateTime as DateTime; -$sitesettings = array( +$sitesettings = extendableApps(array( 'title' => 'Anträge auf Änderung des Studierendenstatus', 'cis' => true, 'vue3' => true, @@ -18,14 +18,14 @@ $sitesettings = array( 'lehre', 'person', ), - 'fhcApps' => array('lehre/Antrag/Leitung'), + 'customJSModules' => array('public/js/apps/lehre/Antrag/Leitung.js'), 'customCSSs' => array( 'public/css/Fhc.css', 'public/css/components/primevue.css', ), 'customJSs' => array( ) -); +)); $this->load->view( 'templates/FHC-Header', diff --git a/application/views/lehre/Antrag/Student/List.php b/application/views/lehre/Antrag/Student/List.php index 9454e2006..1b467e576 100644 --- a/application/views/lehre/Antrag/Student/List.php +++ b/application/views/lehre/Antrag/Student/List.php @@ -1,5 +1,5 @@ 'Antrag auf Änderung des Studierendenstatus', 'cis' => true, 'vue3' => true, @@ -8,14 +8,14 @@ $sitesettings = array( 'fontawesome6' => true, 'phrases' => array( ), - 'fhcApps' => array('lehre/Antrag/Student'), + 'customJSModules' => array('public/js/apps/lehre/Antrag/Student.js'), 'customCSSs' => array( 'public/css/Fhc.css', 'public/css/components/primevue.css', ), 'customJSs' => array( ) -); +)); if(defined('CIS4')){ $this->load->view( diff --git a/application/views/lehre/Antrag/Wiederholung/Student.php b/application/views/lehre/Antrag/Wiederholung/Student.php index 73405fc0a..65707cc7b 100644 --- a/application/views/lehre/Antrag/Wiederholung/Student.php +++ b/application/views/lehre/Antrag/Wiederholung/Student.php @@ -1,5 +1,5 @@ 'Antrag Wiederholung vom Studium', 'cis' => true, 'vue3' => true, @@ -12,14 +12,14 @@ $sitesettings = array( 'lehre', 'global' ), - 'fhcApps' => array('lehre/Antrag/Lvzuweisung'), + 'customJSModules' => array('public/js/apps/lehre/Antrag/Lvzuweisung.js'), 'customCSSs' => array( 'public/css/Fhc.css', 'public/css/components/primevue.css', ), 'customJSs' => array( ) -); +)); $this->load->view( 'templates/FHC-Header', diff --git a/application/views/lehre/lvplanung/lvTemplateUebersicht.php b/application/views/lehre/lvplanung/lvTemplateUebersicht.php index 1d5a2e777..8e47677f0 100644 --- a/application/views/lehre/lvplanung/lvTemplateUebersicht.php +++ b/application/views/lehre/lvplanung/lvTemplateUebersicht.php @@ -1,5 +1,5 @@ 'LV Template Übersicht', 'vue3' => true, 'axios027' => true, @@ -9,12 +9,12 @@ $includesArray = array( 'primevue3' => true, 'navigationcomponent' => true, 'filtercomponent' => true, - 'fhcApps' => array('lehre/lvplanung/LvTemplates'), + 'customJSModules' => array('public/js/apps/lehre/lvplanung/LvTemplates.js'), 'customCSSs' => array( 'public/css/Fhc.css', 'public/css/lvTemplateUebersicht.css' ) -); +)); $this->load->view('templates/FHC-Header', $includesArray); ?> diff --git a/application/views/system/logs/logsViewer.php b/application/views/system/logs/logsViewer.php index 60d9075d0..1d6b50394 100644 --- a/application/views/system/logs/logsViewer.php +++ b/application/views/system/logs/logsViewer.php @@ -1,5 +1,5 @@ 'Logs Viewer', 'axios027' => true, 'bootstrap5' => true, @@ -13,8 +13,8 @@ 'global' => array('mailAnXversandt'), 'ui' => array('bitteEintragWaehlen') ), - 'fhcApps' => array('LogsViewer/LogsViewer'), - ); + 'customJSModules' => array('public/js/apps/LogsViewer/LogsViewer.js'), + )); $this->load->view('templates/FHC-Header', $includesArray); ?> diff --git a/application/views/templates/CISVUE-Footer.php b/application/views/templates/CISVUE-Footer.php index 48943650d..d7c1de24c 100644 --- a/application/views/templates/CISVUE-Footer.php +++ b/application/views/templates/CISVUE-Footer.php @@ -5,9 +5,9 @@ $includesArray = array( 'bootstrap5' => true, 'fontawesome6' => true, 'axios027' => true, - 'fhcApps' => array_merge([ - 'Cis' - ], $fhcApps ?? []), + 'customJSModules' => array_merge([ + 'public/js/apps/Cis.js' + ], $customJSModules ?? []), 'customCSSs' => array_merge([ 'public/css/Cis4/Cis.css' ], $customCSSs ?? []) diff --git a/application/views/templates/CISVUE-Header.php b/application/views/templates/CISVUE-Header.php index 943d26d80..358fc75c9 100644 --- a/application/views/templates/CISVUE-Header.php +++ b/application/views/templates/CISVUE-Header.php @@ -7,9 +7,9 @@ $includesArray = array( 'fontawesome6' => true, 'axios027' => true, 'primevue3' => true, - 'fhcApps' => array_merge([ - 'Cis' - ], $fhcApps ?? []), + 'customJSModules' => array_merge([ + 'public/js/apps/Cis.js' + ], $customJSModules ?? []), 'customCSSs' => array_merge([ 'public/css/Cis4/Cis.css', $this->config->item('theme_css'), diff --git a/application/views/templates/FHC-Common.php b/application/views/templates/FHC-Common.php index 955583500..71f9c46c4 100644 --- a/application/views/templates/FHC-Common.php +++ b/application/views/templates/FHC-Common.php @@ -48,60 +48,3 @@ $udfs = isset($udfs) ? $udfs : false; $widgets = isset($widgets) ? $widgets : false; $tags = isset($tags) ? $tags : false; - -// VueJs App magic -if (isset($fhcApps)) { - if (!isset($customJSs)) - $customJSs = ['public/js/FhcApps.js']; - elseif (!is_array($customJSs)) - $customJSs = [$customJSs, 'public/js/FhcApps.js']; - else - array_push($customJSs, 'public/js/FhcApps.js'); - - if (!isset($customJSModules)) - $customJSModules = []; - elseif (!is_array($customJSModules)) - $customJSModules = [$customJSModules]; - - if (!isset($customCSSs)) - $customCSSs = []; - elseif (!is_array($customCSSs)) - $customCSSs = [$customCSSs]; - - $ext_path = 'public/extensions/'; - $ext_realpath = str_replace('/', DIRECTORY_SEPARATOR, $ext_path); - - foreach ($fhcApps as $app) { - if (!strstr($app, ':')) { - $app_js_path = 'public/js/apps/' . $app . '.js'; - $app_css_path = 'public/css/apps/' . $app . '.css'; - $app_js_ext_path = '/js/extend_app/' . $app . '.js'; - $app_css_ext_path = '/css/extend_app/' . $app . '.css'; - } else { - list($ext_name, $app_path) = explode(':', $app); - $app_js_path = 'public/extensions/' . $ext_name . '/js/apps/' . $app_path . '.js'; - $app_css_path = 'public/extensions/' . $ext_name . '/css/apps/' . $app_path . '.css'; - $app_js_ext_path = '/js/extend_app/extensions/' . $ext_name . '/' . $app_path . '.js'; - $app_css_ext_path = '/css/extend_app/extensions/' . $ext_name . '/' . $app_path . '.css'; - } - - if (file_exists(FHCPATH . str_replace('/', DIRECTORY_SEPARATOR, $app_css_path))) - array_push($customCSSs, $app_css_path); - - foreach (scandir(FHCPATH . $ext_realpath) as $extension_name) { - if ($extension_name[0] == '.') - continue; - - $app_js_ext_realpath = str_replace('/', DIRECTORY_SEPARATOR, $app_js_ext_path); - if (file_exists(FHCPATH . $ext_realpath . $extension_name . $app_js_ext_realpath)) { - array_push($customJSModules, $ext_path . $extension_name . $app_js_ext_path); - } - $app_css_ext_realpath = str_replace('/', DIRECTORY_SEPARATOR, $app_css_ext_path); - if (file_exists(FHCPATH . $ext_realpath . $extension_name . $app_css_ext_realpath)) { - array_push($customCSSs, $ext_path . $extension_name . $app_css_ext_path); - } - } - - array_push($customJSModules, $app_js_path); - } -}