Monotone-Parent: c033959aa88812d1a781175679569b9f48e74d12
Monotone-Revision: d055fa1fca7ca1d2c2be96916837e95fdddcac10 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2006-10-26T16:43:50 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
parent
0f8f3baa33
commit
29d78bf10f
|
@ -476,20 +476,24 @@ DIV.freeBusyView
|
|||
-moz-border-top-colors: ThreeDShadow ThreeDDarkShadow;
|
||||
-moz-border-left-colors: ThreeDShadow ThreeDDarkShadow; }
|
||||
|
||||
TABLE.freeBusy TD,
|
||||
TABLE.freeBusy TH
|
||||
{ padding: 0px;
|
||||
margin: 0px;
|
||||
border: 0px; }
|
||||
|
||||
TABLE.freeBusy TH.attendees,
|
||||
TABLE.freeBusy TD.attendees
|
||||
{ position: absolute;
|
||||
padding: 0px .5em;
|
||||
margin: 0px;
|
||||
border: 0px !important;
|
||||
background: #dbdad5 !important;
|
||||
width: 10em;
|
||||
overflow: hidden;
|
||||
left: 1em;
|
||||
border-bottom: 0px none;
|
||||
border-right: 0px none; }
|
||||
left: 1em; }
|
||||
|
||||
TABLE.freeBusy TD.attendees INPUT
|
||||
{ width: 100%; }
|
||||
{ width: 95%; }
|
||||
|
||||
TABLE.freeBusy TR.freeBusyHeader2 TH
|
||||
{ font-weight: normal; }
|
||||
|
@ -502,18 +506,18 @@ TABLE.freeBusy TR.freeBusyHeader3 TH
|
|||
background: #fff;
|
||||
border-collapse: collapse; }
|
||||
|
||||
TABLE.freeBusy TR.freeBusyHeader3 TH
|
||||
{ border: 0px;
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
border-bottom: 1px solid #cecbff; }
|
||||
|
||||
TABLE.freeBusy TR.freeBusyHeader2 TH
|
||||
{ width: 5em; }
|
||||
{ width: 6em; }
|
||||
|
||||
TABLE.freeBusy TR.freeBusyHeader3 TH
|
||||
{ border-bottom: 1px solid #cecbff; }
|
||||
|
||||
TABLE.freeBusy TR.attendeeModel
|
||||
{ display: none; }
|
||||
|
||||
TABLE.freeBusy TR.futureAttendee TD
|
||||
{ border-right: none; }
|
||||
|
||||
TABLE.freeBusy TD
|
||||
{ border-bottom: 1px solid #cecbff;
|
||||
border-right: 1px solid #cecbff;
|
||||
|
@ -521,19 +525,29 @@ TABLE.freeBusy TD
|
|||
background: #fff; }
|
||||
|
||||
TABLE.freeBusy TD.noFreeBusy
|
||||
{ background: #bbb;
|
||||
{ background: #559;
|
||||
border-right: 0px; }
|
||||
|
||||
SPAN.freeBusyZoneElement
|
||||
{ display: block;
|
||||
float: left;
|
||||
width: 25%; }
|
||||
width: 25%;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
border: 0px; }
|
||||
|
||||
TABLE.freeBusy TR.freeBusyHeader3 SPAN.freeBusyZoneElement
|
||||
{ height: .25em; }
|
||||
|
||||
TABLE.freeBusy TD SPAN.freeBusyZoneElement
|
||||
{ height: 100%; }
|
||||
{ height: 100%;
|
||||
background-color: #8ca6bd; }
|
||||
|
||||
TABLE.freeBusy TH SPAN[class~="freeBusyZoneElement"].busy
|
||||
{ background-color: #c55 !important; }
|
||||
|
||||
SPAN[class~="freeBusyZoneElement"].busy
|
||||
{ background-color: #c55; }
|
||||
{ background-color: #5a6b79 !important; }
|
||||
|
||||
SPAN[class~="freeBusyZoneElement"].maybe-busy
|
||||
{ background-color: #adc0d0 !important; }
|
||||
|
|
|
@ -4,6 +4,8 @@ var running = false;
|
|||
var address;
|
||||
var delay = 500;
|
||||
var requestField;
|
||||
var awaitingFreeBusyRequests = new Array();
|
||||
var freeBusySelectorId;
|
||||
|
||||
function onContactKeyUp(node, event)
|
||||
{
|
||||
|
@ -140,12 +142,13 @@ function checkAttendee(node)
|
|||
displayFreeBusyForNode(node);
|
||||
node.hasfreebusy = true;
|
||||
}
|
||||
resetAttendeesValue();
|
||||
}
|
||||
|
||||
function displayFreeBusyForNode(node)
|
||||
{
|
||||
if (node.uid) {
|
||||
var nodes = node.parentNode.parentNode.cells;
|
||||
if (node.uid) {
|
||||
for (var i = 1; i < nodes.length; i++) {
|
||||
nodes[i].removeClassName("noFreeBusy");
|
||||
nodes[i].innerHTML = ('<span class="freeBusyZoneElement"></span>'
|
||||
|
@ -160,12 +163,12 @@ function displayFreeBusyForNode(node)
|
|||
var sd = startDayAsShortString();
|
||||
var ed = endDayAsShortString();
|
||||
var urlstr = ( UserFolderURL + "../" + node.uid + "/freebusy.ifb/ajaxRead?"
|
||||
+ "sday=" + sd + "&eday=" + ed);
|
||||
document.contactFreeBusyAjaxRequest = triggerAjaxRequest(urlstr,
|
||||
+ "sday=" + sd + "&eday=" + ed + "&additional=2" );
|
||||
document.contactFreeBusyAjaxRequest
|
||||
= triggerAjaxRequest(urlstr,
|
||||
updateFreeBusyData,
|
||||
node);
|
||||
} else {
|
||||
var nodes = node.parentNode.parentNode.cells;
|
||||
for (var i = 1; i < nodes.length; i++) {
|
||||
nodes[i].addClassName("noFreeBusy");
|
||||
nodes[i].innerHTML = '';
|
||||
|
@ -185,6 +188,9 @@ function setSlot(tds, nbr, status) {
|
|||
var i = (days * 11 + tdnbr - 7);
|
||||
var td = tds[i];
|
||||
var spans = td.childNodesWithTag("span");
|
||||
if (status == '2')
|
||||
spans[spannbr].addClassName("maybe-busy");
|
||||
else
|
||||
spans[spannbr].addClassName("busy");
|
||||
}
|
||||
}
|
||||
|
@ -202,5 +208,47 @@ function updateFreeBusyData(http)
|
|||
}
|
||||
}
|
||||
document.contactFreeBusyAjaxRequest = null;
|
||||
if (awaitingFreeBusyRequests.length > 0)
|
||||
displayFreeBusyForNode(awaitingFreeBusyRequests.shift());
|
||||
}
|
||||
}
|
||||
|
||||
function resetAttendeesValue()
|
||||
{
|
||||
var table = $("attendeesView").childNodesWithTag("div")[0].childNodesWithTag("table")[0];
|
||||
var inputs = table.getElementsByTagName("input");
|
||||
var uids = new Array();
|
||||
for (var i = 0; i < inputs.length - 2; i++) {
|
||||
var currentInput = inputs[i];
|
||||
var uid = currentInput.getAttribute("uid");
|
||||
if (uid) {
|
||||
currentInput.uid = uid;
|
||||
currentInput.setAttribute("uid", null);
|
||||
}
|
||||
uids.push(currentInput.uid);
|
||||
}
|
||||
var input = $(freeBusySelectorId);
|
||||
input.value = uids.join(",");
|
||||
}
|
||||
|
||||
function initializeFreeBusyUserSelector(selectorId)
|
||||
{
|
||||
freeBusySelectorId = selectorId;
|
||||
resetAttendeesValue();
|
||||
resetAllFreeBusys();
|
||||
}
|
||||
|
||||
function resetAllFreeBusys()
|
||||
{
|
||||
var table = $("attendeesView").childNodesWithTag("div")[0].childNodesWithTag("table")[0];
|
||||
var inputs = table.getElementsByTagName("input");
|
||||
|
||||
for (var i = 0; i < inputs.length - 2; i++) {
|
||||
var currentInput = inputs[i];
|
||||
currentInput.hasfreebusy = false;
|
||||
log ("input: " + currentInput.uid);
|
||||
awaitingFreeBusyRequests.push(currentInput);
|
||||
}
|
||||
if (awaitingFreeBusyRequests.length > 0)
|
||||
displayFreeBusyForNode(awaitingFreeBusyRequests.shift());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue