Commit 48590c6d authored by Kent Nielsen's avatar Kent Nielsen
Browse files

Removed inline style and fix day change in day view

parent c721cb59
Pipeline #52353 passed with stage
in 42 seconds
......@@ -5,14 +5,14 @@
<!-- Generating first header of schema -->
<tr>
<th id="calendarHead" colspan="6">
<div style="display:flex;">
<div style="flex-grow: 30;">
<div id="headerDiv">
<div>
<button id="leftButton" @click="prevWeek()"> &larr; </button>
</div>
<div style="flex-grow: 40">
<div>
Uge: {{getWeek(today)}} - {{getMonthName(today.getMonth())}}
</div>
<div style="flex-grow: 30;">
<div>
<button id="rightButton" @click="nextWeek()"> &rarr; </button>
</div>
</div>
......@@ -147,6 +147,7 @@ export default {
const currentMonth = this.today.getMonth();
const dayToMoveCalendarBackTo = this.today.getDate() - this.daysToAdd(false);
this.today = new Date(currentYear, currentMonth, dayToMoveCalendarBackTo);
this.changeSchedule();
this.updateDaysInDisplay();
},
......@@ -156,6 +157,7 @@ export default {
const currentMonth = this.today.getMonth();
const dayToMoveCalendarForwardTo = this.today.getDate() + this.daysToAdd(true);
this.today = new Date(currentYear, currentMonth, dayToMoveCalendarForwardTo);
this.changeSchedule();
this.updateDaysInDisplay();
},
......@@ -240,7 +242,7 @@ export default {
this.changeSchedule();
const buttons = document.getElementsByTagName("button");
for (let i = 0; i < buttons.length; i++) {
const element = buttons[i];
const element = buttons[i];
element.style.width = 60 + "px";
}
}
......@@ -399,6 +401,20 @@ export default {
margin-left: $default-margin;
}
#headerDiv{
display: flex;
div{
flex-grow: 20;
}
div+div{
&:not(:last-of-type){
flex-grow: 60;
}
}
}
#skematd{
position: relative;
vertical-align: top;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment