From 34eef8022a0506d280312e3d0a1b43e5f0f4111e Mon Sep 17 00:00:00 2001 From: wolfgang Date: Tue, 13 Feb 2007 22:12:43 +0000 Subject: [PATCH] git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1022 d1b88da0-ebda-0310-925b-ed51d893ca5b --- ChangeLog | 23 ++++++++++ SoObjects/Appointments/product.plist | 1 + .../French.lproj/Localizable.strings | 14 +++---- UI/MailPartViewers/UIxMailPartICalViewer.m | 2 +- UI/Scheduler/GNUmakefile | 12 +----- .../Toolbars/SOGoAppointmentFolder.toolbar | 4 ++ UI/Scheduler/UIxCalDayTable.m | 6 ++- UI/Scheduler/UIxCalView.m | 2 +- UI/Scheduler/product.plist | 42 ++----------------- UI/WebServerResources/SchedulerUI.css | 5 ++- UI/WebServerResources/SchedulerUI.js | 18 +++++++- UI/WebServerResources/generic.js | 23 ++++++++++ 12 files changed, 90 insertions(+), 62 deletions(-) diff --git a/ChangeLog b/ChangeLog index bab0b29e..90bbbff2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,26 @@ +2007-02-13 Wolfgang Sourdeau + + * UI/Scheduler/UIxCalMulticolumnDayView.[hm]: new daily view + module which shows each selected user's calendar in a different + column instead of mixing their events together. + + * UI/Scheduler/UIxCalView.m ([UIxCalView -redirectForUIDsAction]): + replaced use of [NSString stringByTrimmingWhiteSpaces] with + [NSString stringByTrimmingSpaces]. + + * UI/MailPartViewers/UIxMailPartICalViewer.m: request the key + "cnWithoutQuotes" instead of "cnForDisplay", which no longer + exists. + + * UI/Scheduler/UIxCalDayOverview.m, + UI/Scheduler/UIxCalDayChartview.m, + UI/Scheduler/UIxCalDayListview.m, + UI/Scheduler/UIxCalWeekOverview.m, + UI/Scheduler/UIxCalWeekChartview.m, + UI/Scheduler/UIxCalWeekListview.m, + UI/Scheduler/UIxCalInlineMonthOverview.m, + UI/Scheduler/UIxCalYearOverview.m: removed unused modules. + 2007-02-09 Wolfgang Sourdeau * SoObjects/Contacts/SOGoContactFolders.m ([SOGoContactFolders diff --git a/SoObjects/Appointments/product.plist b/SoObjects/Appointments/product.plist index e9856d90..bb2f1a81 100644 --- a/SoObjects/Appointments/product.plist +++ b/SoObjects/Appointments/product.plist @@ -13,6 +13,7 @@ defaultRoles = { "View" = ( "Owner", "Delegate", "Assistant" ); "FreeBusyLookup" = ( "Owner", "Delegate", "Assistant", "FreeBusy" ); + "Add Documents, Images, and Files" = ( "Owner", "Delegate" ); }; }; diff --git a/UI/MailPartViewers/French.lproj/Localizable.strings b/UI/MailPartViewers/French.lproj/Localizable.strings index c9475001..d7cacae2 100644 --- a/UI/MailPartViewers/French.lproj/Localizable.strings +++ b/UI/MailPartViewers/French.lproj/Localizable.strings @@ -1,10 +1,10 @@ -ACCEPTED = "Accepté" -COMPLETED = "Terminé" -DECLINED = "Refusé" -DELEGATED = "Délégué" -IN-PROCESS = "En cours de traitement" -NEEDS-ACTION = "Prise de décision nécessaire" -TENTATIVE = "Proposition" +ACCEPTED = "Accepté"; +COMPLETED = "Terminé"; +DECLINED = "Refusé"; +DELEGATED = "Délégué"; +IN-PROCESS = "En cours de traitement"; +NEEDS-ACTION = "Prise de décision nécessaire"; +TENTATIVE = "Proposition"; organized_by_you = "vous êtes l'organisateur"; you_are_an_attendee = "vous êtes invité"; add_info_text = "iMIP 'ADD' requests are not yet supported by SOGo."; diff --git a/UI/MailPartViewers/UIxMailPartICalViewer.m b/UI/MailPartViewers/UIxMailPartICalViewer.m index a91b8311..365d144e 100644 --- a/UI/MailPartViewers/UIxMailPartICalViewer.m +++ b/UI/MailPartViewers/UIxMailPartICalViewer.m @@ -257,7 +257,7 @@ NSString *cn; if ((organizer = [[self authorativeEvent] organizer]) != nil) { - cn = [organizer valueForKey:@"cnForDisplay"]; + cn = [organizer valueForKey:@"cnWithoutQuotes"]; if ([cn isNotNull] && [cn length] > 0) return cn; diff --git a/UI/Scheduler/GNUmakefile b/UI/Scheduler/GNUmakefile index 36018de1..e38c0314 100644 --- a/UI/Scheduler/GNUmakefile +++ b/UI/Scheduler/GNUmakefile @@ -24,21 +24,12 @@ SchedulerUI_OBJC_FILES = \ UIxCalAptListView.m \ UIxCalTasksListView.m \ UIxCalDayView.m \ + UIxCalMulticolumnDayView.m \ UIxCalWeekView.m \ UIxCalMonthView.m \ UIxCalMonthViewOld.m \ UIxAptTableView.m \ \ - UIxCalDayOverview.m \ - UIxCalDayChartview.m \ - UIxCalDayListview.m \ - UIxCalWeekOverview.m \ - UIxCalWeekChartview.m \ - UIxCalWeekListview.m \ - UIxCalWeekColumnsview.m \ - UIxCalMonthOverview.m \ - UIxCalYearOverview.m \ - UIxCalInlineMonthOverview.m \ UIxComponentEditor.m \ UIxFreeBusyUserSelector.m \ UIxFreeBusyUserSelectorTable.m \ @@ -56,6 +47,7 @@ SchedulerUI_OBJC_FILES = \ UIxCalInlineAptView.m \ UIxCalScheduleOverview.m \ UIxCalParticipationStatusView.m \ + UIxCalMonthOverview.m SchedulerUI_RESOURCE_FILES += \ Version \ diff --git a/UI/Scheduler/Toolbars/SOGoAppointmentFolder.toolbar b/UI/Scheduler/Toolbars/SOGoAppointmentFolder.toolbar index ceca26f9..64353fe2 100644 --- a/UI/Scheduler/Toolbars/SOGoAppointmentFolder.toolbar +++ b/UI/Scheduler/Toolbars/SOGoAppointmentFolder.toolbar @@ -25,6 +25,10 @@ label="Day View"; onclick = "return onDayOverview();"; image = "day-view.png"; }, + { link = "dayoverview"; + label="Multicolumn Day View"; + onclick = "return onMulticolumnDayOverview();"; + image = "day-view-multicolumn.png"; }, { link = "weekoverview"; label="Week View"; onclick = "return onWeekOverview();"; diff --git a/UI/Scheduler/UIxCalDayTable.m b/UI/Scheduler/UIxCalDayTable.m index 9357b8e3..409bbdcf 100644 --- a/UI/Scheduler/UIxCalDayTable.m +++ b/UI/Scheduler/UIxCalDayTable.m @@ -147,6 +147,8 @@ addObject: [NSString stringWithFormat: @"%d", currentHour]]; currentHour++; } + [hoursToDisplay + addObject: [NSString stringWithFormat: @"%d", currentHour]]; } return hoursToDisplay; @@ -257,7 +259,7 @@ start = [currentTableDay hour: [self dayStartHour] minute: 0]; endHour = [self dayEndHour]; if (endHour < 24) - end = [currentTableDay hour: [self dayEndHour] minute: 0]; + end = [currentTableDay hour: [self dayEndHour] minute: 59]; else end = [[currentTableDay tomorrow] hour: 0 minute: 0]; @@ -288,7 +290,7 @@ return currentAppointment; } -- (NSArray *) appointmentsClasses +- (NSString *) appointmentsClasses { return [NSString stringWithFormat: @"appointments appointmentsFor%dDays", numberOfDays]; diff --git a/UI/Scheduler/UIxCalView.m b/UI/Scheduler/UIxCalView.m index b56c2429..adf89919 100644 --- a/UI/Scheduler/UIxCalView.m +++ b/UI/Scheduler/UIxCalView.m @@ -602,7 +602,7 @@ static BOOL shouldDisplayWeekend = NO; unsigned index; uidsString = [self queryParameterForKey: @"userUIDString"]; - uidsString = [uidsString stringByTrimmingWhiteSpaces]; + uidsString = [uidsString stringByTrimmingSpaces]; [self setQueryParameter: nil forKey: @"userUIDString"]; prevMethod = [self queryParameterForKey: @"previousMethod"]; diff --git a/UI/Scheduler/product.plist b/UI/Scheduler/product.plist index c0fdd8b3..e9f0cf4c 100644 --- a/UI/Scheduler/product.plist +++ b/UI/Scheduler/product.plist @@ -56,6 +56,10 @@ protectedBy = "View"; pageName = "UIxCalDayView"; }; + multicolumndayview = { + protectedBy = "View"; + pageName = "UIxCalMulticolumnDayView"; + }; weekview = { protectedBy = "View"; pageName = "UIxCalWeekView"; @@ -107,44 +111,6 @@ protectedBy = "View"; pageName = "UIxFreeBusyUserSelectorTable"; }; - -/* TODO: delete the following components */ - dayoverview = { - protectedBy = "View"; - pageName = "UIxCalDayOverview"; - }; - daychartview = { - protectedBy = "View"; - pageName = "UIxCalDayChartview"; - }; - daylistview = { - protectedBy = "View"; - pageName = "UIxCalDayListview"; - }; - weekoverview = { - protectedBy = "View"; - pageName = "UIxCalWeekOverview"; - }; - weekchartview = { - protectedBy = "View"; - pageName = "UIxCalWeekChartview"; - }; - weeklistview = { - protectedBy = "View"; - pageName = "UIxCalWeekListview"; - }; - weekcolumnsview = { - protectedBy = "View"; - pageName = "UIxCalWeekColumnsview"; - }; - monthoverview = { - protectedBy = "View"; - pageName = "UIxCalMonthOverview"; - }; - yearoverview = { - protectedBy = "View"; - pageName = "UIxCalYearOverview"; - }; }; }; diff --git a/UI/WebServerResources/SchedulerUI.css b/UI/WebServerResources/SchedulerUI.css index cb615858..edc70623 100644 --- a/UI/WebServerResources/SchedulerUI.css +++ b/UI/WebServerResources/SchedulerUI.css @@ -611,10 +611,13 @@ DIV.daysView DIV.days left: 5em; right: 0px; } +DIV.multicolumnDayView DIV.lastDayUser +{ border-right: 1px solid #397d94; } + DIV.daysView DIV.day { position: absolute; - left: 0px; border-left: 1px solid #397d94; + left: 0px; top: 0px; bottom: 0px; } diff --git a/UI/WebServerResources/SchedulerUI.js b/UI/WebServerResources/SchedulerUI.js index f2d800c3..6aa1bfb3 100644 --- a/UI/WebServerResources/SchedulerUI.js +++ b/UI/WebServerResources/SchedulerUI.js @@ -22,8 +22,12 @@ function newEvent(sender, type) { if (!day) day = currentDay; + var user = UserLogin; + if (currentView == "multicolumndayview" && type == "event") + user = sender.parentNode.parentNode.getAttribute("user"); + var hour = sender.getAttribute("hour"); - var urlstr = ApplicationBaseURL + "new" + type; + var urlstr = UserFolderURL + "../" + user + "/Calendar/new" + type; var params = new Array(); if (day) params.push("day=" + day); @@ -375,6 +379,7 @@ function changeDateSelectorDisplay(day, keepCurrentDay) if (!keepCurrentDay) currentDay = day; + log (backtrace()); var month = day.substr(0, 6); if (cachedDateSelectors[month]) { // log ("restoring cached selector for month: " + month); @@ -442,6 +447,11 @@ function onDayOverview() return _ensureView("dayview"); } +function onMulticolumnDayOverview() +{ + return _ensureView("multicolumndayview"); +} + function onWeekOverview() { return _ensureView("weekview"); @@ -773,7 +783,11 @@ function onCalendarSelectAppointment() { } function onCalendarSelectDay(event) { - var day = this.getAttribute("day"); + var day; + if (currentView == "multicolumndayview") + day = this.parentNode.getAttribute("day"); + else + day = this.getAttribute("day"); var needRefresh = (listFilter == 'view_selectedday' && day != currentDay); diff --git a/UI/WebServerResources/generic.js b/UI/WebServerResources/generic.js index 2d55e455..a4586b9d 100644 --- a/UI/WebServerResources/generic.js +++ b/UI/WebServerResources/generic.js @@ -554,6 +554,29 @@ function log(message) { logConsole.innerHTML += message + '
' + "\n"; } +function backtrace() { + var func = backtrace.caller; + var str = "backtrace:
"; + + while (func) + { + if (func.name) + { + str += " " + func.name; + if (this) + str += " (" + this + ")"; + } + else + str += "[anonymous]\n"; + + str += "
"; + func = func.caller; + } + str += "--\n"; + + return str; +} + function dropDownSubmenu(event) { var node = event.target; var submenu = node.getAttribute("submenu"); -- 2.39.5