From b14d352140a5b3ad16b3980a52e50e870ee9fed6 Mon Sep 17 00:00:00 2001 From: "Wonko T. Sane" <42@wonko.de> Date: Fri, 21 Dec 2018 16:18:47 +0100 Subject: [PATCH] Fix for #526 Implementation idea stolen from http://jsfiddle.net/6K7t4/24/ --- includes/view/ShiftCalendarShiftRenderer.php | 35 ++++++++++---------- resources/assets/themes/base.less | 16 +++++++-- 2 files changed, 32 insertions(+), 19 deletions(-) diff --git a/includes/view/ShiftCalendarShiftRenderer.php b/includes/view/ShiftCalendarShiftRenderer.php index 1414c351..c0a9f877 100644 --- a/includes/view/ShiftCalendarShiftRenderer.php +++ b/includes/view/ShiftCalendarShiftRenderer.php @@ -38,24 +38,25 @@ class ShiftCalendarShiftRenderer return [ $blocks, - div( - 'shift panel panel-' . $class . '" ' - . 'style="height: ' + div( 'shift-card "style="height: ' . ($blocks * ShiftCalendarRenderer::BLOCK_HEIGHT - ShiftCalendarRenderer::MARGIN) - . 'px"', - [ - $this->renderShiftHead($shift, $class), - div('panel-body', [ - $info_text, - Room_name_render([ - 'RID' => $shift['RID'], - 'Name' => $shift['room_name'] - ]) - ]), - $shifts_row, - div('shift-spacer') - ] - ) + . 'px;}"', + div( + 'shift panel panel-' . $class. '" style="position: absolute; width:99%;', + [ + $this->renderShiftHead($shift, $class), + div('panel-body', [ + $info_text, + Room_name_render([ + 'RID' => $shift['RID'], + 'Name' => $shift['room_name'] + ]) + ]), + $shifts_row, + div('shift-spacer') + ] + ) + ) ]; } diff --git a/resources/assets/themes/base.less b/resources/assets/themes/base.less index b44602f0..0bf752ab 100644 --- a/resources/assets/themes/base.less +++ b/resources/assets/themes/base.less @@ -189,10 +189,22 @@ table a > .icon-icon_angel { width: 50px; flex-shrink: 0; } - + .shift-card { + z-index:0; + overflow:hidden; + position:relative; + } + .shift-card:hover { + overflow:visible; + z-index:100; + } + .shift-card:hover .shift { + z-index:100; + } .shift { margin: 0 5px 5px 0; - overflow: hidden; + position: absolute; + width: 99%; } }