diff --git a/ChangeLog b/ChangeLog index 81771be84..ee5fd8cb6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,29 @@ +2010-06-07 Wolfgang Sourdeau + + * 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 + + * 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 + * 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. diff --git a/NEWS b/NEWS index 0c1a69d7e..dd6cbeb54 100644 --- a/NEWS +++ b/NEWS @@ -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) -------------------- diff --git a/SoObjects/SOGo/SOGoGCSFolder.h b/SoObjects/SOGo/SOGoGCSFolder.h index 6c8022786..ea3185d22 100644 --- a/SoObjects/SOGo/SOGoGCSFolder.h +++ b/SoObjects/SOGo/SOGoGCSFolder.h @@ -113,6 +113,8 @@ - (void) sendFolderAdvisoryTemplate: (NSString *) template; /* DAV */ +- (NSURL *) realDavURL; + - (NSDictionary *) davSQLFieldsTable; - (NSDictionary *) parseDAVRequestedProperties: (DOMElement *) propElement; diff --git a/SoObjects/SOGo/SOGoGCSFolder.m b/SoObjects/SOGo/SOGoGCSFolder.m index 9e8039802..a25b4a852 100644 --- a/SoObjects/SOGo/SOGoGCSFolder.m +++ b/SoObjects/SOGo/SOGoGCSFolder.m @@ -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; diff --git a/UI/Common/UIxAclEditor.m b/UI/Common/UIxAclEditor.m index 4c3589fac..55344e119 100644 --- a/UI/Common/UIxAclEditor.m +++ b/UI/Common/UIxAclEditor.m @@ -33,6 +33,7 @@ #import #import #import +#import #import #import @@ -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 ) addUserInAcls -// { -// SOGoObject *clientObject; -// NSString *uid; - -// uid = [self queryParameterForKey: @"uid"]; - -// clientObject = [self clientObject]; -// } +- (BOOL) isPublicAccessEnabled +{ + return [[SOGoSystemDefaults sharedSystemDefaults] + enablePublicAccess]; +} @end diff --git a/UI/Scheduler/BrazilianPortuguese.lproj/Localizable.strings b/UI/Scheduler/BrazilianPortuguese.lproj/Localizable.strings index b91a4a07c..e9587475d 100644 --- a/UI/Scheduler/BrazilianPortuguese.lproj/Localizable.strings +++ b/UI/Scheduler/BrazilianPortuguese.lproj/Localizable.strings @@ -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."; diff --git a/UI/Scheduler/Czech.lproj/Localizable.strings b/UI/Scheduler/Czech.lproj/Localizable.strings index 7d57c7159..674168a33 100644 --- a/UI/Scheduler/Czech.lproj/Localizable.strings +++ b/UI/Scheduler/Czech.lproj/Localizable.strings @@ -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."; diff --git a/UI/Scheduler/Dutch.lproj/Localizable.strings b/UI/Scheduler/Dutch.lproj/Localizable.strings index e3908139c..27cb0e963 100644 --- a/UI/Scheduler/Dutch.lproj/Localizable.strings +++ b/UI/Scheduler/Dutch.lproj/Localizable.strings @@ -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."; diff --git a/UI/Scheduler/English.lproj/Localizable.strings b/UI/Scheduler/English.lproj/Localizable.strings index af9825b12..8082eacb2 100644 --- a/UI/Scheduler/English.lproj/Localizable.strings +++ b/UI/Scheduler/English.lproj/Localizable.strings @@ -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."; diff --git a/UI/Scheduler/French.lproj/Localizable.strings b/UI/Scheduler/French.lproj/Localizable.strings index 44a17be34..f9d26dc8c 100644 --- a/UI/Scheduler/French.lproj/Localizable.strings +++ b/UI/Scheduler/French.lproj/Localizable.strings @@ -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)."; diff --git a/UI/Scheduler/GNUmakefile b/UI/Scheduler/GNUmakefile index 201eae6ae..edbc797c3 100644 --- a/UI/Scheduler/GNUmakefile +++ b/UI/Scheduler/GNUmakefile @@ -41,7 +41,6 @@ SchedulerUI_OBJC_FILES = \ UIxTaskEditor.m \ UIxDatePicker.m \ UIxTimeDateControl.m \ - UIxCalParticipationStatusView.m \ UIxCalMonthOverview.m \ UIxCalMonthViewOld.m \ UIxRecurrenceEditor.m \ diff --git a/UI/Scheduler/German.lproj/Localizable.strings b/UI/Scheduler/German.lproj/Localizable.strings index 6fbec4fc9..7de5b4de2 100644 --- a/UI/Scheduler/German.lproj/Localizable.strings +++ b/UI/Scheduler/German.lproj/Localizable.strings @@ -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."; diff --git a/UI/Scheduler/Hungarian.lproj/Localizable.strings b/UI/Scheduler/Hungarian.lproj/Localizable.strings index 053650a28..6c218dc51 100644 --- a/UI/Scheduler/Hungarian.lproj/Localizable.strings +++ b/UI/Scheduler/Hungarian.lproj/Localizable.strings @@ -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."; diff --git a/UI/Scheduler/Italian.lproj/Localizable.strings b/UI/Scheduler/Italian.lproj/Localizable.strings index ff55ff9b5..e4f539b54 100644 --- a/UI/Scheduler/Italian.lproj/Localizable.strings +++ b/UI/Scheduler/Italian.lproj/Localizable.strings @@ -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."; diff --git a/UI/Scheduler/Russian.lproj/Localizable.strings b/UI/Scheduler/Russian.lproj/Localizable.strings index 9b3901fc4..a179cfaed 100644 --- a/UI/Scheduler/Russian.lproj/Localizable.strings +++ b/UI/Scheduler/Russian.lproj/Localizable.strings @@ -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."; diff --git a/UI/Scheduler/Spanish.lproj/Localizable.strings b/UI/Scheduler/Spanish.lproj/Localizable.strings index 18cee0987..f204b957f 100644 --- a/UI/Scheduler/Spanish.lproj/Localizable.strings +++ b/UI/Scheduler/Spanish.lproj/Localizable.strings @@ -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."; diff --git a/UI/Scheduler/Swedish.lproj/Localizable.strings b/UI/Scheduler/Swedish.lproj/Localizable.strings index 5fa6ad50e..277d7908a 100644 --- a/UI/Scheduler/Swedish.lproj/Localizable.strings +++ b/UI/Scheduler/Swedish.lproj/Localizable.strings @@ -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."; diff --git a/UI/Scheduler/UIxCalParticipationStatusView.m b/UI/Scheduler/UIxCalParticipationStatusView.m deleted file mode 100644 index fc1c1ec43..000000000 --- a/UI/Scheduler/UIxCalParticipationStatusView.m +++ /dev/null @@ -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 -#import - -@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 diff --git a/UI/Scheduler/UIxCalendarProperties.h b/UI/Scheduler/UIxCalendarProperties.h index bb5483e46..75781c0d4 100644 --- a/UI/Scheduler/UIxCalendarProperties.h +++ b/UI/Scheduler/UIxCalendarProperties.h @@ -29,6 +29,7 @@ @interface UIxCalendarProperties : UIxComponent { SOGoAppointmentFolder *calendar; + NSString *baseCalDAVURL; BOOL reloadTasks; } diff --git a/UI/Scheduler/UIxCalendarProperties.m b/UI/Scheduler/UIxCalendarProperties.m index a25b6c566..68d4f998d 100644 --- a/UI/Scheduler/UIxCalendarProperties.m +++ b/UI/Scheduler/UIxCalendarProperties.m @@ -22,6 +22,7 @@ #import #import +#import #import @@ -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 diff --git a/UI/Scheduler/Ukrainian.lproj/Localizable.strings b/UI/Scheduler/Ukrainian.lproj/Localizable.strings index b09838aca..536fc1e8f 100644 --- a/UI/Scheduler/Ukrainian.lproj/Localizable.strings +++ b/UI/Scheduler/Ukrainian.lproj/Localizable.strings @@ -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."; diff --git a/UI/Scheduler/Welsh.lproj/Localizable.strings b/UI/Scheduler/Welsh.lproj/Localizable.strings index ce2d4dc49..7e72f0d06 100644 --- a/UI/Scheduler/Welsh.lproj/Localizable.strings +++ b/UI/Scheduler/Welsh.lproj/Localizable.strings @@ -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."; diff --git a/UI/Templates/SchedulerUI/UIxCalParticipationStatusView.wox b/UI/Templates/SchedulerUI/UIxCalParticipationStatusView.wox deleted file mode 100644 index c4d5d419f..000000000 --- a/UI/Templates/SchedulerUI/UIxCalParticipationStatusView.wox +++ /dev/null @@ -1,8 +0,0 @@ - - - diff --git a/UI/Templates/SchedulerUI/UIxCalendarProperties.wox b/UI/Templates/SchedulerUI/UIxCalendarProperties.wox index 5f2f6df4e..6a96c1317 100644 --- a/UI/Templates/SchedulerUI/UIxCalendarProperties.wox +++ b/UI/Templates/SchedulerUI/UIxCalendarProperties.wox @@ -99,6 +99,17 @@ /> + +
diff --git a/UI/Templates/UIxAclEditor.wox b/UI/Templates/UIxAclEditor.wox index 75ff5c8d0..0cb2ec0e2 100644 --- a/UI/Templates/UIxAclEditor.wox +++ b/UI/Templates/UIxAclEditor.wox @@ -8,15 +8,18 @@ xmlns:rsrc="OGo:url" className="UIxPageFrame" title="title" + const:toolbar="none" const:popup="YES"> - +
diff --git a/UI/WebServerResources/SchedulerUI.js b/UI/WebServerResources/SchedulerUI.js index 648921d70..9b5332567 100644 --- a/UI/WebServerResources/SchedulerUI.js +++ b/UI/WebServerResources/SchedulerUI.js @@ -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"); diff --git a/UI/WebServerResources/UIxAclEditor.js b/UI/WebServerResources/UIxAclEditor.js index 07bbe47f8..45d40c44d 100644 --- a/UI/WebServerResources/UIxAclEditor.js +++ b/UI/WebServerResources/UIxAclEditor.js @@ -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); diff --git a/UI/WebServerResources/UIxCalendarProperties.css b/UI/WebServerResources/UIxCalendarProperties.css index 790375430..2047667ff 100644 --- a/UI/WebServerResources/UIxCalendarProperties.css +++ b/UI/WebServerResources/UIxCalendarProperties.css @@ -53,6 +53,9 @@ INPUT#calendarSyncTag LABEL { white-space: nowrap; } +#davLinks A +{ margin-left: 60px; } + #webCalendarUrl SPAN.content { white-space: nowrap; overflow: hidden; } diff --git a/UI/WebServerResources/generic.js b/UI/WebServerResources/generic.js index d84af51bc..e83af18ab 100644 --- a/UI/WebServerResources/generic.js +++ b/UI/WebServerResources/generic.js @@ -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); }