Commit a0aa6a56 authored by Kent Nielsen's avatar Kent Nielsen
Browse files

Fixed size for button in calendar. Changes size when going to day view

parent 5152f1dc
Pipeline #52088 passed with stage
in 40 seconds
......@@ -6,14 +6,14 @@
<tr>
<th id="calendarHead" colspan="6">
<div style="display:flex;">
<div style="flex-grow: 25">
<button @click="prevWeek()"> &larr; </button>
<div style="flex-grow: 30;">
<button style="float:right" @click="prevWeek()"> &larr; </button>
</div>
<div style="flex-grow: 50">
<div style="flex-grow: 40">
Uge: {{getWeek(today)}} - {{getMonthName(today.getMonth())}}
</div>
<div style="flex-grow: 25;">
<button @click="nextWeek()"> &rarr; </button>
<div style="flex-grow: 30;">
<button style="float:left" @click="nextWeek()"> &rarr; </button>
</div>
</div>
</th>
......@@ -228,11 +228,21 @@ export default {
const day = this.schedule[this.today.getDay() - 1];
this.scheduleDay[0] = day;
this.schedule = this.scheduleDay;
const buttons = document.getElementsByTagName("button");
for (let i = 0; i < buttons.length; i++) {
const element = buttons[i];
element.style.width = 35 + "px";
}
}
}else{
this.colSpanValue = 1;
this.schedule = this.scheduleWeek12;
this.changeSchedule();
const buttons = document.getElementsByTagName("button");
for (let i = 0; i < buttons.length; i++) {
const element = buttons[i];
element.style.width = 60 + "px";
}
}
this.updateHalfHourSize();
},
......@@ -408,6 +418,10 @@ export default {
div{
margin: 0;
line-height: 28px;
button{
width: 60px;
}
}
}
</style>
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