merge of '10fadb79fc28a892498ff228f648c363587ed6e4'

and '6e082f09a153b3a0152c5b9355a2001b3c542c96'

Monotone-Parent: 10fadb79fc28a892498ff228f648c363587ed6e4
Monotone-Parent: 6e082f09a153b3a0152c5b9355a2001b3c542c96
Monotone-Revision: 85281fd909e8f0d613327a321fb964be7ca872ca

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2010-06-07T13:51:45
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2010-06-07 13:51:45 +00:00
29 changed files with 239 additions and 110 deletions
+23 -2
View File
@@ -1,8 +1,29 @@
2010-06-07 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* UI/Common/UIxAclEditor.m (-isPublicAccessEnabled): we now expose
the state of public access in order to not show the "anonymous"
user when not needed.
2010-06-05 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* UI/Scheduler/UIxCalendarProperties.m (-calDavURL, -webDavICSURL)
(-webDavXMLURL): new accessors for the URL now appearing at the
bottom of the properties page.
* UI/WebServerResources/generic.js (onBodyClickContextMenu):
leave the context menu to appear on "A" elements with a
"clickableLink" class.
* SoObjects/SOGo/SOGoGCSFolder.m (-realDavURL): new method that
returns the the owner version of the URL to the current folder.
2010-06-04 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* UI/Scheduler/UIxCalParticipationStatusView.m: removed obsolete module.
* UI/Common/UIxUserRightsEditor.m
(-sendACLAdvisoryTemplateForObject:): don't attempt to send a notification
email to the "anonymous" or the default user.
(-sendACLAdvisoryTemplateForObject:): don't attempt to send a
notification email to the "anonymous" or the default user.
* SoObjects/Appointments/SOGoAppointmentFolderXML.[hm]: same as
below for XML.
+14
View File
@@ -8,6 +8,20 @@
able to respond to invitations
- added the ability to specify which calendar is taken into account when
retrieving a user's freebusy
- added the ability to publish resources to unauthenticated (anonymous) users,
via the "/SOGo/dav/public" url
- we now provide ICS and XML version of a user's personal calendars when
accessed from his own "Calendar" base collection
- events are now displayed with the coloured stripe representing their
category, if one is defined in the preferences
- the event location is now displayed in the calendar view when defined
properly
- added a caching mechanism for freebusy requests, in order to accelerate the
display
- added the ability to specify a time range when requesting a time slot
suggestion
- added a Ukrainian translation
- updated the Czeck translation
1.2-20100504 (1.2.2)
--------------------
+2
View File
@@ -113,6 +113,8 @@
- (void) sendFolderAdvisoryTemplate: (NSString *) template;
/* DAV */
- (NSURL *) realDavURL;
- (NSDictionary *) davSQLFieldsTable;
- (NSDictionary *) parseDAVRequestedProperties: (DOMElement *) propElement;
+29
View File
@@ -419,6 +419,35 @@ static NSArray *childRecordFields = nil;
return error;
}
- (NSURL *) realDavURL
{
NSURL *realDavURL, *currentDavURL;
NSString *appName, *publicParticle, *path;
if (isSubscription)
{
appName = [[context request] applicationName];
if ([self isInPublicZone])
publicParticle = @"/public";
else
publicParticle = @"";
path = [NSString stringWithFormat: @"/%@/dav%@/%@/%@/%@/",
appName, publicParticle,
[self ownerInContext: nil],
[container nameInContainer],
[self realNameInContainer]];
currentDavURL = [self davURL];
realDavURL = [[NSURL alloc] initWithScheme: [currentDavURL scheme]
host: [currentDavURL host]
path: path];
[realDavURL autorelease];
}
else
realDavURL = [self davURL];
return realDavURL;
}
- (GCSFolder *) ocsFolder
{
GCSFolder *folder;
+7 -12
View File
@@ -33,6 +33,7 @@
#import <SOGo/SOGoContentObject.h>
#import <SOGo/SOGoGCSFolder.h>
#import <SOGo/SOGoPermissions.h>
#import <SOGo/SOGoSystemDefaults.h>
#import <SOGo/SOGoUserManager.h>
#import <SOGo/SOGoUser.h>
@@ -121,8 +122,7 @@
ASSIGN (defaultUserID, [[self clientObject] defaultUserID]);
aclsEnum = [[self aclsForObject] objectEnumerator];
currentUID = [aclsEnum nextObject];
while (currentUID)
while ((currentUID = [aclsEnum nextObject]))
{
if ([currentUID hasPrefix: @"@"])
// NOTE: don't remove the prefix if we want to identify the lists visually
@@ -131,7 +131,6 @@
|| [currentUID isEqualToString: defaultUserID]
|| [currentUID isEqualToString: @"anonymous"]))
[users addObjectUniquely: currentUID];
currentUID = [aclsEnum nextObject];
}
prepared = YES;
@@ -231,14 +230,10 @@
inContext: context]);
}
// - (id <WOActionResults>) addUserInAcls
// {
// SOGoObject *clientObject;
// NSString *uid;
// uid = [self queryParameterForKey: @"uid"];
// clientObject = [self clientObject];
// }
- (BOOL) isPublicAccessEnabled
{
return [[SOGoSystemDefaults sharedSystemDefaults]
enablePublicAccess];
}
@end
@@ -529,6 +529,11 @@ vtodo_class2 = "(Tarefa Confidencial)";
"Show alarms" = "Show alarms";
"Show tasks" = "Show tasks";
"Links to this Calendar" = "Links to this Calendar";
"CalDAV url" = "CalDAV url";
"WebDAV ICS URL" = "WebDAV ICS URL";
"WebDAV XML URL" = "WebDAV XML URL";
/* Error messages */
"dayFieldInvalid" = "Please specify a numerical value in the Days field greater or equal to 1.";
"weekFieldInvalid" = "Please specify a numerical value in the Week(s) field greater or equal to 1.";
@@ -529,6 +529,11 @@ vtodo_class2 = "(Důvěrný úkol)";
"Show alarms" = "Zobrazit upomínky";
"Show tasks" = "Zobrazit úkoly";
"Links to this Calendar" = "Links to this Calendar";
"CalDAV url" = "CalDAV url";
"WebDAV ICS URL" = "WebDAV ICS URL";
"WebDAV XML URL" = "WebDAV XML URL";
/* Error messages */
"dayFieldInvalid" = "Please specify a numerical value in the Days field greater or equal to 1.";
"weekFieldInvalid" = "Please specify a numerical value in the Week(s) field greater or equal to 1.";
@@ -529,6 +529,11 @@ vtodo_class2 = "(Vertrouwelijke taak)";
"Show alarms" = "Show alarms";
"Show tasks" = "Show tasks";
"Links to this Calendar" = "Links to this Calendar";
"CalDAV url" = "CalDAV url";
"WebDAV ICS URL" = "WebDAV ICS URL";
"WebDAV XML URL" = "WebDAV XML URL";
/* Error messages */
"dayFieldInvalid" = "Please specify a numerical value in the Days field greater or equal to 1.";
"weekFieldInvalid" = "Please specify a numerical value in the Week(s) field greater or equal to 1.";
@@ -529,6 +529,11 @@ vtodo_class2 = "(Confidential task)";
"Show alarms" = "Show alarms";
"Show tasks" = "Show tasks";
"Links to this Calendar" = "Links to this Calendar";
"CalDAV url" = "CalDAV url";
"WebDAV ICS URL" = "WebDAV ICS URL";
"WebDAV XML URL" = "WebDAV XML URL";
/* Error messages */
"dayFieldInvalid" = "Please specify a numerical value in the Days field greater or equal to 1.";
"weekFieldInvalid" = "Please specify a numerical value in the Week(s) field greater or equal to 1.";
@@ -529,6 +529,11 @@ vtodo_class2 = "(Tâche confidentielle)";
"Show alarms" = "Afficher les alarmes";
"Show tasks" = "Afficher les tâches";
"Links to this Calendar" = "Liens vers cet agenda";
"CalDAV url" = "Accès en CalDAV";
"WebDAV ICS URL" = "Représentation ICS en WebDAV";
"WebDAV XML URL" = "Représentation XML en WebDAV";
/* Error messages */
"dayFieldInvalid" = "Veuillez spécifier un chiffre supérieur ou égal à 1 dans le champ Jours.";
"weekFieldInvalid" = "Veuillez spécifier un chiffre supérieur ou égal à 1 dans le champ Semaine(s).";
-1
View File
@@ -41,7 +41,6 @@ SchedulerUI_OBJC_FILES = \
UIxTaskEditor.m \
UIxDatePicker.m \
UIxTimeDateControl.m \
UIxCalParticipationStatusView.m \
UIxCalMonthOverview.m \
UIxCalMonthViewOld.m \
UIxRecurrenceEditor.m \
@@ -529,6 +529,11 @@ vtodo_class2 = "(Vertrauliche Aufgabe)";
"Show alarms" = "Zeige Erinnerungen";
"Show tasks" = "Zeige Aufgaben";
"Links to this Calendar" = "Links to this Calendar";
"CalDAV url" = "CalDAV url";
"WebDAV ICS URL" = "WebDAV ICS URL";
"WebDAV XML URL" = "WebDAV XML URL";
/* Error messages */
"dayFieldInvalid" = "Im Feld Tage ist ein numerischer Wert größer oder gleich 1 erforderlich.";
"weekFieldInvalid" = "Im Feld Woche(n) ist ein numerischer Wert größer oder gleich 1 erforderlich.";
@@ -529,6 +529,11 @@ vtodo_class2 = "(Bizalmas feladat)";
"Show alarms" = "Show alarms";
"Show tasks" = "Show tasks";
"Links to this Calendar" = "Links to this Calendar";
"CalDAV url" = "CalDAV url";
"WebDAV ICS URL" = "WebDAV ICS URL";
"WebDAV XML URL" = "WebDAV XML URL";
/* Error messages */
"dayFieldInvalid" = "Please specify a numerical value in the Days field greater or equal to 1.";
"weekFieldInvalid" = "Please specify a numerical value in the Week(s) field greater or equal to 1.";
@@ -529,6 +529,11 @@ vtodo_class2 = "(Attività confidenziale)";
"Show alarms" = "Show alarms";
"Show tasks" = "Show tasks";
"Links to this Calendar" = "Links to this Calendar";
"CalDAV url" = "CalDAV url";
"WebDAV ICS URL" = "WebDAV ICS URL";
"WebDAV XML URL" = "WebDAV XML URL";
/* Error messages */
"dayFieldInvalid" = "Please specify a numerical value in the Days field greater or equal to 1.";
"weekFieldInvalid" = "Please specify a numerical value in the Week(s) field greater or equal to 1.";
@@ -529,6 +529,11 @@ vtodo_class2 = "(Confidential task)";
"Show alarms" = "Show alarms";
"Show tasks" = "Show tasks";
"Links to this Calendar" = "Links to this Calendar";
"CalDAV url" = "CalDAV url";
"WebDAV ICS URL" = "WebDAV ICS URL";
"WebDAV XML URL" = "WebDAV XML URL";
/* Error messages */
"dayFieldInvalid" = "Please specify a numerical value in the Days field greater or equal to 1.";
"weekFieldInvalid" = "Please specify a numerical value in the Week(s) field greater or equal to 1.";
@@ -529,6 +529,11 @@ vtodo_class2 = "(Tarea confidencial)";
"Show alarms" = "Show alarms";
"Show tasks" = "Show tasks";
"Links to this Calendar" = "Links to this Calendar";
"CalDAV url" = "CalDAV url";
"WebDAV ICS URL" = "WebDAV ICS URL";
"WebDAV XML URL" = "WebDAV XML URL";
/* Error messages */
"dayFieldInvalid" = "Please specify a numerical value in the Days field greater or equal to 1.";
"weekFieldInvalid" = "Please specify a numerical value in the Week(s) field greater or equal to 1.";
@@ -529,6 +529,11 @@ vtodo_class2 = "(Konfidentiell uppgift)";
"Show alarms" = "Visa alarm";
"Show tasks" = "Visa uppgifter";
"Links to this Calendar" = "Links to this Calendar";
"CalDAV url" = "CalDAV url";
"WebDAV ICS URL" = "WebDAV ICS URL";
"WebDAV XML URL" = "WebDAV XML URL";
/* Error messages */
"dayFieldInvalid" = "Ange ett numeriskt värde in dagsfältet större än eller lika med 1.";
"weekFieldInvalid" = "Ange ett numeriskt värde in veckofältet större än eller lika med 1.";
@@ -1,64 +0,0 @@
/*
Copyright (C) 2000-2004 SKYRIX Software AG
This file is part of OGo
OGo is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
OGo is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public
License along with OGo; see the file COPYING. If not, write to the
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
#import <NGCards/iCalPerson.h>
#import <NGObjWeb/WOComponent.h>
@interface UIxCalParticipationStatusView : WOComponent
{
int partStat;
}
- (NSString *)participationStatus;
@end
@implementation UIxCalParticipationStatusView
- (void)setPartStat:(id)_partStat {
self->partStat = [_partStat intValue];
}
- (int)partStat {
return self->partStat;
}
- (NSString *)participationStatus {
switch (self->partStat) {
case iCalPersonPartStatNeedsAction:
return @"NEEDS-ACTION";
case iCalPersonPartStatAccepted:
return @"ACCEPTED";
case iCalPersonPartStatDeclined:
return @"DECLINED";
case iCalPersonPartStatTentative:
return @"TENTATIVE";
case iCalPersonPartStatDelegated:
return @"DELEGATED";
}
return @"OTHER";
}
- (NSString *)participationStatusLabel {
return [NSString stringWithFormat:@"partStat_%@",
[self participationStatus]];
}
@end
+1
View File
@@ -29,6 +29,7 @@
@interface UIxCalendarProperties : UIxComponent
{
SOGoAppointmentFolder *calendar;
NSString *baseCalDAVURL;
BOOL reloadTasks;
}
+40
View File
@@ -22,6 +22,7 @@
#import <Foundation/NSDictionary.h>
#import <Foundation/NSEnumerator.h>
#import <Foundation/NSURL.h>
#import <NGObjWeb/WORequest.h>
@@ -39,12 +40,19 @@
if ((self = [super init]))
{
calendar = [self clientObject];
baseCalDAVURL = nil;
reloadTasks = NO;
}
return self;
}
- (void) dealloc
{
[baseCalDAVURL release];
[super dealloc];
}
- (NSString *) calendarID
{
return [calendar folderReference];
@@ -241,4 +249,36 @@
return [self jsCloseWithRefreshMethod: action];
}
- (NSString *) _baseCalDAVURL
{
NSString *davURL;
if (!baseCalDAVURL)
{
davURL = [[calendar realDavURL] absoluteString];
if ([davURL hasSuffix: @"/"])
baseCalDAVURL = [davURL substringToIndex: [davURL length] - 1];
else
baseCalDAVURL = davURL;
[baseCalDAVURL retain];
}
return baseCalDAVURL;
}
- (NSString *) calDavURL
{
return [NSString stringWithFormat: @"%@/", [self _baseCalDAVURL]];
}
- (NSString *) webDavICSURL
{
return [NSString stringWithFormat: @"%@.ics", [self _baseCalDAVURL]];
}
- (NSString *) webDavXMLURL
{
return [NSString stringWithFormat: @"%@.xml", [self _baseCalDAVURL]];
}
@end
@@ -521,6 +521,11 @@ vtodo_class2 = "(Конфіденційне завдання)";
"Show alarms" = "Сповіщення";
"Show tasks" = "Завдання";
"Links to this Calendar" = "Links to this Calendar";
"CalDAV url" = "CalDAV url";
"WebDAV ICS URL" = "WebDAV ICS URL";
"WebDAV XML URL" = "WebDAV XML URL";
/* Error messages */
"dayFieldInvalid" = "Будь ласка, зазначте числове значення в полі дні, що більше або рівно 1.";
"weekFieldInvalid" = "Будь ласка, зазначте числове значення в полі тиждень(і), що більше або рівно 1.";
@@ -529,6 +529,11 @@ vtodo_class2 = "(Tasg gyhoeddus)";
"Show alarms" = "Show alarms";
"Show tasks" = "Show tasks";
"Links to this Calendar" = "Links to this Calendar";
"CalDAV url" = "CalDAV url";
"WebDAV ICS URL" = "WebDAV ICS URL";
"WebDAV XML URL" = "WebDAV XML URL";
/* Error messages */
"dayFieldInvalid" = "Please specify a numerical value in the Days field greater or equal to 1.";
"weekFieldInvalid" = "Please specify a numerical value in the Week(s) field greater or equal to 1.";
@@ -1,8 +0,0 @@
<?xml version='1.0' standalone='yes'?>
<var:string xmlns="http://www.w3.org/1999/xhtml"
xmlns:var="http://www.skyrix.com/od/binding"
xmlns:const="http://www.skyrix.com/od/constant"
xmlns:label="OGo:label"
label:value="$participationStatusLabel"
/>
@@ -99,6 +99,17 @@
/></label></div></var:if>
</fieldset>
<var:if condition="isWebCalendar" const:negate="YES"
><fieldset id="davLinks">
<legend><var:string label:value="Links to this Calendar"/></legend>
<a const:class="clickableLink" var:href="calDavURL"
><var:string label:value="CalDAV url"/></a><br/>
<a const:class="clickableLink" var:href="webDavICSURL"
><var:string label:value="WebDAV ICS URL"/></a><br/>
<a const:class="clickableLink" var:href="webDavXMLURL"
><var:string label:value="WebDAV XML URL"/></a>
</fieldset></var:if>
<div id="buttons">
<a href="#" class="button actionButton" id="okButton"
name="okButton">
+11 -8
View File
@@ -8,15 +8,18 @@
xmlns:rsrc="OGo:url"
className="UIxPageFrame"
title="title"
const:toolbar="none"
const:popup="YES">
<script type="text/javascript"
><var:if condition="canSubscribeUsers">
var canSubscribeUsers = true;
</var:if
><var:if condition="canSubscribeUsers" const:negate="YES">
var canSubscribeUsers = false;
</var:if
></script>
<script type="text/javascript">
var canSubscribeUsers = <var:if condition="canSubscribeUsers"
>true</var:if><var:if condition="canSubscribeUsers"
const:negate="YES"
>false</var:if>;
var isPublicAccessEnabled = <var:if condition="isPublicAccessEnabled"
>true</var:if><var:if condition="isPublicAccessEnabled"
const:negate="YES"
>false</var:if>;
</script>
<form id="aclForm" const:href="saveAcls">
<div class="acls">
+6 -4
View File
@@ -2231,7 +2231,7 @@ function onCalendarModify(event) {
var url = ApplicationBaseURL + calendarID + "/properties";
var windowID = sanitizeWindowName(calendarID + " properties");
var width = 310;
var height = 275;
var height = 330;
var isWebCalendar = false;
if (UserSettings['Calendar']
&& UserSettings['Calendar']['WebCalendars']) {
@@ -2245,10 +2245,12 @@ function onCalendarModify(event) {
if (owner == UserLogin) {
height += 24;
}
if (isWebCalendar)
height += 41;
else if (calendarID == "/personal")
if (isWebCalendar) {
height -= 38;
}
else if (calendarID == "/personal") {
height -= 26;
}
var properties = window.open(url, windowID,
"width="+width+",height="+height+",resizable=0");
+21 -8
View File
@@ -16,13 +16,23 @@ function addUser(userName, userID) {
var lis = ul.childNodesWithTag("li");
var newNode = nodeForUser(userName, userID, canSubscribeUsers);
newNode.addClassName("normal-user");
if (lis.length > 1) {
var publicNode = lis[lis.length-2];
ul.insertBefore(newNode, publicNode);
var count = lis.length - 1;
var nextLi = null;
while (count > -1 && !nextLi) {
log("current li: " + lis[count].id);
if (lis[count].hasClassName("normal-user")) {
nextLi = lis[count+1];
}
else {
count--;
}
}
else {
ul.appendChild(newNode);
if (!nextLi) {
nextLi = lis[0];
}
ul.insertBefore(newNode, nextLi);
var url = window.location.href;
var elements = url.split("/");
elements[elements.length-1] = ("addUserInAcls?uid="
@@ -115,8 +125,11 @@ function onUserRemove(event) {
var baseURL = elements.join("/");
for (var i = 0; i < nodes.length; i++) {
var userId = nodes[i].getAttribute("id");
triggerAjaxRequest(baseURL + userId, removeUserCallback, nodes[i]);
var userId = nodes[i].id;
if (userId != defaultUserID && userId != "anonymous") {
triggerAjaxRequest(baseURL + userId, removeUserCallback,
nodes[i]);
}
}
preventDefault(event);
}
@@ -175,7 +188,7 @@ function onAclLoadHandler() {
defaultUserID);
userNode.addClassName("any-user");
ul.appendChild(userNode);
if (CurrentModule() != "Mail") {
if (isPublicAccessEnabled && CurrentModule() != "Mail") {
userNode = nodeForUser(_("Public Access"), "anonymous");
userNode.addClassName("anonymous-user");
ul.appendChild(userNode);
@@ -53,6 +53,9 @@ INPUT#calendarSyncTag
LABEL
{ white-space: nowrap; }
#davLinks A
{ margin-left: 60px; }
#webCalendarUrl SPAN.content
{ white-space: nowrap;
overflow: hidden; }
+6 -3
View File
@@ -1442,9 +1442,12 @@ function onLoadHandler(event) {
}
function onBodyClickContextMenu(event) {
if (!(event.target
&& (event.target.tagName == "INPUT"
|| event.target.tagName == "TEXTAREA")))
var target = $(event.target);
if (!(target
&& (target.tagName == "INPUT"
|| target.tagName == "TEXTAREA"
|| (target.tagName == "A"
&& target.hasClassName("clickableLink")))))
preventDefault(event);
}