mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-10 09:21:23 +00:00
multiColumns print view + bugFixes
This commit is contained in:
committed by
Francis Lachapelle
parent
d730cd5647
commit
7ae2321322
@@ -137,6 +137,19 @@ function addCalendarsColor () {
|
||||
}
|
||||
}
|
||||
|
||||
function addCalendarsColor () {
|
||||
var activeCalendarsId = [];
|
||||
var allCalendars = window.parent$("calendarList");
|
||||
var allColors = window.parentvar("UserSettings")['Calendar']['FolderColors'];
|
||||
for (var i = 0; i < allCalendars.children.length; i++) {
|
||||
if (allCalendars.children[i].down("input").checked){
|
||||
folderName = allCalendars.children[i].getAttribute("id").substr(1);
|
||||
color = allColors["sogo1:Calendar/" + folderName];
|
||||
appendStyleElement(folderName, color);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function refreshEvents() {
|
||||
var todayDate = new Date();
|
||||
|
||||
@@ -532,6 +545,15 @@ function appendStyleElement(folderPath, color) {
|
||||
}
|
||||
}
|
||||
|
||||
function appendStyleElement(folderPath, color) {
|
||||
if (document.styleSheets) {
|
||||
var fgColor = getContrastingTextColor(color);
|
||||
var styleElement = document.styleSheets[3];
|
||||
|
||||
styleElement.addRule(".calendarFolder" + folderPath, "background-color: " + color + " !important;" + " color: " + fgColor + " !important;", 1);
|
||||
}
|
||||
}
|
||||
|
||||
function _parseEvent(event) {
|
||||
// Localized strings :
|
||||
var start = _("Start:");
|
||||
@@ -697,6 +719,29 @@ function _computeOffset(hoursCells) {
|
||||
return offset;
|
||||
}
|
||||
|
||||
function _computeOffset(hoursCells) {
|
||||
var outOfDayCells = hoursCells.getElementsByClassName("outOfDay");
|
||||
var count = 1;
|
||||
var offset = [];
|
||||
var buffer;
|
||||
var j = 1;
|
||||
for (var i = 0; i < outOfDayCells.length; i++) {
|
||||
hourCell1 = parseInt(outOfDayCells[i].getAttribute("hour")) + 100;
|
||||
hourCell2 = parseInt(outOfDayCells[j].getAttribute("hour"));
|
||||
if (hourCell1 == hourCell2) {
|
||||
count += 1;
|
||||
}
|
||||
else {
|
||||
break;
|
||||
}
|
||||
j ++;
|
||||
}
|
||||
offset.push(count * 4);
|
||||
offset.push((hourCell2 / 100 * 4) - (count * 4));
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
||||
/************************************** Preview Navigation *****************************************/
|
||||
|
||||
function onCalendarGotoDay(node) {
|
||||
|
||||
Reference in New Issue
Block a user