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-top-colors: ThreeDShadow ThreeDDarkShadow;
|
||||||
-moz-border-left-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 TH.attendees,
|
||||||
TABLE.freeBusy TD.attendees
|
TABLE.freeBusy TD.attendees
|
||||||
{ position: absolute;
|
{ position: absolute;
|
||||||
padding: 0px .5em;
|
padding: 0px .5em;
|
||||||
margin: 0px;
|
border: 0px !important;
|
||||||
background: #dbdad5 !important;
|
background: #dbdad5 !important;
|
||||||
width: 10em;
|
width: 10em;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
left: 1em;
|
left: 1em; }
|
||||||
border-bottom: 0px none;
|
|
||||||
border-right: 0px none; }
|
|
||||||
|
|
||||||
TABLE.freeBusy TD.attendees INPUT
|
TABLE.freeBusy TD.attendees INPUT
|
||||||
{ width: 100%; }
|
{ width: 95%; }
|
||||||
|
|
||||||
TABLE.freeBusy TR.freeBusyHeader2 TH
|
TABLE.freeBusy TR.freeBusyHeader2 TH
|
||||||
{ font-weight: normal; }
|
{ font-weight: normal; }
|
||||||
|
@ -502,18 +506,18 @@ TABLE.freeBusy TR.freeBusyHeader3 TH
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border-collapse: collapse; }
|
border-collapse: collapse; }
|
||||||
|
|
||||||
TABLE.freeBusy TR.freeBusyHeader3 TH
|
|
||||||
{ border: 0px;
|
|
||||||
padding: 0px;
|
|
||||||
margin: 0px;
|
|
||||||
border-bottom: 1px solid #cecbff; }
|
|
||||||
|
|
||||||
TABLE.freeBusy TR.freeBusyHeader2 TH
|
TABLE.freeBusy TR.freeBusyHeader2 TH
|
||||||
{ width: 5em; }
|
{ width: 6em; }
|
||||||
|
|
||||||
|
TABLE.freeBusy TR.freeBusyHeader3 TH
|
||||||
|
{ border-bottom: 1px solid #cecbff; }
|
||||||
|
|
||||||
TABLE.freeBusy TR.attendeeModel
|
TABLE.freeBusy TR.attendeeModel
|
||||||
{ display: none; }
|
{ display: none; }
|
||||||
|
|
||||||
|
TABLE.freeBusy TR.futureAttendee TD
|
||||||
|
{ border-right: none; }
|
||||||
|
|
||||||
TABLE.freeBusy TD
|
TABLE.freeBusy TD
|
||||||
{ border-bottom: 1px solid #cecbff;
|
{ border-bottom: 1px solid #cecbff;
|
||||||
border-right: 1px solid #cecbff;
|
border-right: 1px solid #cecbff;
|
||||||
|
@ -521,19 +525,29 @@ TABLE.freeBusy TD
|
||||||
background: #fff; }
|
background: #fff; }
|
||||||
|
|
||||||
TABLE.freeBusy TD.noFreeBusy
|
TABLE.freeBusy TD.noFreeBusy
|
||||||
{ background: #bbb;
|
{ background: #559;
|
||||||
border-right: 0px; }
|
border-right: 0px; }
|
||||||
|
|
||||||
SPAN.freeBusyZoneElement
|
SPAN.freeBusyZoneElement
|
||||||
{ display: block;
|
{ display: block;
|
||||||
float: left;
|
float: left;
|
||||||
width: 25%; }
|
width: 25%;
|
||||||
|
margin: 0px;
|
||||||
|
padding: 0px;
|
||||||
|
border: 0px; }
|
||||||
|
|
||||||
TABLE.freeBusy TR.freeBusyHeader3 SPAN.freeBusyZoneElement
|
TABLE.freeBusy TR.freeBusyHeader3 SPAN.freeBusyZoneElement
|
||||||
{ height: .25em; }
|
{ height: .25em; }
|
||||||
|
|
||||||
TABLE.freeBusy TD SPAN.freeBusyZoneElement
|
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
|
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 address;
|
||||||
var delay = 500;
|
var delay = 500;
|
||||||
var requestField;
|
var requestField;
|
||||||
|
var awaitingFreeBusyRequests = new Array();
|
||||||
|
var freeBusySelectorId;
|
||||||
|
|
||||||
function onContactKeyUp(node, event)
|
function onContactKeyUp(node, event)
|
||||||
{
|
{
|
||||||
|
@ -140,12 +142,13 @@ function checkAttendee(node)
|
||||||
displayFreeBusyForNode(node);
|
displayFreeBusyForNode(node);
|
||||||
node.hasfreebusy = true;
|
node.hasfreebusy = true;
|
||||||
}
|
}
|
||||||
|
resetAttendeesValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
function displayFreeBusyForNode(node)
|
function displayFreeBusyForNode(node)
|
||||||
{
|
{
|
||||||
|
var nodes = node.parentNode.parentNode.cells;
|
||||||
if (node.uid) {
|
if (node.uid) {
|
||||||
var nodes = node.parentNode.parentNode.cells;
|
|
||||||
for (var i = 1; i < nodes.length; i++) {
|
for (var i = 1; i < nodes.length; i++) {
|
||||||
nodes[i].removeClassName("noFreeBusy");
|
nodes[i].removeClassName("noFreeBusy");
|
||||||
nodes[i].innerHTML = ('<span class="freeBusyZoneElement"></span>'
|
nodes[i].innerHTML = ('<span class="freeBusyZoneElement"></span>'
|
||||||
|
@ -160,12 +163,12 @@ function displayFreeBusyForNode(node)
|
||||||
var sd = startDayAsShortString();
|
var sd = startDayAsShortString();
|
||||||
var ed = endDayAsShortString();
|
var ed = endDayAsShortString();
|
||||||
var urlstr = ( UserFolderURL + "../" + node.uid + "/freebusy.ifb/ajaxRead?"
|
var urlstr = ( UserFolderURL + "../" + node.uid + "/freebusy.ifb/ajaxRead?"
|
||||||
+ "sday=" + sd + "&eday=" + ed);
|
+ "sday=" + sd + "&eday=" + ed + "&additional=2" );
|
||||||
document.contactFreeBusyAjaxRequest = triggerAjaxRequest(urlstr,
|
document.contactFreeBusyAjaxRequest
|
||||||
updateFreeBusyData,
|
= triggerAjaxRequest(urlstr,
|
||||||
node);
|
updateFreeBusyData,
|
||||||
|
node);
|
||||||
} else {
|
} else {
|
||||||
var nodes = node.parentNode.parentNode.cells;
|
|
||||||
for (var i = 1; i < nodes.length; i++) {
|
for (var i = 1; i < nodes.length; i++) {
|
||||||
nodes[i].addClassName("noFreeBusy");
|
nodes[i].addClassName("noFreeBusy");
|
||||||
nodes[i].innerHTML = '';
|
nodes[i].innerHTML = '';
|
||||||
|
@ -185,7 +188,10 @@ function setSlot(tds, nbr, status) {
|
||||||
var i = (days * 11 + tdnbr - 7);
|
var i = (days * 11 + tdnbr - 7);
|
||||||
var td = tds[i];
|
var td = tds[i];
|
||||||
var spans = td.childNodesWithTag("span");
|
var spans = td.childNodesWithTag("span");
|
||||||
spans[spannbr].addClassName("busy");
|
if (status == '2')
|
||||||
|
spans[spannbr].addClassName("maybe-busy");
|
||||||
|
else
|
||||||
|
spans[spannbr].addClassName("busy");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -202,5 +208,47 @@ function updateFreeBusyData(http)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
document.contactFreeBusyAjaxRequest = null;
|
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