mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-06-23 19:04:18 +00:00
Mantis 78
Monotone-Parent: 244b022b573e6f31bb6d274bcd23e14acd12414b Monotone-Revision: f9dd483f39d42723f222b997f3c1e66833300458 Monotone-Author: crobert@inverse.ca Monotone-Date: 2009-07-27T12:48:27 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -121,20 +121,22 @@ A#attendeesHref
|
||||
{ color: #00f;
|
||||
text-decoration: underline; }
|
||||
|
||||
DIV#attendeesMenu LI
|
||||
DIV#attendeesMenu *
|
||||
{ padding-left: 20px; }
|
||||
|
||||
DIV#attendeesMenu LI.accepted
|
||||
DIV#
|
||||
|
||||
DIV#attendeesMenu .accepted
|
||||
{ background-image: url("accepted.png");
|
||||
background-repeat: no-repeat;
|
||||
background-position: 5px center; }
|
||||
|
||||
DIV#attendeesMenu LI.needs-action
|
||||
DIV#attendeesMenu .needs-action
|
||||
{ background-image: url("needs-action.png");
|
||||
background-repeat: no-repeat;
|
||||
background-position: 5px center; }
|
||||
|
||||
DIV#attendeesMenu LI.declined
|
||||
DIV#attendeesMenu .declined
|
||||
{ background-image: url("declined.png");
|
||||
background-repeat: no-repeat;
|
||||
background-position: 5px center; }
|
||||
|
||||
@@ -334,15 +334,55 @@ function initTimeWidgets(widgets) {
|
||||
}
|
||||
}
|
||||
|
||||
function refreshAttendeesRO () {
|
||||
var attendeesNames = $("attendeesNames").value;
|
||||
var attendeesEmails = $("attendeesEmails").value.split(",");
|
||||
var attendeesStates = $("attendeesStates").value.split(",");
|
||||
var attendeesMenu = $("attendeesMenu");
|
||||
|
||||
if (attendeesMenu) {
|
||||
for (var i = 0; i < attendeesMenu.childNodes.length; i++)
|
||||
attendeesMenu.removeChild (attendeesMenu.childNodes[i]);
|
||||
}
|
||||
|
||||
if (attendeesNames.length > 0) {
|
||||
// Update attendees link and show label
|
||||
attendeesLabel.setStyle({ display: "block" });
|
||||
|
||||
// Update attendees in menu
|
||||
attendeesNames = attendeesNames.split(",");
|
||||
for (var i = 0; i < attendeesEmails.length; i++) {
|
||||
var node = document.createElement("div");
|
||||
if (attendeesMenu)
|
||||
attendeesMenu.appendChild(node);
|
||||
$(node).writeAttribute("email", attendeesEmails[i]);
|
||||
$(node).addClassName("attendee");
|
||||
$(node).addClassName(attendeesStates[i]);
|
||||
node.appendChild(document.createTextNode(attendeesNames[i]));
|
||||
$(node).observe("click", onMailTo);
|
||||
}
|
||||
}
|
||||
else {
|
||||
// Hide link of attendees
|
||||
attendeesLabel.setStyle({ display: "none" });
|
||||
if ($("attendeesDiv"))
|
||||
$("attendeesDiv").setStyle({display: "none"});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function refreshAttendees() {
|
||||
var attendeesLabel = $("attendeesLabel");
|
||||
var attendeesNames = $("attendeesNames").value;
|
||||
var attendeesEmails = $("attendeesEmails").value.split(",");
|
||||
var attendeesStates = $("attendeesStates").value.split(",");
|
||||
var attendeesHref = $("attendeesHref");
|
||||
var attendeesMenu = null;
|
||||
var attendeesMenu = $("attendeesMenu");
|
||||
|
||||
if ($("attendeesMenu"))
|
||||
if (!attendeesHref)
|
||||
return refreshAttendeesRO ();
|
||||
|
||||
if (attendeesMenu)
|
||||
attendeesMenu = $("attendeesMenu").down("ul");
|
||||
|
||||
// Remove link of attendees
|
||||
@@ -384,7 +424,7 @@ function initializeAttendeesHref() {
|
||||
var attendeesLabel = $("attendeesLabel");
|
||||
var attendeesNames = $("attendeesNames");
|
||||
|
||||
if (!attendeesHref.hasClassName ("nomenu"))
|
||||
if (attendeesHref && !attendeesHref.hasClassName ("nomenu"))
|
||||
attendeesHref.observe("click", onAttendeesHrefClick, false);
|
||||
refreshAttendees();
|
||||
}
|
||||
|
||||
@@ -41,3 +41,53 @@ LABEL#commentArea textarea
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
margin-left: 1px; }
|
||||
|
||||
SPAN.headerContent
|
||||
{
|
||||
width: 80%;
|
||||
height: 1px;
|
||||
background: #aaaaaa;
|
||||
top: 0.9em;
|
||||
}
|
||||
LABEL.title
|
||||
{
|
||||
margin-top: 20px;
|
||||
font-weight: bold;
|
||||
}
|
||||
LABEL.titleNoSpace
|
||||
{
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
DIV#windowButtons
|
||||
{
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
bottom: 4em;
|
||||
}
|
||||
|
||||
LABEL.calendarName
|
||||
{ text-align: right;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
width: 97%;
|
||||
}
|
||||
|
||||
DIV#attendeesMenu
|
||||
{ overflow: auto; }
|
||||
|
||||
DIV.fakeTextArea
|
||||
{ overflow: auto;
|
||||
background: white;
|
||||
border-width: 2px;
|
||||
border-style: inset;
|
||||
padding: 2px;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
DIV#descriptionDiv {
|
||||
height: 80px;
|
||||
}
|
||||
SPAN.fixedHeight {
|
||||
height: 60px;
|
||||
}
|
||||
|
||||
@@ -138,15 +138,21 @@ function onComponentEditorLoad(event) {
|
||||
false);
|
||||
}
|
||||
|
||||
$("repeatHref").observe("click", onPopupRecurrenceWindow);
|
||||
if ($("repeatList"))
|
||||
$("repeatList").observe("change", onPopupRecurrenceWindow);
|
||||
if ($("reminderHref"))
|
||||
$("reminderHref").observe("click", onPopupReminderWindow);
|
||||
if ($("reminderList"))
|
||||
$("reminderList").observe("change", onPopupReminderWindow);
|
||||
if ($("summary"))
|
||||
$("summary").observe("keyup", onSummaryChange);
|
||||
var tmp = $("repeatHref");
|
||||
if (tmp)
|
||||
tmp.observe("click", onPopupRecurrenceWindow);
|
||||
tmp = $("repeatList");
|
||||
if (tmp)
|
||||
tmp.observe("change", onPopupRecurrenceWindow);
|
||||
tmp = $("reminderHref");
|
||||
if (tmp)
|
||||
tmp.observe("click", onPopupReminderWindow);
|
||||
tmp = $("reminderList");
|
||||
if (tmp)
|
||||
tmp.observe("change", onPopupReminderWindow);
|
||||
tmp = $("summary");
|
||||
if (tmp)
|
||||
tmp.observe("keyup", onSummaryChange);
|
||||
|
||||
Event.observe(window, "resize", onWindowResize);
|
||||
|
||||
@@ -159,6 +165,18 @@ function onComponentEditorLoad(event) {
|
||||
summary.focus();
|
||||
summary.selectText(0, summary.value.length);
|
||||
}
|
||||
|
||||
tmp = $("okButton");
|
||||
if (tmp)
|
||||
tmp.observe ("click", onOkButtonClick);
|
||||
tmp = $("cancelButton");
|
||||
if (tmp)
|
||||
tmp.observe ("click", onCancelButtonClick);
|
||||
|
||||
if (tmp)
|
||||
window.resizeTo(430,540)
|
||||
|
||||
|
||||
}
|
||||
|
||||
function onSummaryChange (e) {
|
||||
@@ -169,22 +187,37 @@ function onSummaryChange (e) {
|
||||
function onWindowResize(event) {
|
||||
var document = $("documentLabel");
|
||||
var comment = $("commentArea");
|
||||
var area = comment.select("textarea").first();
|
||||
var offset = 6;
|
||||
var height;
|
||||
if (comment) {
|
||||
var area = comment.select("textarea").first();
|
||||
var offset = 6;
|
||||
var height;
|
||||
|
||||
height = window.height() - comment.cumulativeOffset().top - offset;
|
||||
height = window.height() - comment.cumulativeOffset().top - offset;
|
||||
|
||||
if (document.visible()) {
|
||||
if ($("changeAttachButton"))
|
||||
height -= $("changeAttachButton").getHeight();
|
||||
else
|
||||
height -= $("documentHref").getHeight();
|
||||
}
|
||||
if (document.visible()) {
|
||||
if ($("changeAttachButton"))
|
||||
height -= $("changeAttachButton").getHeight();
|
||||
else
|
||||
height -= $("documentHref").getHeight();
|
||||
}
|
||||
|
||||
if (area)
|
||||
area.setStyle({ height: (height - offset*2) + "px" });
|
||||
comment.setStyle({ height: (height - offset) + "px" });
|
||||
if (area)
|
||||
area.setStyle({ height: (height - offset*2) + "px" });
|
||||
comment.setStyle({ height: (height - offset) + "px" });
|
||||
}
|
||||
else {
|
||||
$("eventView").style.height = window.height () + "px";
|
||||
var height = window.height() - 120;
|
||||
var tmp = $("generalDiv");
|
||||
if (tmp)
|
||||
height -= tmp.offsetHeight;
|
||||
tmp = $("descriptionDiv");
|
||||
if (tmp)
|
||||
height -= tmp.offsetHeight;
|
||||
|
||||
$("attendeesDiv").style.height = height + "px";
|
||||
$("attendeesMenu").style.height = (height - 20) + "px";
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -195,13 +228,14 @@ function onPopupRecurrenceWindow(event) {
|
||||
|
||||
var repeatHref = $("repeatHref");
|
||||
|
||||
if ($("repeatList") && $("repeatList").value == 7) {
|
||||
var repeatList = $("repeatList");
|
||||
if (repeatList && repeatList.value == 7) {
|
||||
repeatHref.show();
|
||||
if (event)
|
||||
window.open(ApplicationBaseURL + "editRecurrence", null,
|
||||
"width=500,height=400");
|
||||
}
|
||||
else
|
||||
else if (repeatHref)
|
||||
repeatHref.hide();
|
||||
|
||||
return false;
|
||||
@@ -213,7 +247,8 @@ function onPopupReminderWindow(event) {
|
||||
|
||||
var reminderHref = $("reminderHref");
|
||||
|
||||
if ($("reminderList") && $("reminderList").value == 15) {
|
||||
var reminderList = $("reminderList");
|
||||
if (reminderList && reminderList.value == 15) {
|
||||
reminderHref.show();
|
||||
if (event)
|
||||
window.open(ApplicationBaseURL + "editReminder", null,
|
||||
@@ -225,4 +260,22 @@ function onPopupReminderWindow(event) {
|
||||
return false;
|
||||
}
|
||||
|
||||
function onOkButtonClick (e) {
|
||||
var item = $("replyList");
|
||||
var value = parseInt(item.options[item.selectedIndex].value);
|
||||
var action = "";
|
||||
|
||||
if (value == 0)
|
||||
action = 'accept';
|
||||
else if (value == 1)
|
||||
action = 'decline';
|
||||
|
||||
if (action != "")
|
||||
modifyEvent (item, action);
|
||||
}
|
||||
|
||||
function onCancelButtonClick (e) {
|
||||
window.close ();
|
||||
}
|
||||
|
||||
document.observe("dom:loaded", onComponentEditorLoad);
|
||||
|
||||
Reference in New Issue
Block a user