Monotone-Parent: 1e6376f6599d032a3b57fc881d7ead6d4f903195

Monotone-Revision: 4fb91535d64ab4fed607ffde0f99efdc1f92a6e6

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2007-08-07T18:14:39
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Francis Lachapelle 2007-08-07 18:14:39 +00:00
parent 4e23c849c9
commit 679ef1b24f
7 changed files with 55 additions and 35 deletions

1
NEWS
View File

@ -9,6 +9,7 @@
- added support for limiting LDAP queries with the SOGoLDAPQueryLimit and
the SOGoLDAPSizeLimit settings;
- fixed a bug where folders starting with digits would not be displayed;
- improved IE7 and Safari support: priority menus, attendees selector.
0.9.0-20070713
--------------

View File

@ -96,7 +96,8 @@ Date.prototype.daysUpTo = function(otherDate) {
}
Date.prototype.getDayString = function() {
var newString = this.getYear() + 1900;
var newString = this.getYear();
if (newString < 1000) newString += 1900;
var month = '' + (this.getMonth() + 1);
if (month.length == 1)
month = '0' + month;
@ -132,15 +133,18 @@ Date.prototype.getDisplayHoursString = function() {
Date.prototype.stringWithSeparator = function(separator) {
var month = '' + (this.getMonth() + 1);
var day = '' + this.getDate();
var year = this.getYear();
if (year < 1000)
year = '' + (year + 1900);
if (month.length == 1)
month = '0' + month;
if (day.length == 1)
day = '0' + day;
if (separator == '-')
str = (this.getYear() + 1900) + '-' + month + '-' + day;
str = year + '-' + month + '-' + day;
else
str = day + '/' + month + '/' + (this.getYear() + 1900);
str = day + '/' + month + '/' + year;
return str;
}

View File

@ -701,7 +701,7 @@ function drawCalendarEvent(eventData, sd, ed) {
}
}
if (parentDiv)
parentDiv.appendChild(eventDiv);
parentDiv.appendChild(eventDiv);
}
}
@ -710,34 +710,34 @@ function newEventDIV(cname, owner, starts, lasts,
var eventDiv = document.createElement("div");
eventDiv.cname = cname;
eventDiv.owner = owner;
eventDiv.addClassName("event");
eventDiv.addClassName("starts" + starts);
eventDiv.addClassName("lasts" + lasts);
$(eventDiv).addClassName("event");
$(eventDiv).addClassName("starts" + starts);
$(eventDiv).addClassName("lasts" + lasts);
for (var i = 1; i < 5; i++) {
var shadowDiv = document.createElement("div");
eventDiv.appendChild(shadowDiv);
shadowDiv.addClassName("shadow");
shadowDiv.addClassName("shadow" + i);
$(shadowDiv).addClassName("shadow");
$(shadowDiv).addClassName("shadow" + i);
}
var innerDiv = document.createElement("div");
eventDiv.appendChild(innerDiv);
innerDiv.addClassName("eventInside");
innerDiv.addClassName("ownerIs" + owner);
$(innerDiv).addClassName("eventInside");
$(innerDiv).addClassName("ownerIs" + owner);
var gradientDiv = document.createElement("div");
innerDiv.appendChild(gradientDiv);
gradientDiv.addClassName("gradient");
$(gradientDiv).addClassName("gradient");
var gradientImg = document.createElement("img");
gradientDiv.appendChild(gradientImg);
gradientImg.src = ResourcesURL + "/event-gradient.png";
var textDiv = document.createElement("div");
innerDiv.appendChild(textDiv);
textDiv.addClassName("text");
$(textDiv).addClassName("text");
if (startHour) {
var headerSpan = document.createElement("span");
textDiv.appendChild(headerSpan);
headerSpan.addClassName("eventHeader");
$(headerSpan).addClassName("eventHeader");
headerSpan.appendChild(document.createTextNode(startHour + " - "
+ endHour));
textDiv.appendChild(document.createElement("br"));
@ -1089,7 +1089,7 @@ function findMonthCalendarSelectedCell(daysContainer) {
while (!found && i < daysContainer.childNodes.length) {
var currentNode = daysContainer.childNodes[i];
if (currentNode instanceof HTMLDivElement
if (currentNode.tagName == 'DIV'
&& currentNode.hasClassName("selectedDay")) {
daysContainer.selectedCell = currentNode;
found = true;
@ -1122,7 +1122,9 @@ function updateTaskStatus(event) {
var newStatus = (this.checked ? 1 : 0);
var http = createHTTPClient();
// log("update task status: " + taskId + " to " + this.checked);
if (isSafari())
newStatus = (newStatus ? 0 : 1);
//log("update task status: " + taskId + " to " + this.checked);
event.cancelBubble = true;
url = (UserFolderURL + "../" + taskOwner
@ -1350,12 +1352,13 @@ function appendCalendar(folderName, folder) {
var calendarList = $("calendarList");
var lis = calendarList.childNodesWithTag("li");
var color = indexColor(lis.length);
log ("color: " + color);
//log ("color: " + color);
var li = document.createElement("li");
calendarList.appendChild(li);
var checkBox = document.createElement("input");
checkBox.setAttribute("type", "checkbox");
li.appendChild(checkBox);
li.appendChild(document.createTextNode(" "));
@ -1368,26 +1371,35 @@ function appendCalendar(folderName, folder) {
li.setAttribute("id", folder);
Event.observe(li, "mousedown", listRowMouseDownHandler);
Event.observe(li, "click", onRowClick);
checkBox.addClassName("checkBox");
checkBox.type = "checkbox";
$(checkBox).addClassName("checkBox");
Event.observe(checkBox, "click", updateCalendarStatus.bindAsEventListener(checkBox));
colorBox.addClassName("colorBox");
$(colorBox).addClassName("colorBox");
if (color) {
colorBox.setStyle({ color: color,
backgroundColor: color });
$(colorBox).setStyle({ color: color,
backgroundColor: color });
}
var contactId = folder.split(":")[0];
var styles = document.getElementsByTagName("style");
var url = URLForFolderID(folder) + "/canAccessContent";
triggerAjaxRequest(url, calendarEntryCallback, folder);
styles[0].innerHTML += ('.ownerIs' + contactId + ' {'
if (!document.styleSheets) return;
var theRules = new Array();
var lastSheet = document.styleSheets[document.styleSheets.length - 1];
if (lastSheet.insertRule) { // Mozilla
lastSheet.insertRule('.ownerIs' + contactId + ' {'
+ ' background-color: '
+ color
+ ' !important; }');
+ ' !important; }', 0);
}
else { // IE
lastSheet.addRule('.ownerIs' + contactId,
' background-color: '
+ color
+ ' !important; }');
}
}
function onFolderSubscribeCB(folderData) {

View File

@ -205,7 +205,7 @@ function newAttendee(event) {
input.activate();
}
function checkAttendee() { log ("checkAttendee (loosing focus)");
function checkAttendee() {
this.focussed = false;
var th = this.parentNode.parentNode;
var tbody = th.parentNode;

View File

@ -133,7 +133,7 @@ function initializePrivacyMenu() {
var privacy = $("privacy").value.toUpperCase();
if (privacy.length > 0) {
var privacyMenu = $("privacy-menu").childNodesWithTag("ul")[0];
var menuEntries = privacyMenu.childNodesWithTag("li");
var menuEntries = $(privacyMenu).childNodesWithTag("li");
var chosenNode;
if (privacy == "CONFIDENTIAL")
chosenNode = menuEntries[1];
@ -142,7 +142,7 @@ function initializePrivacyMenu() {
else
chosenNode = menuEntries[0];
privacyMenu.chosenNode = chosenNode;
chosenNode.addClassName("_chosen");
$(chosenNode).addClassName("_chosen");
}
}

View File

@ -89,20 +89,23 @@ function onFolderTreeItemClick(event) {
function userFoldersCallback(http) {
if (http.readyState == 4) {
document.userFoldersRequest = null;
var div = $("folders");
if (http.status == 200) {
var div = $("folders");
var response = http.responseText;
div.innerHTML = buildTree(http.responseText);
var nodes = document.getElementsByClassName("node", $("d"));
for (i = 0; i < nodes.length; i++)
Event.observe(nodes[i], "click", onFolderTreeItemClick.bindAsEventListener(nodes[i]));
}
else if (http.status == 404) {
div.innerHTML = "";
}
}
}
function onConfirmFolderSelection(event) {
var topNode = $("d");
if (topNode.selectedEntry) {
if (topNode && topNode.selectedEntry) {
var node = topNode.selectedEntry.parentNode;
var folder = node.getAttribute("dataname");
var folderName;

View File

@ -145,7 +145,7 @@ function URLForFolderID(folderID) {
var url;
if (folderInfos.length > 1) {
url = UserFolderURL + "../" + folderInfos[0];
if (folderInfos[1][0] != '/')
if (!folderInfos[1].startsWith('/'))
url += '/';
url += folderInfos[1];
}
@ -908,7 +908,7 @@ function popupToolbarMenu(node, menuId) {
function folderSubscriptionCallback(http) {
if (http.readyState == 4) {
if (http.status == 204) {
if (isHttpStatus204(http.status)) {
if (http.callbackData)
http.callbackData["method"](http.callbackData["data"]);
}
@ -943,7 +943,7 @@ function subscribeToFolder(refreshCallback, refreshCallbackData) {
function folderUnsubscriptionCallback(http) {
if (http.readyState == 4) {
if (http.status == 204) {
if (isHttpStatus204(http.status)) {
if (http.callbackData)
http.callbackData["method"](http.callbackData["data"]);
}