From 429be8d594644d8a9aec9163f5d31c05ad93f444 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 2 Feb 2016 09:19:31 +0000 Subject: [PATCH] temporary reverting r54893: Multi-line ellipsis on event bodies that are longer than their space can show --- calendar/js/et2_widget_daycol.js | 1 - calendar/js/et2_widget_event.js | 27 ++++----------------------- calendar/templates/default/app.css | 16 +--------------- calendar/templates/pixelegg/app.css | 18 ++---------------- 4 files changed, 7 insertions(+), 55 deletions(-) diff --git a/calendar/js/et2_widget_daycol.js b/calendar/js/et2_widget_daycol.js index 267587250f..15cb36f506 100644 --- a/calendar/js/et2_widget_daycol.js +++ b/calendar/js/et2_widget_daycol.js @@ -76,7 +76,6 @@ var et2_calendar_daycol = et2_valueWidget.extend([et2_IDetachedDOM, et2_IResizea .addClass("calendar_calDayColAllDay") .appendTo(this.header); this.event_wrapper = $j(document.createElement('div')) - .addClass("event_wrapper") .appendTo(this.div); this.setDOMNode(this.div[0]); diff --git a/calendar/js/et2_widget_event.js b/calendar/js/et2_widget_event.js index 94853343a1..a2ff87846f 100644 --- a/calendar/js/et2_widget_event.js +++ b/calendar/js/et2_widget_event.js @@ -343,12 +343,8 @@ var et2_calendar_event = et2_valueWidget.extend([et2_IDetachedDOM], this.body .html(''+title+'') - .append(''+start_time + ''); - if(this.options.value.description.trim()) - { - this.body - .append('

'+this.options.value.description+'

'); - } + .append(''+start_time + '') + .append('

'+this.options.value.description+'

'); } }, @@ -362,34 +358,19 @@ var et2_calendar_event = et2_valueWidget.extend([et2_IDetachedDOM], * > 4 - Show description as well, truncated to fit */ _small_size: function() { - // Pre-calculation reset this.div.removeClass('calendar_calEventSmall'); - this.body.css('height', 'auto'); - if(this.options.value.whole_day_on_top) return; - var line_height = parseFloat(this.div.css('line-height')); - var visible_lines = Math.floor(this.div.innerHeight() / line_height); + var visible_lines = Math.floor(this.div.innerHeight() / this.title.height()); if(!this.title.height()) { // Handle sizing while hidden, such as when calendar is not the active tab visible_lines = Math.floor(egw.getHiddenDimensions(this.div).h / egw.getHiddenDimensions(this.title).h); } - visible_lines = Math.max(1,visible_lines); this.div.toggleClass('calendar_calEventSmall',visible_lines < 4); this.div - .attr('data-visible_lines', visible_lines); - - - if(this.body.height() > this.div.height() - this.title.height() && visible_lines >= 4) - { - this.body.css('height', Math.floor((visible_lines-1)*line_height - this.title.height()) + 'px'); - } - else - { - this.body.css('height', ''); - } + .attr('data-visible_lines', visible_lines < 4 ? Math.max(1,visible_lines) : ''); }, /** diff --git a/calendar/templates/default/app.css b/calendar/templates/default/app.css index 54f2aa36c2..f4d6298ea8 100644 --- a/calendar/templates/default/app.css +++ b/calendar/templates/default/app.css @@ -556,20 +556,6 @@ Hide subsequent headers in week view with non-consolidated owners cursor: pointer; } -/** Multi-line ellipsis */ -.calendar_calEvent .calendar_calEventBody { - overflow: hidden; -} -.calendar_calTimeGrid:not(.calendar_calTimeGridList) .calendar_calEvent::after { - width: 100%; - background-color: rgba(255,255,255,0.9); - height: 0.9em; - content: "\02026"; - left: 0px; - float: right; - padding-bottom: 2em; - text-indent: 5px; -} /** * User has not accepted the invitation */ @@ -759,7 +745,7 @@ Hide subsequent headers in week view with non-consolidated owners .calendar_calTimeGridList .calendar_calDayColHeader > div[data-date] { border: none; } -.calendar_calTimeGridList .calendar_calDayCol > div.event_wrapper +.calendar_calTimeGridList .calendar_calDayCol > div:first-child { position: absolute; top: 0px; diff --git a/calendar/templates/pixelegg/app.css b/calendar/templates/pixelegg/app.css index d4d9bf6bc2..09e8183c03 100755 --- a/calendar/templates/pixelegg/app.css +++ b/calendar/templates/pixelegg/app.css @@ -11,7 +11,7 @@ * @package calendar * @version $Id$ */ -/* $Id: app.css 54892 2016-02-01 20:52:53Z nathangray $ */ +/* $Id: app.css 54876 2016-01-28 22:08:15Z nathangray $ */ /*Media print classes*/ @media print { .th td, @@ -559,20 +559,6 @@ Hide subsequent headers in week view with non-consolidated owners .calendar_calEvent:hover { cursor: pointer; } -/** Multi-line ellipsis */ -.calendar_calEvent .calendar_calEventBody { - overflow: hidden; -} -.calendar_calTimeGrid:not(.calendar_calTimeGridList) .calendar_calEvent::after { - width: 100%; - background-color: rgba(255, 255, 255, 0.9); - height: 0.9em; - content: "\02026"; - left: 0px; - float: right; - padding-bottom: 2em; - text-indent: 5px; -} /** * User has not accepted the invitation */ @@ -746,7 +732,7 @@ Hide subsequent headers in week view with non-consolidated owners .calendar_calTimeGridList .calendar_calDayColHeader > div[data-date] { border: none; } -.calendar_calTimeGridList .calendar_calDayCol > div.event_wrapper { +.calendar_calTimeGridList .calendar_calDayCol > div:first-child { position: absolute; top: 0px; bottom: 3em;