Fixed server calendar needing scrollbar

This commit is contained in:
Rsl1122 2019-09-21 15:15:07 +03:00
parent dd6f2a1e30
commit 46a74d2297
2 changed files with 9 additions and 12 deletions

View File

@ -146,8 +146,8 @@ function onlineActivityCalendar(id, events, firstDay) {
events: events,
height: 490,
contentHeight: 485,
height: 800,
contentHeight: 795,
header: {
left: 'title',
center: '',

View File

@ -352,13 +352,13 @@
<div aria-labelledby="online-calendar-tab" class="tab-pane fade" id="calendar-tab"
role="tabpanel">
<div class="row">
<div class="col-lg-2 col-sm" style="height: 0;"></div>
<div class="col-lg-8 col-sm-12" style="height: 550px;">
<div class="col-lg-1 col-sm" style="height: 0;"></div>
<div class="col-lg-10 col-sm-12" style="height: 850px;">
<div class="chart-area" id="calendar">
<span class="loader"></span>
</div>
</div>
<div class="col-lg-2 col-sm" style="height: 0;"></div>
<div class="col-lg-1 col-sm" style="height: 0;"></div>
</div>
</div>
<div aria-labelledby="online-punchcard-tab" class="tab-pane fade" id="punchcard-tab"
@ -1555,14 +1555,11 @@
jsonRequest("../v1/graph?type=serverCalendar&server=${serverName}", function (json, error) {
if (json) {
var clicked = false;
$('#online-calendar-tab').click(function () {
if (!clicked) {
onlineActivityCalendar('#calendar', json.data, json.firstDay);
clicked = true;
}
});
$('#calendar').text('');
onlineActivityCalendar('#calendar', json.data, json.firstDay);
$('#online-calendar-tab').click(function () {
$('#calendar').fullCalendar('render');
});
} else if (error) {
$('#calendar').text("Failed to load calendar data: " + error)
}