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
maint-2.0.2
C Robert 2009-07-27 12:48:27 +00:00
parent 949d2af8cc
commit 1acef513be
18 changed files with 403 additions and 163 deletions

View File

@ -214,6 +214,8 @@
"Category:" = "Categoria:";
"Repeat:" = "Repetir:";
"Reminder:" = "Lembrete:";
"General:" = "General:";
"Reply:" = "Reply:";
"Target:" = "Target:";

View File

@ -214,6 +214,8 @@
"Category:" = "Kategorie:";
"Repeat:" = "Opakování:";
"Reminder:" = "Upomínka:";
"General:" = "General:";
"Reply:" = "Reply:";
"Target:" = "Cíl:";

View File

@ -208,6 +208,8 @@
"Category:" = "Categorie:";
"Repeat:" = "Herhalen:";
"Reminder:" = "Alarm:";
"General:" = "General:";
"Reply:" = "Reply:";
"Target:" = "Bestemming:";

View File

@ -214,6 +214,8 @@
"Category:" = "Category:";
"Repeat:" = "Repeat:";
"Reminder:" = "Reminder:";
"General:" = "General:";
"Reply:" = "Reply:";
"Target:" = "Target:";

View File

@ -212,6 +212,8 @@
"Category:" = "Catégorie :";
"Repeat:" = "Répétition :";
"Reminder:" = "Rappel :";
"General:" = "Général:";
"Reply:" = "Réponse:";
"Target:" = "Destination :";

View File

@ -57,7 +57,8 @@ SchedulerUI_RESOURCE_FILES += \
Toolbars/SOGoAppointmentObjectDecline.toolbar \
Toolbars/SOGoAppointmentObjectAcceptOrDecline.toolbar \
Toolbars/SOGoTaskObject.toolbar \
Toolbars/SOGoComponentClose.toolbar
Toolbars/SOGoComponentClose.toolbar \
Toolbars/SOGoEmpty.toolbar
SchedulerUI_LOCALIZED_RESOURCE_FILES += \
Localizable.strings \

View File

@ -211,6 +211,9 @@
"Category:" = "Kategorie:";
"Repeat:" = "Wiederholen:";
"Reminder:" = "Alarm:";
"General:" = "General:";
"Reply:" = "Reply:";
"Target:" = "Destination :";

View File

@ -213,6 +213,8 @@
"Category:" = "Categoria:";
"Repeat:" = "Ripeti:";
"Reminder:" = "Promemoria:";
"General:" = "General:";
"Reply:" = "Reply:";
"Target:" = "Percorso:";

View File

@ -213,6 +213,8 @@
"Category:" = "Category:";
"Repeat:" = "Repeat:";
"Reminder:" = "Reminder:";
"General:" = "General:";
"Reply:" = "Reply:";
"Target:" = "Target:";

View File

@ -218,6 +218,8 @@
"Category:" = "Categoría:";
"Repeat:" = "Repetir:";
"Reminder:" = "Recordatorio:";
"General:" = "General:";
"Reply:" = "Reply:";
"Target:" = "URL documento:";

View File

@ -0,0 +1,2 @@
( /* the toolbar groups -*-cperl-*- */
)

View File

@ -27,6 +27,7 @@
#import <Foundation/NSCalendarDate.h>
#import <Foundation/NSKeyValueCoding.h>
#import <Foundation/NSString.h>
#import <Foundation/NSValue.h>
#import <Foundation/NSUserDefaults.h>
#import <Foundation/NSURL.h>
@ -793,6 +794,11 @@ iRANGE(2);
return location;
}
- (BOOL) hasLocation
{
return [location length] > 0;
}
- (void) setComment: (NSString *) _value
{
ASSIGN (comment, _value);
@ -803,6 +809,11 @@ iRANGE(2);
return comment;
}
- (BOOL) hasComment
{
return [comment length] > 0;
}
- (NSArray *) categoryList
{
NSMutableArray *categoryList;
@ -843,6 +854,11 @@ iRANGE(2);
return category;
}
- (BOOL) hasCategory
{
return [category length] > 0;
}
- (NSArray *) repeatList
{
static NSArray *repeatItems = nil;
@ -935,6 +951,38 @@ iRANGE(2);
ASSIGN(repeat, newRepeat);
}
- (BOOL) hasRepeat
{
return [repeat length] > 0;
}
- (NSString *) itemReplyText
{
NSString *word;
if ([item intValue] == iCalPersonPartStatAccepted)
word = @"ACCEPTED";
else if ([item intValue] == iCalPersonPartStatDeclined)
word = @"DECLINED";
return [self labelForKey: [NSString stringWithFormat: @"partStat_%@", word]];
}
- (NSArray *) replyList
{
return [NSArray arrayWithObjects:
[NSNumber numberWithInt: iCalPersonPartStatAccepted],
[NSNumber numberWithInt: iCalPersonPartStatDeclined], nil];
}
- (NSNumber *) reply
{
iCalPersonPartStat participationStatus;
participationStatus = [[component findParticipant: [context activeUser]] participationStatus];
return [NSNumber numberWithInt: participationStatus];
}
- (NSString *) _permissionForEditing
{
NSString *perm;
@ -1013,6 +1061,11 @@ iRANGE(2);
return componentCalendar;
}
- (NSString *) componentCalendarName
{
return [componentCalendar displayName];
}
- (void) setComponentCalendar: (SOGoAppointmentFolder *) _componentCalendar
{
ASSIGN(componentCalendar, _componentCalendar);
@ -1048,6 +1101,11 @@ iRANGE(2);
return priority;
}
- (BOOL) hasPriority
{
return [priority length] > 0;
}
- (NSArray *) privacyClasses
{
static NSArray *priorities = nil;
@ -1832,7 +1890,6 @@ RANGE(2);
andClientObject: (SOGoContentObject
<SOGoComponentOccurence> *) clientObject
{
iCalPersonPartStat participationStatus;
NSString *toolbarFilename;
BOOL isOrganizer;
@ -1844,9 +1901,7 @@ RANGE(2);
isOrganizer = [component userIsOrganizer: ownerUser];
if (isOrganizer)
{
isOrganizer = ![ownerUser hasEmail: [[component organizer] sentBy]];
}
isOrganizer = ![ownerUser hasEmail: [[component organizer] sentBy]];
if ([[component attendees] count]
&& [component userIsParticipant: ownerUser]
@ -1855,22 +1910,13 @@ RANGE(2);
// so we also ignore the participation status of tasks in the
// web interface.
&& ![[component tag] isEqualToString: @"VTODO"])
{
participationStatus
= [[component findParticipant: ownerUser] participationStatus];
if (participationStatus == iCalPersonPartStatAccepted)
toolbarFilename = @"SOGoAppointmentObjectDecline.toolbar";
else if (participationStatus == iCalPersonPartStatDeclined)
toolbarFilename = @"SOGoAppointmentObjectAccept.toolbar";
else
toolbarFilename = @"SOGoAppointmentObjectAcceptOrDecline.toolbar";
}
toolbarFilename = @"SOGoEmpty.toolbar";
else
{
if ([clientObject isKindOfClass: [SOGoAppointmentObject class]])
toolbarFilename = @"SOGoAppointmentObject.toolbar";
toolbarFilename = @"SOGoAppointmentObject.toolbar";
else
toolbarFilename = @"SOGoTaskObject.toolbar";
toolbarFilename = @"SOGoTaskObject.toolbar";
}
return toolbarFilename;
@ -1882,7 +1928,6 @@ RANGE(2);
{
SoSecurityManager *sm;
NSString *toolbarFilename, *adminToolbar;
iCalPersonPartStat participationStatus;
SOGoUser *currentUser;
if ([clientObject isKindOfClass: [SOGoAppointmentObject class]])
@ -1894,29 +1939,12 @@ RANGE(2);
sm = [SoSecurityManager sharedSecurityManager];
if (![sm validatePermission: SOGoCalendarPerm_ModifyComponent
onObject: clientObject
inContext: context])
onObject: clientObject
inContext: context])
toolbarFilename = [self _toolbarForOwner: ownerUser
andClientObject: clientObject];
else if (![sm validatePermission: SOGoCalendarPerm_RespondToComponent
onObject: clientObject
inContext: context]
&& [[component attendees] count]
&& [component userIsParticipant: ownerUser]
&& ![component userIsOrganizer: ownerUser])
{
participationStatus
= [[component findParticipant: ownerUser] participationStatus];
/* Lightning does not manage participation status within tasks */
if (participationStatus == iCalPersonPartStatAccepted)
toolbarFilename = @"SOGoAppointmentObjectDecline.toolbar";
else if (participationStatus == iCalPersonPartStatDeclined)
toolbarFilename = @"SOGoAppointmentObjectAccept.toolbar";
else
toolbarFilename = @"SOGoAppointmentObjectAcceptOrDecline.toolbar";
}
andClientObject: clientObject];
else
toolbarFilename = @"SOGoComponentClose.toolbar";
toolbarFilename = @"SOGoEmpty.toolbar";
return toolbarFilename;
}
@ -1943,11 +1971,12 @@ RANGE(2);
}
- (BOOL) ownerIsAttendee: (SOGoUser *) ownerUser
- (int) ownerIsAttendee: (SOGoUser *) ownerUser
andClientObject: (SOGoContentObject
<SOGoComponentOccurence> *) clientObject
{
BOOL isOrganizer, rc = NO;
BOOL isOrganizer;
int rc = 0;
isOrganizer = [component userIsOrganizer: ownerUser];
if (isOrganizer)
@ -1957,18 +1986,18 @@ RANGE(2);
&& [component userIsParticipant: ownerUser]
&& !isOrganizer
&& ![[component tag] isEqualToString: @"VTODO"])
rc = YES;
rc = 1;
return rc;
}
- (BOOL) delegateIsAttendee: (SOGoUser *) ownerUser
- (int) delegateIsAttendee: (SOGoUser *) ownerUser
andClientObject: (SOGoContentObject
<SOGoComponentOccurence> *) clientObject
{
SoSecurityManager *sm;
SOGoUser *currentUser;
BOOL rc = NO;
int rc = 0;
currentUser = [context activeUser];
sm = [SoSecurityManager sharedSecurityManager];
@ -1984,18 +2013,18 @@ RANGE(2);
&& [[component attendees] count]
&& [component userIsParticipant: ownerUser]
&& ![component userIsOrganizer: ownerUser])
rc = YES;
rc = 1;
else
rc = YES;
rc = 2; // not invited, just RO
return rc;
}
- (BOOL) eventIsReadOnly
- (int) getEventRWType
{
SOGoContentObject <SOGoComponentOccurence> *clientObject;
SOGoUser *ownerUser;
BOOL rc = NO;
int rc = 0;
clientObject = [self clientObject];
ownerUser = [SOGoUser userWithLogin: [clientObject ownerInContext: context]
@ -2008,14 +2037,22 @@ RANGE(2);
rc = [self delegateIsAttendee: ownerUser
andClientObject: clientObject];
return rc;
}
- (NSString *) startDateString
- (BOOL) eventIsReadOnly
{
NSCalendarDate *startDate;
NSCalendarDate *firstDate;
return [self getEventRWType] != 0;
}
- (BOOL) userIsAttendee
{
return [self getEventRWType] == 1;
}
- (NSCalendarDate *) getDateFor: (NSString *) when
{
NSCalendarDate *startDate, *endDate, *firstDate, *rc;
NSTimeZone *timeZone;
iCalEvent *master;
signed int daylightOffset;
@ -2037,39 +2074,25 @@ RANGE(2);
}
}
[startDate setTimeZone: [[context activeUser] timeZone]];
endDate = [[component endDate] dateByAddingYears:0 months:0 days:0 hours:0 minutes:0 seconds:daylightOffset];
[endDate setTimeZone: [[context activeUser] timeZone]];
if ([when isEqualToString: @"start"])
rc = startDate;
else
rc = endDate;
return [startDate description];
return rc;
}
- (NSString *) startDateString
{
return [[self getDateFor: @"start"] description];
}
- (NSString *) endDateString
{
NSCalendarDate *startDate, *endDate;
NSCalendarDate *firstDate;
NSTimeZone *timeZone;
iCalEvent *master;
signed int daylightOffset;
startDate = [component startDate];
daylightOffset = 0;
if ([component isKindOfClass: [SOGoAppointmentOccurence class]])
{
master = (iCalEvent*)[[component parent] firstChildWithTag: @"vevent"];
firstDate = [master startDate];
timeZone = [[context activeUser] timeZone];
if ([timeZone isDaylightSavingTimeForDate: startDate] != [timeZone isDaylightSavingTimeForDate: firstDate])
{
daylightOffset = (signed int)[timeZone secondsFromGMTForDate: firstDate]
- (signed int)[timeZone secondsFromGMTForDate: startDate];
startDate = [startDate dateByAddingYears:0 months:0 days:0 hours:0 minutes:0 seconds:daylightOffset];
}
}
endDate = [[component endDate] dateByAddingYears:0 months:0 days:0 hours:0 minutes:0 seconds:daylightOffset];
[endDate setTimeZone: [[context activeUser] timeZone]];
return [endDate description];
return [[self getDateFor: @"end"] description];
}
@end

View File

@ -214,6 +214,8 @@
"Category:" = "Categori:";
"Repeat:" = "Ailwneud:";
"Reminder:" = "Atgoffa:";
"General:" = "General:";
"Reply:" = "Reply:";
"Target:" = "Targed:";

View File

@ -168,60 +168,100 @@
</form>
</var:if>
<var:if condition="eventIsReadOnly">
<form var:href="saveURL" name="editform" onsubmit="return validateAptEditor();">
<div id="eventView">
<label><var:string label:value="Title:" /><span class="content"
><var:string var:value="title"
/></span></label>
<label><var:string label:value="Location:" /><span class="content"
><var:string var:value="location"
/></span></label>
<label><var:string label:value="Category:" />
<span class="content"><var:string var:value="category"
/></span></label>
<!-- <label><var:string label:value="Calendar:" />
<span class="content"><var:string var:value="calendarDisplayName"
/></span></label> -->
<label><var:string label:value="Priority:" />
<span class="content"><var:string var:value="priority"/>
</span></label>
<var:if condition="hasOrganizer"
><label id="organizerLabel"><var:string label:value="Organizer:"
/><span class="content"><var:string
value="organizerName"/></span></label>
</var:if>
<label id="attendeesLabel"><var:string label:value="Attendees:"
/><span class="content"
><span id="attendeesHref" class="nomenu"><!-- space --></span></span></label>
<hr />
<span class="checkBoxList"><var:string label:value="Start:" />
<span class="content"><var:string var:value="startDateString"
/></span></span>
<span class="checkBoxList"><var:string label:value="End:" />
<span class="content"><var:string var:value="endDateString"
/></span></span>
<hr />
<label><var:string label:value="Repeat:" />
<span class="content"><var:string var:value="repeatLabel"
/> <a href="#" id="repeatHref" style="display: none;"
><var:string label:value="Edit"/></a></span></label>
<!--<label><var:string label:value="Reminder:" />
<div id="generalDiv">
<label class="content calendarName"><var:string var:value="componentCalendarName" />
</label>
<label class="title titleNoSpace"><var:string label:value="General:" />
<span class="content headerContent">
</span>
</label>
<label><var:string label:value="Title:" />
<span class="content"><var:string var:value="title"/></span>
</label>
<var:if condition="hasLocation">
<label><var:string label:value="Location:" />
<span class="content"><var:string var:value="location" /></span>
</label>
</var:if>
<var:if condition="hasCategory">
<label><var:string label:value="Category:" />
<span class="content"><var:string var:value="category" /></span>
</label>
</var:if>
<var:if condition="hasPriority">
<label><var:string label:value="Priority:" />
<span class="content"><var:string var:value="priority"/></span>
</label>
</var:if>
<label><var:string label:value="Start:" />
<span class="content"><var:string var:value="startDateString" /></span>
</label>
<label><var:string label:value="End:" />
<span class="content"><var:string var:value="endDateString" /></span>
</label>
<var:if condition="hasRepeat">
<label><var:string label:value="Repeat:" />
<span class="content"><var:string var:value="repeatLabel" /></span>
</label>
</var:if>
<label id="documentLabel" style="display: none;"><var:string label:value="Document:" />
<span class="content"><a href="#" id="documentHref"><!-- space --></a></span>
</label>
<var:if condition="hasOrganizer">
<label id="organizerLabel"><var:string label:value="Organizer:"/>
<span class="content"><var:string value="organizerName"/></span>
</label>
</var:if>
<var:if condition="userIsAttendee">
<label><var:string label:value="Reply:" />
<span class="content"><var:popup list="replyList" item="item"
const:disabledValue="-"
label:noSelectionString="partStat_NEEDS-ACTION"
const:name="replyList"
const:id="replyList"
string="itemReplyText"
var:selection="reply" /></span>
</label>
<!--TODO: I'm not sure how to send this
<label><var:string label:value="Reminder:" />
<span class="content"><var:popup list="reminderList" item="item"
const:disabledValue="-"
label:noSelectionString="reminder_NONE"
const:disabledValue="-"
label:noSelectionString="reminder_NONE"
const:name="reminderList"
const:id="reminderList"
string="itemReminderText" var:selection="reminder"
/> <a href="#" id="reminderHref" style="display: none;"
><var:string label:value="Edit"/></a></span></label>
<hr />-->
<label id="commentArea"><var:string label:value="Description:"
/><span class="content"><var:string var:value="comment" /></span></label>
<label id="documentLabel" style="display: none;"><var:string label:value="Document:"
const:id="reminderList"
string="itemReminderText"
var:selection="reminder"
const:onchange="?" /></span>
</label>-->
</var:if>
</div>
<div id="attendeesDiv">
<label class="title"><var:string label:value="Attendees:" />
<span class="content headerContent">
</span>
</label>
<label id="attendeesLabel">
<span class="content"><div id="attendeesMenu" class="fakeTextArea">
</div></span>
</label>
</div>
<var:if condition="hasComment">
<div id="descriptionDiv">
<label class="title"><var:string label:value="Description:" />
<span class="content headerContent">
</span>
</label>
<label><span class="content fixedHeight">
<div class="fakeTextArea"><var:string var:value="comment" /></div>
</span>
</label>
</div>
</var:if>
<!--
<label id="attendeesLabel"><var:string label:value="Attendees:"
/><span class="content"
><a href="#" id="documentHref"><!-- space --></a
></span></label>
><a href="#" id="attendeesHref"</a></span></label>x-->
<input type="hidden" name="attach" id="attach" var:value="attach"/>
<input type="hidden" name="privacy" id="privacy"
var:value="privacy"/>
@ -281,7 +321,15 @@
<input type="hidden" name="reminderReference"
id="reminderReference"
var:value="reminderReference"/>
<div id="windowButtons">
<span class="content">
<a id="cancelButton" href="#" class="button"
><var:string label:value="Cancel"/></a>
<a id="okButton" href="#" class="button"
><var:string label:value="OK"/></a>
</span>
</div>
</div>
</form>
</var:if>
</var:component>

View File

@ -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; }

View File

@ -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();
}

View File

@ -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;
}

View File

@ -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);