Fix all-day events display in IE
It also fixes the display of the event categories for all-day events in IE.pull/51/head
parent
94f3246658
commit
ea44308aa3
1
NEWS
1
NEWS
|
@ -14,6 +14,7 @@ Enhancements
|
|||
Bug fixes
|
||||
- fixed weekdays translation in the datepicker
|
||||
- fixed event categories display
|
||||
- fixed all-day events display in IE
|
||||
- fixed rename of calendars
|
||||
- we now correctly add the "METHOD:REPLY" when sending out ITIP messages from DAV clients
|
||||
- fixed refresh of message headers when forwarding a message (#2818)
|
||||
|
|
|
@ -400,7 +400,7 @@ DIV#daysView
|
|||
border-top: 1px solid #ccc;
|
||||
overflow: auto;
|
||||
overflow-x: hidden;
|
||||
right: 0px;}
|
||||
right: 0px; }
|
||||
|
||||
DIV#calendarHeader
|
||||
{ top: 25px;
|
||||
|
@ -1298,9 +1298,10 @@ DIV#daysView DIV.event.lasts96
|
|||
DIV.event > DIV.eventInside
|
||||
{ position: absolute;
|
||||
overflow: hidden;
|
||||
width:100%;
|
||||
top: 0px;
|
||||
bottom: 0px;
|
||||
left: 0px;
|
||||
right: 0px;
|
||||
-webkit-border-radius: 2px;
|
||||
border-radius: 2px;
|
||||
cursor:move; }
|
||||
|
|
|
@ -1762,7 +1762,9 @@ function _setupEventsDragAndDrop(events) {
|
|||
var blocks = occurrences[j].blocks;
|
||||
var dragController = new SOGoEventDragController();
|
||||
dragController.updateDropCallback = updateEventFromDragging;
|
||||
dragController.attachToEventCells(blocks);
|
||||
if (blocks.length > 0)
|
||||
// Ignore events that have no visible blocks
|
||||
dragController.attachToEventCells(blocks);
|
||||
}
|
||||
setupFlags[setupId] = true;
|
||||
}
|
||||
|
@ -1826,25 +1828,27 @@ function resetCategoriesStyles() {
|
|||
var selectors = [];
|
||||
var rules = [];
|
||||
categoriesStyles.keys().each(function(category) {
|
||||
var color = UserDefaults['SOGoCalendarCategoriesColors'][category];
|
||||
if (color) {
|
||||
rules[rules.length] = '{ border-right: 8px solid ' + color + '; }';
|
||||
selectors[selectors.length] = 'DIV.' + categoriesStyles.get(category);
|
||||
}
|
||||
});
|
||||
var color = UserDefaults['SOGoCalendarCategoriesColors'][category];
|
||||
if (color) {
|
||||
rules.push('border-right: 8px solid ' + color);
|
||||
selectors.push('DIV.' + categoriesStyles.get(category));
|
||||
}
|
||||
});
|
||||
|
||||
if (selectors.length > 0) {
|
||||
if (categoriesStyleSheet.styleSheet && categoriesStyleSheet.styleSheet.addRule) {
|
||||
// IE
|
||||
for (var i = 0; i < selectors.length; i++)
|
||||
for (var i = 0; i < selectors.length; i++) {
|
||||
categoriesStyleSheet.styleSheet.addRule(selectors[i],
|
||||
rules[i]);
|
||||
}
|
||||
}
|
||||
else {
|
||||
// Mozilla + Safari
|
||||
for (var i = 0; i < selectors.length; i++)
|
||||
for (var i = 0; i < selectors.length; i++) {
|
||||
categoriesStyleSheet.appendChild(document.createTextNode(selectors[i] +
|
||||
' ' + rules[i]));
|
||||
' { ' + rules[i] + '; }'));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2099,8 +2103,6 @@ function newEventDIV(eventRep, event) {
|
|||
var left = eventRep.position * pc;
|
||||
eventCell.style.left = left + "%";
|
||||
var right = 100 - (eventRep.position + 1) * pc;
|
||||
if (event[10] != null)
|
||||
eventCell.style.borderRight = "8px solid white";
|
||||
|
||||
eventCell.style.right = right + "%";
|
||||
eventCell.addClassName("starts" + eventRep.start);
|
||||
|
@ -2142,8 +2144,6 @@ function newMonthEventDIV(eventRep, event) {
|
|||
|
||||
var eventCell = newBaseEventDIV(eventRep, event,
|
||||
eventText);
|
||||
if (event[10] != null)
|
||||
eventCell.style.borderRight = "8px solid white";
|
||||
|
||||
return eventCell;
|
||||
}
|
||||
|
@ -2176,8 +2176,9 @@ function adjustCalendarHeaderDIV() {
|
|||
var rule = ("right: " + delta + "px");
|
||||
if (styleElement.styleSheet && styleElement.styleSheet.addRule) {
|
||||
// IE
|
||||
styleElement.styleSheet.addRule(selectors[0], rule);
|
||||
styleElement.styleSheet.addRule(selectors[1], rule);
|
||||
for (var i = 0; i < selectors.length; i++) {
|
||||
styleElement.styleSheet.addRule(selectors[i], rule);
|
||||
}
|
||||
} else {
|
||||
// Mozilla + Firefox
|
||||
var styleText = selectors.join(",") + " { " + rule + "; }";
|
||||
|
|
Loading…
Reference in New Issue