mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-11 14:57:12 +00:00
Monotone-Parent: 7ccd1ab7beef95f5bf3ce66708988dbf11332387
Monotone-Revision: 8e91e5d3f8f29fee9018d49992181eb3b9eaa2e9 Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2007-06-07T19:21:24 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
1 parent
1b3f33a605
commit
5d933f5fa7
2 files changed
+27
-15
No files matched your search
@@ -338,7 +338,7 @@ function tasksListCallback(http) {
|
|||||||
//log(i + " = " + data[i][3]);
|
//log(i + " = " + data[i][3]);
|
||||||
var listItem = document.createElement("li");
|
var listItem = document.createElement("li");
|
||||||
newList.appendChild(listItem);
|
newList.appendChild(listItem);
|
||||||
Event.observe(listItem, "mousedown", listRowMouseDownHandler);
|
//Event.observe(listItem, "mousedown", listRowMouseDownHandler); // causes problem with Safari
|
||||||
Event.observe(listItem, "click", onRowClick);
|
Event.observe(listItem, "click", onRowClick);
|
||||||
Event.observe(listItem, "dblclick", editDoubleClickedEvent.bindAsEventListener(listItem));
|
Event.observe(listItem, "dblclick", editDoubleClickedEvent.bindAsEventListener(listItem));
|
||||||
listItem.setAttribute("id", data[i][0]);
|
listItem.setAttribute("id", data[i][0]);
|
||||||
@@ -861,12 +861,12 @@ function updateTaskStatus(event) {
|
|||||||
var newStatus = (this.checked ? 1 : 0);
|
var newStatus = (this.checked ? 1 : 0);
|
||||||
var http = createHTTPClient();
|
var http = createHTTPClient();
|
||||||
|
|
||||||
log ("update task status: " + taskId);
|
log("update task status: " + taskId + " to " + this.checked);
|
||||||
event.cancelBubble = true;
|
event.cancelBubble = true;
|
||||||
|
|
||||||
url = appendDifferentiator((UserFolderURL + "../" + taskOwner
|
url = (UserFolderURL + "../" + taskOwner
|
||||||
+ "/Calendar/" + taskId
|
+ "/Calendar/" + taskId
|
||||||
+ "/changeStatus?status=" + newStatus));
|
+ "/changeStatus?status=" + newStatus);
|
||||||
|
|
||||||
if (http) {
|
if (http) {
|
||||||
// log ("url: " + url);
|
// log ("url: " + url);
|
||||||
@@ -909,10 +909,10 @@ function updateCalendarStatus(event) {
|
|||||||
var folderID = this.parentNode.getAttribute("id");
|
var folderID = this.parentNode.getAttribute("id");
|
||||||
var urlstr = URLForFolderID(folderID);
|
var urlstr = URLForFolderID(folderID);
|
||||||
if (this.checked)
|
if (this.checked)
|
||||||
urlstr += "/activateFolder";
|
urlstr += "/activateFolder";
|
||||||
else
|
else
|
||||||
urlstr += "/deactivateFolder";
|
urlstr += "/deactivateFolder";
|
||||||
//log("updateCalendarStatus: ajax request = " + urlstr + " folderID = " + folderID);
|
//log("updateCalendarStatus: ajax request = " + urlstr + ", folderID = " + folderID);
|
||||||
triggerAjaxRequest(urlstr, calendarStatusCallback, folderID);
|
triggerAjaxRequest(urlstr, calendarStatusCallback, folderID);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -926,18 +926,22 @@ function updateCalendarStatus(event) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function calendarStatusCallback(http) {
|
function calendarStatusCallback(http) {
|
||||||
if (http.readyState == 4) {
|
if (http.readyState == 4) {
|
||||||
if (http.status == 204) { // No content
|
if (http.status == 204 ||
|
||||||
|
(isSafari() && typeof(http.status) == 'undefined') ||
|
||||||
|
http.status == 1223) {
|
||||||
refreshAppointments();
|
refreshAppointments();
|
||||||
refreshTasks();
|
refreshTasks();
|
||||||
changeCalendarDisplay();
|
changeCalendarDispla4y();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
var folder = $(http.callbackData);
|
var folder = $(http.callbackData);
|
||||||
var input = folder.childNodesWithTag("input")[0];
|
var input = folder.childNodesWithTag("input")[0];
|
||||||
input.checked = (!input.checked);
|
input.checked = (!input.checked);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
log("calendarStatusCallback Ajax error");
|
||||||
}
|
}
|
||||||
|
|
||||||
function calendarEntryCallback(http) {
|
function calendarEntryCallback(http) {
|
||||||
@@ -1068,7 +1072,7 @@ function initCalendarSelector() {
|
|||||||
for (var i = 0; i < list.length; i++) {
|
for (var i = 0; i < list.length; i++) {
|
||||||
var input = list[i].childNodesWithTag("input")[0];
|
var input = list[i].childNodesWithTag("input")[0];
|
||||||
Event.observe(input, "click", updateCalendarStatus.bindAsEventListener(input)); // not registered in IE?
|
Event.observe(input, "click", updateCalendarStatus.bindAsEventListener(input)); // not registered in IE?
|
||||||
Event.observe(list[i], "mousedown", listRowMouseDownHandler);
|
//Event.observe(list[i], "mousedown", listRowMouseDownHandler, true); // problem with Safari
|
||||||
Event.observe(list[i], "click", onRowClick);
|
Event.observe(list[i], "click", onRowClick);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1094,6 +1098,7 @@ function appendCalendar(folderName, folder) {
|
|||||||
|
|
||||||
var checkBox = document.createElement("input");
|
var checkBox = document.createElement("input");
|
||||||
li.appendChild(checkBox);
|
li.appendChild(checkBox);
|
||||||
|
|
||||||
li.appendChild(document.createTextNode(" "));
|
li.appendChild(document.createTextNode(" "));
|
||||||
|
|
||||||
var colorBox = document.createElement("div");
|
var colorBox = document.createElement("div");
|
||||||
|
|||||||
@@ -289,6 +289,13 @@ function checkAjaxRequestsState() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function isSafari() {
|
||||||
|
//var agt = navigator.userAgent.toLowerCase();
|
||||||
|
//var is_safari = ((agt.indexOf('safari')!=-1)&&(agt.indexOf('mac')!=-1))?true:false;
|
||||||
|
|
||||||
|
return (navigator.vendor == "Apple Computer, Inc.");
|
||||||
|
}
|
||||||
|
|
||||||
function getTarget(event) {
|
function getTarget(event) {
|
||||||
event = event || window.event;
|
event = event || window.event;
|
||||||
if (event.target)
|
if (event.target)
|
||||||
@@ -450,7 +457,7 @@ function onRowClick(event) {
|
|||||||
// parentNode is UL or TABLE
|
// parentNode is UL or TABLE
|
||||||
if (document.createEvent) {
|
if (document.createEvent) {
|
||||||
var onSelectionChangeEvent;
|
var onSelectionChangeEvent;
|
||||||
if (navigator.vendor == "Apple Computer, Inc.")
|
if (isSafari())
|
||||||
onSelectionChangeEvent = document.createEvent("UIEvents");
|
onSelectionChangeEvent = document.createEvent("UIEvents");
|
||||||
else
|
else
|
||||||
onSelectionChangeEvent = document.createEvent("Events");
|
onSelectionChangeEvent = document.createEvent("Events");
|
||||||
|
|||||||
Reference in new issue
Block a user