Monotone-Parent: 92528ef4ae9b54bc30415a773c3bf6013e284be0

Monotone-Revision: 048d106563715d2fe3f7e783e8caec9f3ad005e2

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2007-04-27T22:06:58
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2007-04-27 22:06:58 +00:00
parent 58865b869b
commit e1db62a8bb
4 changed files with 34 additions and 16 deletions
+3
View File
@@ -3,6 +3,9 @@
var cachedContacts = new Array();
var currentContactFolder = '/personal';
var usersRightsWindowHeight = 180;
var usersRightsWindowWidth = 450;
function openContactWindow(sender, url) {
var msgWin = window.open(url, null, "width=450,height=600,resizable=0");
msgWin.focus();
+3
View File
@@ -19,6 +19,9 @@ var contactSelectorAction = 'calendars-contacts';
var eventsToDelete = new Array();
var ownersOfEventsToDelete = new Array();
var usersRightsWindowHeight = 250;
var usersRightsWindowWidth = 502;
function newEvent(sender, type) {
var day = sender.getAttribute("day");
if (!day)
+6 -3
View File
@@ -71,10 +71,10 @@ function openRightsForUser(button) {
elements[elements.length-1] = ("userRights?uid="
+ nodes[0].getAttribute("id"));
window.open(elements.join("/"), "",
"width=502,height=250,resizable=0,scrollbars=0,toolbar=0,"
"width=" + this.userRightsWidth
+ ",height=" + this.userRightsHeight
+ ",resizable=0,scrollbars=0,toolbar=0,"
+ "location=0,directories=0,status=0,menubar=0,copyhistory=0");
}
@@ -98,6 +98,9 @@ function onAclLoadHandler() {
var buttons = $("userSelectorButtons").childNodesWithTag("a");
buttons[0].addEventListener("click", onUserAdd, false);
buttons[1].addEventListener("click", onUserRemove, false);
this.userRightsHeight = window.opener.getUsersRightsWindowHeight();
this.userRightsWidth = window.opener.getUsersRightsWindowWidth();
}
window.addEventListener("load", onAclLoadHandler, false);
+22 -13
View File
@@ -836,7 +836,8 @@ function subscribeToFolder(refreshCallback, refreshCallbackData) {
rfCbData);
}
else
window.alert(labels["You cannot subscribe to a folder that you own!"].decodeEntities());
window.alert(labels["You cannot subscribe to a folder that you own!"]
.decodeEntities());
}
function folderUnsubscriptionCallback(http) {
@@ -853,7 +854,8 @@ function folderUnsubscriptionCallback(http) {
function unsubscribeFromFolder(folder, refreshCallback, refreshCallbackData) {
if (document.body.hasClassName("popup")) {
window.opener.unsubscribeFromFolder(folder, refreshCallback, refreshCallbackData);
window.opener.unsubscribeFromFolder(folder, refreshCallback,
refreshCallbackData);
}
else {
var folderData = folder.split(":");
@@ -867,9 +869,9 @@ function unsubscribeFromFolder(folder, refreshCallback, refreshCallbackData) {
document.unsubscriptionAjaxRequest.abort();
}
var rfCbData = { method: refreshCallback, data: refreshCallbackData };
document.unsubscriptionAjaxRequest = triggerAjaxRequest(url,
folderUnsubscriptionCallback,
rfCbData);
document.unsubscriptionAjaxRequest
= triggerAjaxRequest(url, folderUnsubscriptionCallback,
rfCbData);
}
else
window.alert(labels["You cannot unsubscribe from a folder that you own!"].decodeEntities());
@@ -946,6 +948,14 @@ function openAclWindow(url) {
return w;
}
function getUsersRightsWindowHeight() {
return usersRightsWindowHeight;
}
function getUsersRightsWindowWidth() {
return usersRightsWindowWidth;
}
function onTabClick(event) {
var node = event.target;
@@ -1023,15 +1033,14 @@ function indexColor(number) {
var currentValue = number;
var index = 0;
while (currentValue)
{
if (currentValue & 1)
while (currentValue) {
if (currentValue & 1)
colorTable[index]++;
if (index == 3)
index = 0;
currentValue >>= 1;
index++;
}
if (index == 3)
index = 0;
currentValue >>= 1;
index++;
}
color = ("#"
+ d2h((256 / colorTable[2]) - 1)