Monotone-Parent: 682fa13875615480f8ed7c009317a6fd3050050b

Monotone-Revision: 1cad98827a66e18891a4b93bbab5ccce88c61795

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2007-06-12T14:58:15
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Francis Lachapelle
2007-06-12 14:58:15 +00:00
parent bae181672b
commit 59361b2b7f
4 changed files with 26 additions and 26 deletions

View File

@@ -125,8 +125,7 @@ DIV#contactFoldersList DIV.toolbar
border-left: 1px solid #aaa; }
UL#contactFolders
{ visibility: hidden;
list-style-type: none;
{ list-style-type: none;
list-style-image: none;
clear: both;
cursor: default;

View File

@@ -555,13 +555,14 @@ function lookupDeniedFolders() {
for (var i = 0; i < list.length; i++) {
var folderID = list[i].getAttribute("id");
var url = URLForFolderID(folderID) + "/canAccessContent";
triggerAjaxRequest(url, deniedFoldersLookupCallback, folderID);
}
}
function deniedFoldersLookupCallback(http) {
if (http.readyState == 4) {
var denied = (http.status != 204)
if (http.readyState == 4) {
var denied = ! isHttpStatus204(http.status);
var entry = $(http.callbackData);
if (denied)
entry.addClassName("denied");
@@ -588,8 +589,7 @@ function configureContactFolders() {
setEventsOnContactFolder(lis[i]);
lookupDeniedFolders();
contactFolders.setStyle({ visibility: 'visible' });
var personalFolder = $("/personal");
personalFolder.select();
}
@@ -642,18 +642,15 @@ function configureSelectionButtons() {
}
}
var initContacts = {
handleEvent: function (event) {
if (!document.body.hasClassName("popup")) {
configureAbToolbar();
configureSearchField();
}
else
configureSelectionButtons();
configureContactFolders();
function initContacts(event) {
if (!document.body.hasClassName("popup")) {
configureAbToolbar();
configureSearchField();
}
else
configureSelectionButtons();
configureContactFolders();
// initDnd();
}
}
//window.addEventListener("load", initContacts, false);
Event.observe(window, "load", initContacts, false);
addEvent(window, 'load', initContacts);

View File

@@ -1151,21 +1151,19 @@ function updateCalendarStatus(event) {
function calendarStatusCallback(http) {
if (http.readyState == 4) {
if (http.status == 204 ||
(isSafari() && typeof(http.status) == 'undefined') ||
http.status == 1223) {
if (isHttpStatus204(http.status)) {
refreshEvents();
refreshTasks();
changeCalendarDisplay();
}
else {
var folder = $(http.callbackData);
var input = folder.childNodesWithTag("input")[0];
input.checked = (!input.checked);
var folder = $(http.callbackData);
var input = folder.childNodesWithTag("input")[0];
input.checked = (!input.checked);
}
}
else
log("calendarStatusCallback Ajax error");
log("calendarStatusCallback Ajax error");
}
function calendarEntryCallback(http) {

View File

@@ -296,6 +296,12 @@ function isSafari() {
return (navigator.vendor == "Apple Computer, Inc.");
}
function isHttpStatus204(status) {
return (status == 204 || // Firefox
(isSafari() && typeof(status) == 'undefined') || // Safari
status == 1223); // IE
}
function getTarget(event) {
event = event || window.event;
if (event.target)
@@ -453,7 +459,7 @@ function onRowClick(event) {
$(node).select();
}
if (startSelection != node.parentNode.getSelectedNodes()) {
if (startSelection != $(node.parentNode).getSelectedNodes()) {
var parentNode = node.parentNode;
if (parentNode.tagName == 'TBODY')
parentNode = parentNode.parentNode;