multiColumns print view + bugFixes

pull/91/head
Alexandre Cloutier 2014-06-25 17:39:48 -04:00 committed by Francis Lachapelle
parent 720a946d39
commit 257d731e04
4 changed files with 60 additions and 0 deletions

View File

@ -317,6 +317,7 @@
"Repeat" = "Repeat";
"Daily" = "Daily";
"Multi-Columns" = "Multi-Columns";
"Weekly" = "Weekly";
"Monthly" = "Monthly";
"Yearly" = "Yearly";

View File

@ -3807,6 +3807,19 @@ function drawNowLine() {
}
setTimeout("drawNowLine ();", 60000); // 1 min.
}
else {
var target = targets[0].getElementsByClassName("clickableHourCell")[hours];
if (target) {
var div = targets[0].getElementsByClassName("nowLineDisplay")[0];
if (!div)
div = new Element("div", {'class': 'nowLineDisplay'});
div.style.top = parseInt((minutes * target.offsetHeight / 60) - 1) + "px";
target.insertBefore(div, target.firstChild);
}
}
setTimeout("drawNowLine ();", 60000); // 1 min.
}
}
function onListCollapse(event, element) {

View File

@ -621,6 +621,7 @@ LABEL {
position:static;
top:5px;
left:5px;
}
DIV#rightFrame {

View File

@ -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:");
@ -706,6 +728,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) {