diff --git a/application/controllers/api/frontend/v1/LvPlan.php b/application/controllers/api/frontend/v1/LvPlan.php index 2e8ac52d4..69cbeca54 100644 --- a/application/controllers/api/frontend/v1/LvPlan.php +++ b/application/controllers/api/frontend/v1/LvPlan.php @@ -109,7 +109,7 @@ class LvPlan extends FHCAPI_Controller $lvplanEvents = $this->getDataOrTerminateWithError($result); // fetching moodle events - $moodleEvents = $uid ? [] : $this->fetchMoodleEvents($start_date, $end_date); + $moodleEvents = $this->fetchMoodleEvents($start_date, $end_date, $uid); // fetching ferien events $ferienEvents = $this->fetchFerienEvents($start_date, $end_date, $uid); @@ -406,7 +406,7 @@ class LvPlan extends FHCAPI_Controller */ public function compactibleEventTypes() { - $this->terminateWithSuccess(["lehreinheit", "reservierung"]); + $this->terminateWithSuccess(["lehreinheit", "reservierung", "ferien", "moodle"]); } /** @@ -416,7 +416,7 @@ class LvPlan extends FHCAPI_Controller * @param string $end_date * @return array */ - private function fetchMoodleEvents($start_date, $end_date) + private function fetchMoodleEvents($start_date, $end_date, $uid = null) { $this->load->config('calendar'); @@ -439,7 +439,7 @@ class LvPlan extends FHCAPI_Controller [ 'start_date' => $start->format('c'), 'end_date' => $end->format('c'), - 'username' => getAuthUID() + 'username' => $uid ?? getAuthUID() ] ); diff --git a/public/css/Cis4/Cis.css b/public/css/Cis4/Cis.css index bb9655cb9..fd417ed22 100644 --- a/public/css/Cis4/Cis.css +++ b/public/css/Cis4/Cis.css @@ -388,12 +388,6 @@ html { #nav-search > .input-group > * { border-radius: 0 !important; } -#nav-search .searchbar_results { - top: 100% !important; - left: 0; - right: 0 !important; - width: 100% !important; -} /* frame */ .in-frame { @@ -467,7 +461,14 @@ html { /* overflow: visible !important; */ } #cis-header { - z-index: 10; + z-index: 10; + } + #cis-header-bar { + position: fixed; + top: 0; + height: var(--fhc-cis-header-height); + width: 100%; + background-color: var(--fhc-primary); } #cis-header nav { position: initial; @@ -483,12 +484,7 @@ html { display: none; } #nav-logo { - position: fixed; - top: 0; - left: 0; - height: var(--fhc-cis-header-height); width: var(--fhc-cis-menu-width); - background-color: var(--fhc-primary); padding: var(--fhc-cis-header-py) var(--fhc-cis-header-px); z-index: 2; } @@ -503,37 +499,27 @@ html { top: var(--fhc-cis-header-height); display: flex; flex-direction: column; - } - #nav-main-sticky > :not(#nav-main-toggle) { - overflow: auto; + height: 100%; } #nav-main-toggle { - width: 0; z-index: 1; } - #nav-main-toggle .btn, - #nav-main-toggle .fa-arrow-circle-left { + #nav-main-toggle:hover { + background-color: var(--fhc-secondary-highlight); + } + #nav-main-toggle .div, + #nav-main-toggle .fa-chevron-left { transition: all 0.5s ease-in-out; } #nav-main-toggle .collapsed.btn { background-color: transparent !important; } - #nav-main-toggle .collapsed .fa-arrow-circle-left { + #nav-main-toggle .collapsed .fa-chevron-left { transform: scaleX(-1); color: var(--fhc-black-40); } #nav-search { - position: fixed; - top: 0; - left: var(--fhc-cis-menu-width); - height: var(--fhc-cis-header-height); - right: calc(var(--fhc-cis-header-height) + 2 * var(--fhc-cis-header-px) - 2 * var(--fhc-cis-header-py)); - width: auto !important; - } - #nav-user { - position: fixed; - top: 0; - right: 0; + position: relative; } #nav-user-btn { border-width: 0; @@ -568,7 +554,7 @@ html { #nav-main-menu { height: 100%; - background-color: var(--fhc-cis-menu-bg); + background-color: var(--fhc-primary); } #nav-main-menu > div { width: var(--fhc-cis-menu-width); @@ -610,9 +596,6 @@ html { } #nav-user{ position: relative; - } - #nav-user-btn { - } #nav-user-btn img { object-fit: cover; diff --git a/public/js/apps/Cis/Cis.js b/public/js/apps/Cis/Cis.js index 8885eb945..16e1a307b 100644 --- a/public/js/apps/Cis/Cis.js +++ b/public/js/apps/Cis/Cis.js @@ -274,25 +274,12 @@ const app = Vue.createApp({ name: 'CisApp', data: () => ({ appSideMenuEntries: {}, - uid: '', - isStudent: null, - isMitarbeiter: null + windowWidth: 0, }), - components: {}, - computed: { - isMobile() { - const smallScreen = window.matchMedia("(max-width: 767px)").matches; - const touchCapable = ("ontouchstart" in window) || navigator.maxTouchPoints > 0; - return smallScreen;// && touchCapable; - }, - }, provide() { return { // provide injectable & watchable language property language: Vue.computed(() => this.$p.user_language), - isMobile: this.isMobile, - uid: Vue.computed(() => this.uid), - isStudent: Vue.computed(() => this.isStudent), - isMitarbeiter: Vue.computed(() => this.isMitarbeiter) + isMobile: Vue.computed(() => this.windowWidth < 767), } }, methods: { @@ -328,23 +315,21 @@ const app = Vue.createApp({ this.$router.push(route); } - } + }, + handleWindowResize() { + this.windowWidth = window.innerWidth; + }, }, - async created(){ - await this.$api - .call(ApiAuthinfo.getAuthInfo()) - .then(res => { - this.uid = res.data.uid; - this.isMitarbeiter = res.data.isMitarbeiter; - this.isStudent = res.data.isStudent; - }); + created() { + this.windowWidth = window.innerWidth; }, - mounted() { + async mounted() { document.addEventListener('click', this.handleClick); - + window.addEventListener("resize", this.handleWindowResize); }, beforeUnmount() { document.removeEventListener('click', this.handleClick); + window.removeEventListener("resize", this.handleWindowResize); }, }); diff --git a/public/js/apps/Cis/Menu.js b/public/js/apps/Cis/Menu.js index 3193b1e3a..3463dda4a 100644 --- a/public/js/apps/Cis/Menu.js +++ b/public/js/apps/Cis/Menu.js @@ -134,26 +134,27 @@ const app = Vue.createApp({ childactions: [] } } - } + }, + windowWidth: 0, }; }, - computed: { - isMobile() { - const smallScreen = window.matchMedia("(max-width: 767px)").matches; - const touchCapable = ("ontouchstart" in window) || navigator.maxTouchPoints > 0; - return smallScreen;// && touchCapable; - }, - }, provide() { return { - isMobile: this.isMobile, + isNarrow: Vue.computed(() => this.windowWidth < 992), + isMobile: Vue.computed(() => this.windowWidth < 767), } }, methods: { searchfunction: function(searchsettings) { return this.$api.call(ApiSearchbar.searchCis(searchsettings)); - } + }, + handleWindowResize() { + this.windowWidth = window.innerWidth; + }, }, + created() { + this.windowWidth = window.innerWidth; + }, async mounted() { const openOtherLvPlanAction = { label: Vue.computed(() => this.$p.t("lehre/stundenplan")), @@ -183,6 +184,10 @@ const app = Vue.createApp({ openOtherLvPlanAction, ); } + window.addEventListener("resize", this.handleWindowResize); + }, + beforeUnmount() { + window.removeEventListener("resize", this.handleWindowResize); }, }); diff --git a/public/js/components/Calendar/Base/Grid/Line.js b/public/js/components/Calendar/Base/Grid/Line.js index 64a71c5f0..1f266d0a1 100644 --- a/public/js/components/Calendar/Base/Grid/Line.js +++ b/public/js/components/Calendar/Base/Grid/Line.js @@ -147,12 +147,13 @@ export default { :style="'grid-' + axisRow + ': ' + event.rows.join('/')" class="d-flex flex-row justify-content-center gap-1 align-items-center" > - + :style="subEvent.farbe ? {'background-color': '#' + subEvent.farbe} : {}" + style="height:10px; width:10px;" + class="border border-dark rounded-circle" + >
-
- - - - +
+ -
- - -
+ + + + + +
+
+ + + + +