Monotone-Parent: e386794fdf815f604f1ca9b4a70b393e9f4fe7e4

Monotone-Revision: eb2f5a8d3d72ba94f994f34666890ef3703e703c

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2006-08-24T18:48:33
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau committed 2006-08-24 18:48:33 +00:00
1 parent 742e9c2c98
commit 85fc1c897f
6 files changed
+217 -230

No files matched your search

-60
View File
@@ -176,66 +176,6 @@ function hideInlineAttachmentList(sender) {
e.style.width = "100%";
}
/* ajax contactsFolder handling */
var activeAjaxRequests = 0;
function triggerAjaxRequest(url, callback, userdata) {
var http = createHTTPClient();
activeAjaxRequests += 1;
document.animTimer = setTimeout("checkAjaxRequestsState();", 200);
if (http) {
http.onreadystatechange
= function() {
try {
if (http.readyState == 4
&& activeAjaxRequests > 0) {
if (!http.aborted) {
http.callbackData = userdata;
callback(http);
}
activeAjaxRequests -= 1;
checkAjaxRequestsState();
}
}
catch( e ) {
activeAjaxRequests -= 1;
checkAjaxRequestsState();
alert('AJAX Request, Caught Exception: ' + e.description);
}
};
http.url = url;
http.open("GET", url, true);
http.send("");
}
return http;
}
function checkAjaxRequestsState()
{
if (activeAjaxRequests > 0
&& !document.busyAnim) {
var anim = document.createElement("img");
document.busyAnim = anim;
anim.setAttribute("src", ResourcesURL + '/busy.gif');
anim.style.position = "absolute;";
anim.style.top = "2.5em;";
anim.style.right = "1em;";
anim.style.visibility = "hidden;";
anim.style.zindex = "1;";
var folderTree = document.getElementById("toolbar");
folderTree.appendChild(anim);
anim.style.visibility = "visible;";
} else if (activeAjaxRequests == 0
&& document.busyAnim) {
document.busyAnim.parentNode.removeChild(document.busyAnim);
document.busyAnim = null;
}
}
function onContactsFolderTreeItemClick(element)
{
var topNode = document.getElementById('d');
-60
View File
@@ -440,66 +440,6 @@ function uixDeleteSelectedMessages(sender) {
return false;
}
/* ajax mailbox handling */
var activeAjaxRequests = 0;
function triggerAjaxRequest(url, callback, userdata) {
var http = createHTTPClient();
activeAjaxRequests += 1;
document.animTimer = setTimeout("checkAjaxRequestsState();", 200);
if (http) {
http.onreadystatechange
= function() {
try {
if (http.readyState == 4
&& activeAjaxRequests > 0) {
if (!http.aborted) {
http.callbackData = userdata;
callback(http);
}
activeAjaxRequests -= 1;
checkAjaxRequestsState();
}
}
catch( e ) {
activeAjaxRequests -= 1;
checkAjaxRequestsState();
alert('AJAX Request, Caught Exception: ' + e.description);
}
};
http.url = url;
http.open("GET", url, true);
http.send("");
}
return http;
}
function checkAjaxRequestsState()
{
if (activeAjaxRequests > 0
&& !document.busyAnim) {
var anim = document.createElement("img");
document.busyAnim = anim;
anim.setAttribute("src", ResourcesURL + '/busy.gif');
anim.style.position = "absolute;";
anim.style.top = "2.5em;";
anim.style.right = "1em;";
anim.style.visibility = "hidden;";
anim.style.zindex = "1;";
var folderTree = document.getElementById("toolbar");
folderTree.appendChild(anim);
anim.style.visibility = "visible;";
} else if (activeAjaxRequests == 0
&& document.busyAnim) {
document.busyAnim.parentNode.removeChild(document.busyAnim);
document.busyAnim = null;
}
}
function onMailboxTreeItemClick(element)
{
var topNode = document.getElementById('d');
+93 -21
View File
@@ -123,12 +123,12 @@ DIV#calendarView A
padding: .4em .2em;
}
#leftArrow
#dateSelector #header #leftArrow
{
float: left;
}
#rightArrow
#dateSelector #header #rightArrow
{
float: right;
}
@@ -206,25 +206,37 @@ TABLE#appointmentsList TR._selected TD
color: #fff;
}
TABLE.dayoverview_content
{ margin: 0px;
padding: 0px .5em;
TABLE.dayOverview,
TABLE.weekOverview
{
margin: 0 auto;
padding: 1em;
border-collapse: collapse; }
TABLE.dayoverview_content TD
TABLE.dayOverview TD,
TABLE.weekOverview TD
{ border: 1px solid #99f; }
TABLE.dayoverview_content TD.header
TABLE.dayOverview TD.header
{ text-align: center;
color: #77a;
width: 90%;
width: 100%;
font-weight: bold;
background: #eef; }
TABLE.dayoverview_content TD.nullheader
TABLE.weekOverview TD.header
{ text-align: center;
color: #77a;
width: 15%;
font-weight: bold;
background: #eef; }
TABLE.dayOverview TD.nullheader,
TABLE.weekOverview TD.nullheader
{ border: 0px solid #fff; }
TABLE.dayoverview_content TD.dayoverview_content_time
TABLE.dayOverview TD.hourOfDay,
TABLE.weekOverview TD.hourOfDay
{ text-align: right;
vertical-align: top;
height: 4em;
@@ -233,24 +245,70 @@ TABLE.dayoverview_content TD.dayoverview_content_time
color: #77a;
background: #eef; }
SPAN.daysHeader
SPAN.daysHeader,
SPAN.weeksHeader
{ display: block;
white-space: nowrap;
background: #dbdad5;
overflow: hidden;
width: 100%;
margin: .2em 0px;
padding: 0px;
text-align: center; }
margin: 0px;
height: 2.5em;
padding: .1em 1.5em;
border-top: 1px solid #aaa;
border-bottom: 1px solid #ccc; }
SPAN.daysHeader SPAN
{ margin: .2em 5%;
SPAN.daysHeader SPAN,
SPAN.weeksHeader SPAN
{ display: block;
margin: .1em;
float: left;
width: 18%;
padding: 0px;
text-align: center;
border: 1px solid transparent;
vertical-align: top; }
.day2
SPAN.daysHeader A,
SPAN.weeksHeader A
{ padding: 0px .5em; }
A.leftNavigationArrow,
A.rightNavigationArrow
{ border: 1px solid transparent;
padding: .5em;
text-align: center;
vertical-align: bottom; }
A.leftNavigationArrow:hover,
A.rightNavigationArrow:hover,
SPAN.daysHeader A:hover,
SPAN.weeksHeader A:hover
{ border-left: 1px solid #fff;
border-top: 1px solid #fff;
border-right: 1px solid #ccc;
border-bottom: 1px solid #ccc; }
A.leftNavigationArrow:active,
A.rightNavigationArrow:active,
SPAN.daysHeader A:active,
SPAN.weeksHeader A:active
{ border-left: 1px solid #ccc;
border-top: 1px solid #ccc;
border-right: 1px solid #fff;
border-bottom: 1px solid #fff; }
.week2
{
font-size: small;
}
.day2, .week1
{
font-size: medium;
}
.day1
.day1, .week0
{
font-size: large;
}
@@ -260,11 +318,19 @@ SPAN.daysHeader SPAN
font-size: x-large;
}
.day0, .week0
{ border-top: 1px solid #aaa !important;
border-left: 1px solid #aaa !important;
border-bottom: 1px solid #fff !important;
border-right: 1px solid #fff !important;
background: #ccc;
color: #222; }
A.leftNavigationArrow
{
position: absolute;
display: block;
top: 1em;
top: .5em;
left: .5em;
}
@@ -272,7 +338,7 @@ A.rightNavigationArrow
{
position: absolute;
display: block;
top: 1em;
top: .5em;
right: .5em;
}
@@ -280,7 +346,8 @@ DIV#calendarContent
{
position: absolute;
top: 3em;
width: 100%;
padding: 0px;
margin: 0px;
bottom: 0px;
left: 0px;
right: 0px;
@@ -297,3 +364,8 @@ DIV#calendarContent
background: #ccc;
color: #222;
}
SPAN.appointmentView
{ display: block;
background: #dd0;
border: 1px dashed #990; }
+59 -86
View File
@@ -1,68 +1,10 @@
var activeAjaxRequests = 0;
var sortOrder = '';
var sortKey = '';
var listFilter = 'view_all';
function triggerAjaxRequest(url, callback, userdata) {
this.http = createHTTPClient();
activeAjaxRequests += 1;
document.animTimer = setTimeout("checkAjaxRequestsState();", 200);
if (http) {
http.onreadystatechange
= function() {
// log ("state changed (" + http.readyState + "): " + url);
try {
if (http.readyState == 4
&& activeAjaxRequests > 0) {
if (!http.aborted) {
http.callbackData = userdata;
callback(http);
}
activeAjaxRequests -= 1;
checkAjaxRequestsState();
}
}
catch( e ) {
activeAjaxRequests -= 1;
checkAjaxRequestsState();
alert('AJAX Request, Caught Exception: ' + e.description);
}
};
http.url = url;
http.open("GET", url, true);
http.send("");
}
return http;
}
function checkAjaxRequestsState()
{
if (activeAjaxRequests > 0
&& !document.busyAnim) {
var anim = document.createElement("img");
document.busyAnim = anim;
anim.setAttribute("src", ResourcesURL + '/busy.gif');
anim.style.position = "absolute;";
anim.style.top = "2.5em;";
anim.style.right = "1em;";
anim.style.visibility = "hidden;";
anim.style.zindex = "1;";
var folderTree = document.getElementById("toolbar");
folderTree.appendChild(anim);
anim.style.visibility = "visible;";
} else if (activeAjaxRequests == 0
&& document.busyAnim) {
document.busyAnim.parentNode.removeChild(document.busyAnim);
document.busyAnim = null;
}
}
var currentDay = '';
var currentView = 'day';
var currentCalendarDay = '';
var currentView = 'dayview';
function newEvent(sender) {
var urlstr = ApplicationBaseURL + "new";
@@ -84,7 +26,7 @@ function _editEventId(id) {
}
function editEvent() {
var list = document.getElementById("appointmentsList");
var list = $("appointmentsList");
var nodes = list.getSelectedRowsId();
if (nodes.length > 0) {
@@ -156,7 +98,7 @@ function onDaySelect(node)
selectNode(td);
document.selectedDate = td;
changeDayDisplay(currentDay, null);
changeCalendarDisplay(currentDay, null);
if (listFilter == 'view_selectedday')
refreshAppointments();
@@ -176,14 +118,14 @@ function onCalendarGotoDay(node)
{
var day = node.getAttribute("date");
changeDayDisplay(day);
changeCalendarDisplay(day);
return false;
}
function gotoToday()
{
changeDayDisplay();
changeCalendarDisplay();
changeDateSelectorDisplay();
return false;
@@ -191,7 +133,7 @@ function gotoToday()
function dateSelectorCallback(http)
{
var div = document.getElementById("dateSelectorView");
var div = $("dateSelectorView");
log ("dateselectorcallback: " + div);
@@ -208,7 +150,7 @@ function dateSelectorCallback(http)
function appointmentsListCallback(http)
{
var div = document.getElementById("appointmentsListView");
var div = $("appointmentsListView");
if (http.readyState == 4
&& http.status == 200) {
@@ -278,14 +220,18 @@ function changeDateSelectorDisplay(day, event)
// log ('should go to ' + day);
}
function changeDayDisplay(day)
function changeCalendarDisplay(day, newView)
{
var url = ApplicationBaseURL + "dayview";
var url = ApplicationBaseURL + ((newView) ? newView : currentView);
if (!day)
day = currentCalendarDay;
if (day)
url += "?day=" + day;
log ("changeDayDisplay: " + url);
if (newView)
log ("switching to view: " + newView);
// log ("changeCalendarDisplay: " + url);
if (document.dayDisplayAjaxRequest) {
// log ("aborting day ajaxrq");
@@ -293,21 +239,48 @@ function changeDayDisplay(day)
document.dayDisplayAjaxRequest.abort();
}
document.dayDisplayAjaxRequest = triggerAjaxRequest(url,
dayDisplayCallback,
null);
calendarDisplayCallback,
{ "view": newView,
"day": day });
return false;
}
function dayDisplayCallback(http)
{
var div = document.getElementById("calendarView");
function _ensureView(view) {
if (currentView != view)
changeCalendarDisplay(null, view);
log ("daydisplaycallback: " + div);
return false;
}
function onDayOverview()
{
return _ensureView("dayview");
}
function onWeekOverview()
{
return _ensureView("weekview");
}
function onMonthOverview()
{
return _ensureView("monthview");
}
function calendarDisplayCallback(http)
{
var div = $("calendarView");
// log ("calendardisplaycallback: " + div);
if (http.readyState == 4
&& http.status == 200) {
document.dateSelectorAjaxRequest = null;
div.innerHTML = http.responseText;
if (http.callbackData["view"])
currentView = http.callbackData["view"];
if (http.callbackData["day"])
currentCalendarDay = http.callbackData["day"];
}
else
log ("ajax fuckage");
@@ -318,7 +291,7 @@ function popupCalendar(node)
var inputId = node.getAttribute("inputId");
var dateFormat = node.getAttribute("dateFormat");
var calendar = new skycalendar(document.getElementById(inputId));
var calendar = new skycalendar($(inputId));
calendar.setCalendarPage(ResourcesURL + "/skycalendar.html");
calendar.setDateFormat(dateFormat);
calendar.popup();
@@ -328,15 +301,15 @@ function popupCalendar(node)
function onAppointmentContextMenu(event, element)
{
var topNode = document.getElementById('appointmentsList');
var topNode = $('appointmentsList');
log(topNode);
var menu = document.getElementById('appointmentsListMenu');
var menu = $('appointmentsListMenu');
menu.addEventListener("hideMenu", onAppointmentContextMenuHide, false);
onMenuClick(event, 'appointmentsListMenu');
var topNode = document.getElementById('appointmentsList');
var topNode = $('appointmentsList');
var selectedNodes = topNode.getSelectedRows();
topNode.menuSelectedRows = selectedNodes;
for (var i = 0; i < selectedNodes.length; i++)
@@ -348,7 +321,7 @@ function onAppointmentContextMenu(event, element)
function onAppointmentContextMenuHide(event)
{
var topNode = document.getElementById('appointmentsList');
var topNode = $('appointmentsList');
if (topNode.menuSelectedEntry) {
deselectNode(topNode.menuSelectedEntry);
@@ -357,7 +330,7 @@ function onAppointmentContextMenuHide(event)
if (topNode.menuSelectedRows) {
var nodeIds = topNode.menuSelectedRows;
for (var i = 0; i < nodeIds.length; i++) {
var node = document.getElementById(nodeIds[i]);
var node = $(nodeIds[i]);
selectNode (node);
}
topNode.menuSelectedRows = null;
@@ -398,7 +371,7 @@ function refreshAppointments() {
}
function onListFilterChange() {
var node = document.getElementById("filterpopup");
var node = $("filterpopup");
listFilter = node.value;
// log ("listFilter = " + listFilter);
@@ -409,7 +382,7 @@ function onListFilterChange() {
function onAppointmentClick(event)
{
var node = event.target.getParentWithTagName("tr");
changeDayDisplay(node.getAttribute("day"));
changeCalendarDisplay(node.getAttribute("day"));
return onRowClick(event);
}
@@ -455,7 +428,7 @@ function popupMonthMenu(event, menuId)
if (document.currentPopupMenu)
hideMenu(event, document.currentPopupMenu);
var popup = document.getElementById(menuId);
var popup = $(menuId);
var id = node.getAttribute("id");
if (id == "monthLabel")
selectMonthInMenu(popup, node.getAttribute("month"));
@@ -477,7 +450,7 @@ function popupMonthMenu(event, menuId)
function onMonthMenuItemClick(node)
{
var month = '' + node.getAttribute("month");
var year = '' + document.getElementById("yearLabel").innerHTML;
var year = '' + $("yearLabel").innerHTML;
changeDateSelectorDisplay(year+month+"01");
@@ -486,7 +459,7 @@ function onMonthMenuItemClick(node)
function onYearMenuItemClick(node)
{
var month = '' + document.getElementById("monthLabel").getAttribute("month");;
var month = '' + $("monthLabel").getAttribute("month");;
var year = '' + node.innerHTML;
changeDateSelectorDisplay(year+month+"01");
+6 -3
View File
@@ -10,7 +10,7 @@ body
right: 0px;
bottom: 0px;
color: #000000;
font-family: Bitstream Vera Sans, Verdana, Tahoma, Arial, Helvetica, Geneva, sans-serif;
font-family: sans-serif;
font-size: small;
background-color: #dbdad5;
border: 0px;
@@ -316,8 +316,10 @@ TEXTAREA
-moz-border-left-colors: ThreeDShadow ThreeDDarkShadow transparent;
}
INPUT.button, INPUT.button:hover
INPUT.button
{
margin: 0px;
padding: 0px .5em;
border-top: 2px solid #fffffb;
border-left: 2px solid #fffffb;
border-bottom: 2px solid #888;
@@ -330,7 +332,7 @@ INPUT.button, INPUT.button:hover
INPUT.button:active
{
-moz-outline: 0px;
-moz-outline: none;
margin: 0px;
padding: 0px .5em;
color: -moz-buttonhovertext;
@@ -657,6 +659,7 @@ td img.tbtv_sortcell
td.tbtv_subject_headercell
{
width: 50%;
overflow: hidden;
}
/* drag handles */
+59
View File
@@ -27,6 +27,8 @@
var logConsole;
var queryParameters;
var activeAjaxRequests = 0;
// logArea = null;
var allDocumentElements = null;
@@ -171,6 +173,63 @@ function createHTTPClient() {
return null;
}
function triggerAjaxRequest(url, callback, userdata) {
this.http = createHTTPClient();
activeAjaxRequests += 1;
document.animTimer = setTimeout("checkAjaxRequestsState();", 200);
if (http) {
http.onreadystatechange
= function() {
// log ("state changed (" + http.readyState + "): " + url);
try {
if (http.readyState == 4
&& activeAjaxRequests > 0) {
if (!http.aborted) {
http.callbackData = userdata;
callback(http);
}
activeAjaxRequests -= 1;
checkAjaxRequestsState();
}
}
catch( e ) {
activeAjaxRequests -= 1;
checkAjaxRequestsState();
alert('AJAX Request, Caught Exception: ' + e.description);
}
};
http.url = url;
http.open("GET", url, true);
http.send("");
}
return http;
}
function checkAjaxRequestsState()
{
if (activeAjaxRequests > 0
&& !document.busyAnim) {
var anim = document.createElement("img");
document.busyAnim = anim;
anim.setAttribute("src", ResourcesURL + '/busy.gif');
anim.style.position = "absolute;";
anim.style.top = "2.5em;";
anim.style.right = "1em;";
anim.style.visibility = "hidden;";
anim.style.zindex = "1;";
var folderTree = document.getElementById("toolbar");
folderTree.appendChild(anim);
anim.style.visibility = "visible;";
} else if (activeAjaxRequests == 0
&& document.busyAnim) {
document.busyAnim.parentNode.removeChild(document.busyAnim);
document.busyAnim = null;
}
}
function resetSelection(win) {
var t = "";
if (win && win.getSelection) {