From 3f605e70513ce5011606f288b456a2036cbdac05 Mon Sep 17 00:00:00 2001 From: SimonGschnell Date: Fri, 21 Mar 2025 11:42:09 +0100 Subject: [PATCH 1/6] feature(Cis Color Themes): makes it possible to change color theme of the application --- .../api/frontend/v1/Stundenplan.php | 6 +- application/libraries/StundenplanLib.php | 4 +- application/views/Cis/Login.php | 3 +- .../anrechnung/requestAnrechnungImportant.php | 6 +- composer.json | 6 +- public/css/Cis4/Cis.css | 245 ++++++++++++---- public/css/Cis4/CisVariables.css | 265 ++++++++++++++++++ public/css/Cis4/CisVariablesCms.css | 14 + public/css/Cis4/Cms.css | 8 +- public/css/Fhc.css | 2 +- public/css/FilterWidget.css | 19 +- public/css/components/FilterComponent.css | 14 +- public/css/components/FormUnderline.css | 6 +- public/css/components/MyLv.css | 6 +- public/css/components/NavigationComponent.css | 27 +- public/css/components/Profil.css | 9 +- public/css/components/Sprachen.css | 8 +- public/css/components/calendar.css | 147 ++++++++-- public/css/components/dashboard.css | 31 +- public/css/components/dashboard/news.css | 24 +- public/css/components/searchbar/searchbar.css | 25 +- public/css/components/searchbar/switches.css | 25 +- public/css/components/verticalsplit.css | 6 +- public/css/lehre/anrechnung.css | 40 --- public/js/components/Calendar/Day/Page.js | 30 +- public/js/components/Calendar/Month/Page.js | 6 +- public/js/components/Calendar/Week/Page.js | 63 ++--- public/js/components/Cis/Cms/Content.js | 4 +- .../Cis/Cms/Content_types/General.js | 32 ++- public/js/components/Cis/Cms/News.js | 2 +- .../StudiengangInformation.js | 5 +- .../StudiengangPerson.js | 8 +- .../StudiengangVertretung.js | 2 +- public/js/components/Cis/DarkTheme.js | 51 ++++ public/js/components/Cis/Menu.js | 31 +- public/js/components/Cis/Mylv/LvInfo.js | 4 +- public/js/components/Cis/Mylv/LvMenu.js | 2 +- .../js/components/Cis/Mylv/RoomInformation.js | 16 +- .../Cis/Mylv/Semester/Studiengang/Lv.js | 8 +- .../Cis/Mylv/Semester/Studiengang/Lv/Info.js | 4 +- .../Cis/Profil/ProfilComponents/Adresse.js | 2 +- .../ProfilComponents/FetchProfilUpdates.js | 4 +- .../Cis/Profil/ProfilComponents/Kontakt.js | 2 +- .../Profil/ProfilComponents/Mailverteiler.js | 4 +- .../Profil/ProfilComponents/ProfilEmails.js | 2 +- .../ProfilComponents/RoleInformation.js | 6 +- .../Cis/ProfilUpdate/ProfilUpdateView.js | 2 +- .../js/components/Cis/Raumsuche/Raumsuche.js | 2 +- public/js/components/Cis/Sprachen.js | 2 +- public/js/components/DashboardWidget/Ampel.js | 2 +- .../components/DashboardWidget/Stundenplan.js | 4 +- public/js/components/DashboardWidget/Url.js | 4 +- public/js/components/searchbar/searchbar.js | 6 +- public/js/helpers/ColorThemeSetting.js | 5 + 54 files changed, 911 insertions(+), 350 deletions(-) create mode 100644 public/css/Cis4/CisVariables.css create mode 100644 public/css/Cis4/CisVariablesCms.css create mode 100644 public/js/components/Cis/DarkTheme.js create mode 100644 public/js/helpers/ColorThemeSetting.js diff --git a/application/controllers/api/frontend/v1/Stundenplan.php b/application/controllers/api/frontend/v1/Stundenplan.php index 84c7933ad..815631d60 100644 --- a/application/controllers/api/frontend/v1/Stundenplan.php +++ b/application/controllers/api/frontend/v1/Stundenplan.php @@ -172,6 +172,7 @@ class Stundenplan extends FHCAPI_Controller */ public function getRoomplan() { + $this->load->library('StundenplanLib'); // form validation $this->load->library('form_validation'); $this->form_validation->set_data($_GET); @@ -188,8 +189,7 @@ class Stundenplan extends FHCAPI_Controller $roomplan_data = $this->StundenplanModel->stundenplanGruppierung($this->StundenplanModel->getRoomQuery($ort_kurzbz, $start_date, $end_date)); $roomplan_data = $this->getDataOrTerminateWithError($roomplan_data); - - $this->expand_object_information($roomplan_data); + $this->stundenplanlib->expand_object_information($roomplan_data); $this->terminateWithSuccess($roomplan_data); @@ -198,6 +198,7 @@ class Stundenplan extends FHCAPI_Controller // gets the reservierungen of a room if the ort_kurzbz parameter is supplied otherwise gets the reservierungen of the stundenplan of a student public function Reservierungen($ort_kurzbz = null) { + $this->load->library('StundenplanLib'); //form validation $this->load->library('form_validation'); $this->form_validation->set_data($_GET); @@ -211,7 +212,6 @@ class Stundenplan extends FHCAPI_Controller $start_date = $this->input->get('start_date', TRUE); $end_date = $this->input->get('end_date', TRUE); - $this->load->library('StundenplanLib'); $result = $this->stundenplanlib->getReservierungen($start_date,$end_date,$ort_kurzbz); $result = $this->getDataOrTerminateWithError($result); $this->terminateWithSuccess($result); diff --git a/application/libraries/StundenplanLib.php b/application/libraries/StundenplanLib.php index 5a741e10c..e0691ecab 100644 --- a/application/libraries/StundenplanLib.php +++ b/application/libraries/StundenplanLib.php @@ -144,8 +144,8 @@ class StundenplanLib{ } - private function expand_object_information($data){ - + public function expand_object_information($data){ + $this->_ci =& get_instance(); foreach ($data as $item) { diff --git a/application/views/Cis/Login.php b/application/views/Cis/Login.php index 68490e67e..90f78f123 100644 --- a/application/views/Cis/Login.php +++ b/application/views/Cis/Login.php @@ -2,7 +2,8 @@ $includesArray = array( 'title' => 'FH-Complete', 'bootstrap5' => true, - 'fontawesome6' => true + 'fontawesome6' => true, + 'customJSs' => 'public/js/helpers/ColorThemeSetting.js' ); $this->load->view('templates/FHC-Header', $includesArray); diff --git a/application/views/lehre/anrechnung/requestAnrechnungImportant.php b/application/views/lehre/anrechnung/requestAnrechnungImportant.php index 0ee13d422..d224a52dd 100644 --- a/application/views/lehre/anrechnung/requestAnrechnungImportant.php +++ b/application/views/lehre/anrechnung/requestAnrechnungImportant.php @@ -4,8 +4,8 @@

-
+
p->t('anrechnung', 'requestAnrechnungInfoFristenTitle'); ?> @@ -22,8 +22,8 @@

-