Monotone-Parent: d53ae5e9542f266cda31bf64e2f06712c798dfdc

Monotone-Revision: 6c2b27000ef5daddb97c24871e9fb52a185b3d59

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2006-08-24T21:14:18
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2006-08-24 21:14:18 +00:00
parent b4957b1cd1
commit 94a5ea4b34
3 changed files with 13 additions and 40 deletions

View File

@@ -154,18 +154,11 @@ function appointmentsListCallback(http)
if (http.readyState == 4
&& http.status == 200) {
// log ("babla");
document.dateSelectorAjaxRequest = null;
// log ("babla");
div.innerHTML = http.responseText;
// log ("babla");
// log ("received " + http.callbackData);
var params = parseQueryParameters(http.callbackData);
sortKey = params["sort"];
sortOrder = params["desc"];
// log ("sorting = " + sortKey + sortOrder);
}
else
log ("ajax fuckage");
@@ -342,13 +335,13 @@ function onAppointmentsSelectionChange()
}
function _loadAppointmentHref(href) {
if (this.document.appointmentsListAjaxRequest) {
this.document.appointmentsListAjaxRequest.aborted = true;
this.document.appointmentsListAjaxRequest.abort();
if (document.appointmentsListAjaxRequest) {
document.appointmentsListAjaxRequest.aborted = true;
document.appointmentsListAjaxRequest.abort();
}
url = ApplicationBaseURL + href;
// log ("url: " + url);
this.document.appointmentsListAjaxRequest
document.appointmentsListAjaxRequest
= triggerAjaxRequest(url, appointmentsListCallback, href);
return false;
@@ -356,18 +349,14 @@ function _loadAppointmentHref(href) {
function onHeaderClick(node)
{
var href = node.getAttribute("href");
return _loadAppointmentHref(href);
return _loadAppointmentHref(node.getAttribute("href"));
}
function refreshAppointments() {
var href = ("aptlist?desc=" + sortOrder
+ "&sort=" + sortKey
+ "&day=" + currentDay
+ "&filterpopup=" + listFilter);
return _loadAppointmentHref(href);
return _loadAppointmentHref("aptlist?desc=" + sortOrder
+ "&sort=" + sortKey
+ "&day=" + currentDay
+ "&filterpopup=" + listFilter);
}
function onListFilterChange() {

View File

@@ -99,7 +99,7 @@ function submitMeeting(thisForm) {
thisForm.submit();
opener.window.refreshAppointments();
window.opener.setTimeout('refreshAppointments();', 200);
window.close();
}

View File

@@ -144,23 +144,6 @@ function sanitizeMailTo(dirtyMailTo) {
return mailto;
}
/* escaping */
function escapeHTML(s) {
s = s.replace(/&/g, "&");
s = s.replace(/</g, "&lt;");
s = s.replace(/>/g, "&gt;");
s = s.replace(/\"/g, "&quot;");
return s;
}
function unescapeHTML(s) {
s = s.replace(/&lt;/g, "<");
s = s.replace(/&gt;/g, ">");
s = s.replace(/&quot;/g, '"');
s = s.replace(/&amp;/g, "&");
return s;
}
function createHTTPClient() {
// http://developer.apple.com/internet/webcontent/xmlhttpreq.html
if (typeof XMLHttpRequest != "undefined")
@@ -170,11 +153,12 @@ function createHTTPClient() {
catch (e) { }
try { return new ActiveXObject("Microsoft.XMLHTTP"); }
catch (e) { }
return null;
}
function triggerAjaxRequest(url, callback, userdata) {
this.http = createHTTPClient();
var http = createHTTPClient();
activeAjaxRequests += 1;
document.animTimer = setTimeout("checkAjaxRequestsState();", 200);