From e7f0c9c03f5abd85c66245830261a2cbe2a3b226 Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Fri, 7 Sep 2012 19:46:49 +0000 Subject: [PATCH] See ChangeLog Monotone-Parent: eb22f4d3b368a79ce56bcad18f9f176fff0cb73c Monotone-Revision: 157670819f732591d0987b295faeb89c843803db Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2012-09-07T19:46:49 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 23 +++ NEWS | 12 +- .../Localizable.strings | 1 + .../Catalan.lproj/Localizable.strings | 1 + UI/Scheduler/Czech.lproj/Localizable.strings | 1 + UI/Scheduler/Danish.lproj/Localizable.strings | 1 + UI/Scheduler/Dutch.lproj/Localizable.strings | 2 +- .../English.lproj/Localizable.strings | 1 + UI/Scheduler/French.lproj/Localizable.strings | 1 + UI/Scheduler/German.lproj/Localizable.strings | 1 + .../Hungarian.lproj/Localizable.strings | 1 + .../Icelandic.lproj/Localizable.strings | 1 + .../Italian.lproj/Localizable.strings | 1 + UI/Scheduler/NSArray+Scheduler.m | 8 +- .../NorwegianBokmal.lproj/Localizable.strings | 2 +- .../Localizable.strings | 1 + UI/Scheduler/Polish.lproj/Localizable.strings | 1 + .../Russian.lproj/Localizable.strings | 1 + .../Localizable.strings | 1 + .../SpanishSpain.lproj/Localizable.strings | 1 + .../Swedish.lproj/Localizable.strings | 1 + UI/Scheduler/UIxCalListingActions.m | 11 +- UI/Scheduler/UIxCalMainView.m | 38 ++++- .../Ukrainian.lproj/Localizable.strings | 1 + UI/Scheduler/Welsh.lproj/Localizable.strings | 1 + UI/Scheduler/product.plist | 5 + .../ContactsUI/UIxContactFoldersView.wox | 42 ++--- UI/Templates/SchedulerUI/UIxCalMainView.wox | 89 ++++++----- .../SchedulerUI/UIxCalendarSelector.wox | 27 ++-- UI/WebServerResources/ContactsUI.css | 40 +---- UI/WebServerResources/ContactsUI.js | 6 +- UI/WebServerResources/HTMLTableElement.js | 3 + UI/WebServerResources/SOGoTabsController.js | 12 +- UI/WebServerResources/SchedulerUI.css | 139 ++++++++-------- UI/WebServerResources/SchedulerUI.js | 148 ++++++++++++------ UI/WebServerResources/generic.css | 12 +- UI/WebServerResources/generic.js | 2 +- UI/WebServerResources/iefixes.css | 9 +- 38 files changed, 389 insertions(+), 259 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2d02d5a1f..59ee2278f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,26 @@ +2012-09-07 Francis Lachapelle + + * UI/WebServerResources/SchedulerUI.js (tasksListCallback): list + the tasks in a table, along the events table. + (saveTabState): save which of the events or the tasks tab is + selected. + + * UI/WebServerResources/SOGoTabsController.js + (attachToTabsContainer): select and show the active tab if it's + defined. + + * UI/WebServerResources/HTMLTableElement.js (getSelectedRows): + accept calling this method from a "tbody". + + * UI/Scheduler/UIxCalMainView.m (-saveSelectedListAction): new + method to save the name of the selected tab (events or tasks). + (-eventsTabClass): return "active" if the selected tab was "events". + (-tasksTabClass): idem for "tasks". + + * UI/Scheduler/UIxCalListingActions.m (-tasksListAction): added + more quick fields, including the calendar name, location, category + and a formatted version of the due date. + 2012-09-07 Wolfgang Sourdeau * OpenChange/MAPIStoreContext.m (CompleteURLFromMapistoreURI): diff --git a/NEWS b/NEWS index 8039b8bd2..cccf0e64d 100644 --- a/NEWS +++ b/NEWS @@ -1,9 +1,19 @@ +2.0.0 (2012-09-DD) +------------------- +New Features + +Enhancements + - calendars list and mini-calendar are now always visible + - tasks list has moved to a table in a tabs view along the events list + +Bug Fixes + 1.3.18a (2012-09-04) ------------------- Bug Fixes - fixed display of weekly events with no day mask - fixed parsing of mail headers - - fixed support for OS X 10.8 (Mounting Lion) + - fixed support for OS X 10.8 (Mountain Lion) 1.3.18 (2012-08-28) ------------------- diff --git a/UI/Scheduler/BrazilianPortuguese.lproj/Localizable.strings b/UI/Scheduler/BrazilianPortuguese.lproj/Localizable.strings index 764fcb981..083a5fcd3 100644 --- a/UI/Scheduler/BrazilianPortuguese.lproj/Localizable.strings +++ b/UI/Scheduler/BrazilianPortuguese.lproj/Localizable.strings @@ -502,6 +502,7 @@ validate_endbeforestart = "A data que você informou ocorre antes da data ini "Title" = "Título"; "Start" = "Início"; "End" = "Fim"; +"Due Date" = "Data"; "Location" = "Localização"; "(Private Event)" = "(Evento Privado)"; diff --git a/UI/Scheduler/Catalan.lproj/Localizable.strings b/UI/Scheduler/Catalan.lproj/Localizable.strings index e5fd66ec3..196252c4b 100644 --- a/UI/Scheduler/Catalan.lproj/Localizable.strings +++ b/UI/Scheduler/Catalan.lproj/Localizable.strings @@ -503,6 +503,7 @@ validate_endbeforestart = "La data/hora de començament és posterior a la d' "Title" = "Títol"; "Start" = "Inici"; "End" = "Final"; +"Due Date" = "Data límit"; "Location" = "Lloc"; "(Private Event)" = "(Esdeveniment privat)"; diff --git a/UI/Scheduler/Czech.lproj/Localizable.strings b/UI/Scheduler/Czech.lproj/Localizable.strings index 6782ed442..7bf5301c3 100644 --- a/UI/Scheduler/Czech.lproj/Localizable.strings +++ b/UI/Scheduler/Czech.lproj/Localizable.strings @@ -503,6 +503,7 @@ validate_endbeforestart = "Zadané datum konce je před začátkem události. "Title" = "Název"; "Start" = "Začátek"; "End" = "Konec"; +"Due Date" = "Datum splnění"; "Location" = "Místo"; "(Private Event)" = "(Soukromá událost)"; diff --git a/UI/Scheduler/Danish.lproj/Localizable.strings b/UI/Scheduler/Danish.lproj/Localizable.strings index 0730e8917..b95f3235b 100644 --- a/UI/Scheduler/Danish.lproj/Localizable.strings +++ b/UI/Scheduler/Danish.lproj/Localizable.strings @@ -507,6 +507,7 @@ Behold de aktuelle indstillinger alligevel?"; "Title" = "Titel"; "Start" = "Start"; "End" = "Slut"; +"Due Date" = "Forfaldsdato"; "Location" = "Sted"; "(Private Event)" = "(Privat begivenhed)"; diff --git a/UI/Scheduler/Dutch.lproj/Localizable.strings b/UI/Scheduler/Dutch.lproj/Localizable.strings index 020617f6b..26a6fffb2 100644 --- a/UI/Scheduler/Dutch.lproj/Localizable.strings +++ b/UI/Scheduler/Dutch.lproj/Localizable.strings @@ -1,4 +1,3 @@ -/* this file is in UTF-8 format! */ /* Tooltips */ @@ -503,6 +502,7 @@ validate_endbeforestart = "Het einde is voor de begindatum."; "Title" = "Titel"; "Start" = "Begin"; "End" = "Eind"; +"Due Date" = "Verloopdatum"; "Location" = "Plaats"; "(Private Event)" = "(Privé-afspraak)"; diff --git a/UI/Scheduler/English.lproj/Localizable.strings b/UI/Scheduler/English.lproj/Localizable.strings index 00420ef65..19d33077e 100644 --- a/UI/Scheduler/English.lproj/Localizable.strings +++ b/UI/Scheduler/English.lproj/Localizable.strings @@ -503,6 +503,7 @@ validate_endbeforestart = "The end date that you entered occurs before the st "Title" = "Title"; "Start" = "Start"; "End" = "End"; +"Due Date" = "Due Date"; "Location" = "Location"; "(Private Event)" = "(Private Event)"; diff --git a/UI/Scheduler/French.lproj/Localizable.strings b/UI/Scheduler/French.lproj/Localizable.strings index 0c19343bc..8ae970b37 100644 --- a/UI/Scheduler/French.lproj/Localizable.strings +++ b/UI/Scheduler/French.lproj/Localizable.strings @@ -503,6 +503,7 @@ validate_endbeforestart = "La date de fin est avant la date de début."; "Title" = "Titre"; "Start" = "Début"; "End" = "Fin"; +"Due Date" = "Fin prévue"; "Location" = "Lieu"; "(Private Event)" = "(Événement privé)"; diff --git a/UI/Scheduler/German.lproj/Localizable.strings b/UI/Scheduler/German.lproj/Localizable.strings index edc8861d2..0e75310b6 100644 --- a/UI/Scheduler/German.lproj/Localizable.strings +++ b/UI/Scheduler/German.lproj/Localizable.strings @@ -503,6 +503,7 @@ validate_endbeforestart = "Ihr Ende ist vor dem Beginndatum."; "Title" = "Titel"; "Start" = "Beginn"; "End" = "Ende"; +"Due Date" = "Fällig"; "Location" = "Ort"; "(Private Event)" = "(Privater Termin)"; diff --git a/UI/Scheduler/Hungarian.lproj/Localizable.strings b/UI/Scheduler/Hungarian.lproj/Localizable.strings index 636baebb3..0cca4176d 100644 --- a/UI/Scheduler/Hungarian.lproj/Localizable.strings +++ b/UI/Scheduler/Hungarian.lproj/Localizable.strings @@ -503,6 +503,7 @@ validate_endbeforestart = "A megadott befejező dátum korábbi, mint a kezd "Title" = "Cím"; "Start" = "Kezdés"; "End" = "Befejezés"; +"Due Date" = "Lejárat"; "Location" = "Hely"; "(Private Event)" = "(Magán esemény)"; diff --git a/UI/Scheduler/Icelandic.lproj/Localizable.strings b/UI/Scheduler/Icelandic.lproj/Localizable.strings index f99e7ccac..d06b81332 100644 --- a/UI/Scheduler/Icelandic.lproj/Localizable.strings +++ b/UI/Scheduler/Icelandic.lproj/Localizable.strings @@ -502,6 +502,7 @@ validate_endbeforestart = "Lokadagurinn sem er tilgreindur, er fyrr en byrjun "Title" = "Titill"; "Start" = "Byrjun"; "End" = "Endir"; +"Due Date" = "Lokadagur"; "Location" = "Staðsetning"; "(Private Event)" = "(Einkaviðburður)"; diff --git a/UI/Scheduler/Italian.lproj/Localizable.strings b/UI/Scheduler/Italian.lproj/Localizable.strings index d99d097d7..ada7fcb3a 100644 --- a/UI/Scheduler/Italian.lproj/Localizable.strings +++ b/UI/Scheduler/Italian.lproj/Localizable.strings @@ -503,6 +503,7 @@ validate_endbeforestart = "La data finale specificata è precedente alla data "Title" = "Titolo"; "Start" = "Inizio"; "End" = "Fine"; +"Due Date" = "Scadenza"; "Location" = "Luogo"; "(Private Event)" = "(Evento privato)"; diff --git a/UI/Scheduler/NSArray+Scheduler.m b/UI/Scheduler/NSArray+Scheduler.m index 148c8b4aa..9a3d6234b 100644 --- a/UI/Scheduler/NSArray+Scheduler.m +++ b/UI/Scheduler/NSArray+Scheduler.m @@ -124,8 +124,8 @@ if (result == NSOrderedSame) { // End date - selfTime = [[self objectAtIndex: 4] intValue]; - otherTime = [[otherTask objectAtIndex: 4] intValue]; + selfTime = [[self objectAtIndex: 5] intValue]; + otherTime = [[otherTask objectAtIndex: 5] intValue]; if (selfTime && !otherTime) result = NSOrderedAscending; else if (!selfTime && otherTime) @@ -143,8 +143,8 @@ compare: [otherTask objectAtIndex: 1]]; if (result == NSOrderedSame) // Task name - result = [[self objectAtIndex: 3] - compare: [otherTask objectAtIndex: 3] + result = [[self objectAtIndex: 4] + compare: [otherTask objectAtIndex: 4] options: NSCaseInsensitiveSearch]; } } diff --git a/UI/Scheduler/NorwegianBokmal.lproj/Localizable.strings b/UI/Scheduler/NorwegianBokmal.lproj/Localizable.strings index 792c26fe6..162ee7ebd 100644 --- a/UI/Scheduler/NorwegianBokmal.lproj/Localizable.strings +++ b/UI/Scheduler/NorwegianBokmal.lproj/Localizable.strings @@ -1,4 +1,3 @@ -/* this file is in UTF-8 format! */ /* Tooltips */ @@ -502,6 +501,7 @@ validate_endbeforestart = "Angitt sluttdato inntreffer før angitt startdato. "Title" = "Tittel"; "Start" = "Start"; "End" = "Slutt"; +"Due Date" = "Dato"; "Location" = "Plass"; "(Private Event)" = "(Privat hendelse)"; diff --git a/UI/Scheduler/NorwegianNynorsk.lproj/Localizable.strings b/UI/Scheduler/NorwegianNynorsk.lproj/Localizable.strings index 29710aeff..daba86ccc 100644 --- a/UI/Scheduler/NorwegianNynorsk.lproj/Localizable.strings +++ b/UI/Scheduler/NorwegianNynorsk.lproj/Localizable.strings @@ -502,6 +502,7 @@ validate_endbeforestart = "Angitt sluttdato inntreffer før angitt startdato. "Title" = "Tittel"; "Start" = "Start"; "End" = "Slutt"; +"Due Date" = "Dato"; "Location" = "Plass"; "(Private Event)" = "(Privat hendelse)"; diff --git a/UI/Scheduler/Polish.lproj/Localizable.strings b/UI/Scheduler/Polish.lproj/Localizable.strings index bf224b00d..49a1624d2 100644 --- a/UI/Scheduler/Polish.lproj/Localizable.strings +++ b/UI/Scheduler/Polish.lproj/Localizable.strings @@ -502,6 +502,7 @@ validate_endbeforestart = "Podana data końca jest wcześniejsza niż data po "Title" = "Tytuł"; "Start" = "Początek"; "End" = "Koniec"; +"Due Date" = "Termin"; "Location" = "Miejsce"; "(Private Event)" = "(Wydarzenie prywatne)"; diff --git a/UI/Scheduler/Russian.lproj/Localizable.strings b/UI/Scheduler/Russian.lproj/Localizable.strings index 1946593da..795df06e8 100644 --- a/UI/Scheduler/Russian.lproj/Localizable.strings +++ b/UI/Scheduler/Russian.lproj/Localizable.strings @@ -503,6 +503,7 @@ validate_endbeforestart = "Дата начала позже даты конц "Title" = "Название"; "Start" = "Начало"; "End" = "Конец"; +"Due Date" = "К дате"; "Location" = "Место"; "(Private Event)" = "(Приватное событие)"; diff --git a/UI/Scheduler/SpanishArgentina.lproj/Localizable.strings b/UI/Scheduler/SpanishArgentina.lproj/Localizable.strings index 2e3c4430e..6bb0305b8 100644 --- a/UI/Scheduler/SpanishArgentina.lproj/Localizable.strings +++ b/UI/Scheduler/SpanishArgentina.lproj/Localizable.strings @@ -503,6 +503,7 @@ validate_endbeforestart = "La fecha/hora de inicio es posterior a la de fin." "Title" = "Título"; "Start" = "Inicio"; "End" = "Fin"; +"Due Date" = "Vencimiento"; "Location" = "Lugar"; "(Private Event)" = "(Evento privado)"; diff --git a/UI/Scheduler/SpanishSpain.lproj/Localizable.strings b/UI/Scheduler/SpanishSpain.lproj/Localizable.strings index 8ca477088..1498be81e 100644 --- a/UI/Scheduler/SpanishSpain.lproj/Localizable.strings +++ b/UI/Scheduler/SpanishSpain.lproj/Localizable.strings @@ -503,6 +503,7 @@ validate_endbeforestart = "La fecha/hora de inicio es posterior a la de fin." "Title" = "Título"; "Start" = "Inicio"; "End" = "Fin"; +"Due Date" = "Vencimiento"; "Location" = "Lugar"; "(Private Event)" = "(Evento privado)"; diff --git a/UI/Scheduler/Swedish.lproj/Localizable.strings b/UI/Scheduler/Swedish.lproj/Localizable.strings index db43bc72f..c9e2bb0d1 100644 --- a/UI/Scheduler/Swedish.lproj/Localizable.strings +++ b/UI/Scheduler/Swedish.lproj/Localizable.strings @@ -502,6 +502,7 @@ validate_endbeforestart = "Angivet slutdatumet inträffar före angivet start "Title" = "Titel"; "Start" = "Start"; "End" = "Slut"; +"Due Date" = "Datum"; "Location" = "Plats"; "(Private Event)" = "(Privat händelse)"; diff --git a/UI/Scheduler/UIxCalListingActions.m b/UI/Scheduler/UIxCalListingActions.m index 7782c3216..5a4bbdf93 100644 --- a/UI/Scheduler/UIxCalListingActions.m +++ b/UI/Scheduler/UIxCalListingActions.m @@ -96,8 +96,10 @@ static NSArray *tasksFields = nil; if (!tasksFields) { tasksFields = [NSArray arrayWithObjects: @"c_name", @"c_folder", + @"calendarName", @"c_status", @"c_title", @"c_enddate", - @"c_classification", @"editable", @"erasable", + @"c_classification", @"c_location", @"c_category", + @"editable", @"erasable", @"c_priority", nil]; [tasksFields retain]; } @@ -1069,14 +1071,17 @@ _computeBlocksPosition (NSArray *blocks) forComponentOfType: @"vtodo"] objectEnumerator]; while ((task = [tasks nextObject])) { - statusCode = [[task objectAtIndex: 2] intValue]; + statusCode = [[task objectAtIndex: 3] intValue]; if (statusCode != 1 || showCompleted) { filteredTask = [NSMutableArray arrayWithArray: task]; - endDateStamp = [[task objectAtIndex: 4] intValue]; + endDateStamp = [[task objectAtIndex: 5] intValue]; statusFlag = [self _getStatusClassForStatusCode: statusCode andEndDateStamp: endDateStamp]; [filteredTask addObject: statusFlag]; + if (endDateStamp > 0) + [filteredTask addObject: [self _formattedDateForSeconds: endDateStamp + forAllDay: NO]]; [filteredTasks addObject: filteredTask]; } } diff --git a/UI/Scheduler/UIxCalMainView.m b/UI/Scheduler/UIxCalMainView.m index 455ca3c99..9bd30c2a9 100644 --- a/UI/Scheduler/UIxCalMainView.m +++ b/UI/Scheduler/UIxCalMainView.m @@ -166,7 +166,7 @@ [self _setupContext]; height = [moduleSettings objectForKey: @"DragHandleVertical"]; - return ((height && [height intValue] > 0) ? [NSString stringWithFormat: @"%ipx", ([height intValue] - 27)] : nil); + return ((height && [height intValue] > 0) ? [NSString stringWithFormat: @"%ipx", [height intValue]] : nil); } - (WOResponse *) saveDragHandleStateAction @@ -192,6 +192,42 @@ return [self responseWithStatus: 204]; } +- (NSString *) eventsTabClass +{ + NSString *list; + + [self _setupContext]; + list = [moduleSettings objectForKey: @"SelectedList"]; + + return (list && [list compare: @"eventsListView"] == NSOrderedSame)? @"active" : @""; +} + +- (NSString *) tasksTabClass +{ + NSString *list; + + [self _setupContext]; + list = [moduleSettings objectForKey: @"SelectedList"]; + + return (list && [list compare: @"tasksListView"] == NSOrderedSame)? @"active" : @""; +} + +- (WOResponse *) saveSelectedListAction +{ + WORequest *request; + NSString *selectedList; + + [self _setupContext]; + request = [context request]; + + selectedList = [request formValueForKey: @"list"]; + [moduleSettings setObject: selectedList + forKey: @"SelectedList"]; + [us synchronize]; + + return [self responseWithStatus: 204]; +} + - (unsigned int) firstDayOfWeek { SOGoUserDefaults *ud; diff --git a/UI/Scheduler/Ukrainian.lproj/Localizable.strings b/UI/Scheduler/Ukrainian.lproj/Localizable.strings index 467f117f3..5a0924955 100644 --- a/UI/Scheduler/Ukrainian.lproj/Localizable.strings +++ b/UI/Scheduler/Ukrainian.lproj/Localizable.strings @@ -502,6 +502,7 @@ validate_endbeforestart = "Дата закінчення передує да "Title" = "Назва"; "Start" = "Початок"; "End" = "Кінець"; +"Due Date" = "Дійсно до"; "Location" = "Місце"; "(Private Event)" = "(Особиста подія)"; diff --git a/UI/Scheduler/Welsh.lproj/Localizable.strings b/UI/Scheduler/Welsh.lproj/Localizable.strings index 2f13952a3..9a4154ce8 100644 --- a/UI/Scheduler/Welsh.lproj/Localizable.strings +++ b/UI/Scheduler/Welsh.lproj/Localizable.strings @@ -502,6 +502,7 @@ validate_endbeforestart = "Mae'r dyddiad gorffen sydd wedi'i roi yn digwydd c "Title" = "Teitl"; "Start" = "Dechrau"; "End" = "Diwedd"; +"Due Date" = "Dyddiad dyledus"; "Location" = "Lleoliad"; "(Private Event)" = "(Digwyddiad preifat)"; diff --git a/UI/Scheduler/product.plist b/UI/Scheduler/product.plist index d23ccf387..128fe8117 100644 --- a/UI/Scheduler/product.plist +++ b/UI/Scheduler/product.plist @@ -50,6 +50,11 @@ pageName = "UIxCalMainView"; actionName = "saveDragHandleState"; }; + saveSelectedList = { + protectedBy = "View"; + pageName = "UIxCalMainView"; + actionName = "saveSelectedList"; + }; dateselector = { protectedBy = "View"; pageName = "UIxCalDateSelector"; diff --git a/UI/Templates/ContactsUI/UIxContactFoldersView.wox b/UI/Templates/ContactsUI/UIxContactFoldersView.wox index 5cbecd695..0207bca6b 100644 --- a/UI/Templates/ContactsUI/UIxContactFoldersView.wox +++ b/UI/Templates/ContactsUI/UIxContactFoldersView.wox @@ -88,36 +88,19 @@ -
-
-
    -
  • - -
  • -
- +
+
+
+ + +
-
-
diff --git a/UI/Templates/SchedulerUI/UIxCalMainView.wox b/UI/Templates/SchedulerUI/UIxCalMainView.wox index 10092bd05..7b7ccf7b6 100644 --- a/UI/Templates/SchedulerUI/UIxCalMainView.wox +++ b/UI/Templates/SchedulerUI/UIxCalMainView.wox @@ -26,7 +26,7 @@ DIV#rightDragHandle, DIV#calendarView { top: ; } - DIV#eventsListView + DIV#schedulerTabs { height: ; } @@ -132,49 +132,60 @@
-
-
    -
  • -
  • -
-
-
-
-
-
- -
- -
-
+
+
- -
- - - - - - - - - - - -
+
+
    +
  • +
  • +
+
+
+ + + + + + + + + + + + +
+
+
+ + + + + + + + + + + + + +
+
+
diff --git a/UI/Templates/SchedulerUI/UIxCalendarSelector.wox b/UI/Templates/SchedulerUI/UIxCalendarSelector.wox index 33e935c7b..0971911e8 100644 --- a/UI/Templates/SchedulerUI/UIxCalendarSelector.wox +++ b/UI/Templates/SchedulerUI/UIxCalendarSelector.wox @@ -15,6 +15,7 @@ div.colorBox.calendarFolder
+
-
-
    -
  • - -
    OO
  • -
    -
-
+
    +
  • + +
    OO
  • +
    +
diff --git a/UI/WebServerResources/ContactsUI.css b/UI/WebServerResources/ContactsUI.css index c2298cadc..cd96646f7 100644 --- a/UI/WebServerResources/ContactsUI.css +++ b/UI/WebServerResources/ContactsUI.css @@ -103,24 +103,17 @@ TABLE.titletable TD.titlecell SELECT DIV#contactFoldersList { position: absolute; - top: 84px; + top: 82px; left: 0px; width: 15em; + background-color: #CCDDEC; bottom: 0px; margin: 0px; padding: 0px; overflow: hidden; } -DIV#smallToolbarContainer -{ height: 50px; - margin: 0px 2px; } - -DIV#smallToolbarContainer > .tabs -{ margin: 0px 2px; - height: 40px; } - DIV#abToolbar -{ height: 38px; } +{ padding-left: 6px; } SPAN.toolbarButton { float: none; @@ -130,27 +123,15 @@ A.toolbarButton { text-decoration: none; } UL#contactFolders -{ display: block; - list-style-type: none; +{ list-style-type: none; list-style-image: none; - clear: both; + clear: left; cursor: default; color: #000; - background: #CCDDEC; - position: absolute; /* required for Safari & IE */ - top: 68px; /* leave space for the mini addressbook */ - bottom: 0px; - left: 0; - right: 0; - width: auto; margin: 0px; padding: 0px; overflow: auto; overflow-x: hidden; - border-top: 1px solid #909090; - border-left: 1px solid #909090; - border-bottom: 1px solid #FFFFFF; - border-right: 1px solid #FFFFFF; -moz-user-select: none; -khtml-user-select: none; } @@ -158,11 +139,10 @@ UL#contactFolders UL#contactFolders LI { background-repeat: no-repeat; - background-position: 4px 2px; + background-position: 14px 2px; cursor: pointer; - line-height: 20px; - height: 20px; - padding-left: 22px; + line-height: 2em; + padding-left: 34px; margin: 0px; width: auto; white-space: nowrap; @@ -334,10 +314,6 @@ SPAN.photoFrame:hover { -webkit-transform: scale(3.0, 3.0) rotate(0deg) translate(33%, 33%); -ms-transform: rotate(0deg) scale(3.0, 3.0); } -SPAN.photoFrame:hover IMG.contactPhoto -{ - } - /* drag handles */ DIV#dragHandle { cursor: e-resize; diff --git a/UI/WebServerResources/ContactsUI.js b/UI/WebServerResources/ContactsUI.js index 39a6cdada..0f46034ed 100644 --- a/UI/WebServerResources/ContactsUI.js +++ b/UI/WebServerResources/ContactsUI.js @@ -1319,10 +1319,8 @@ function initContacts(event) { configureSelectionButtons(); } - var tabsContainer = $("smallToolbarContainer"); - if (tabsContainer) { - var controller = new SOGoTabsController(); - controller.attachToTabsContainer(tabsContainer); + var foldersList = $("contactFoldersList"); + if (foldersList) { configureAbToolbar(); // Addressbook import form diff --git a/UI/WebServerResources/HTMLTableElement.js b/UI/WebServerResources/HTMLTableElement.js index e71d61250..979887332 100644 --- a/UI/WebServerResources/HTMLTableElement.js +++ b/UI/WebServerResources/HTMLTableElement.js @@ -8,6 +8,9 @@ Element.addMethods({ return $(tbody).getSelectedNodes(); } + else if (element.tagName == 'TBODY') { + return element.getSelectedNodes(); + } else if (element.tagName == 'UL') { return element.getSelectedNodes(); } diff --git a/UI/WebServerResources/SOGoTabsController.js b/UI/WebServerResources/SOGoTabsController.js index e32d85cff..d4d7f10bb 100644 --- a/UI/WebServerResources/SOGoTabsController.js +++ b/UI/WebServerResources/SOGoTabsController.js @@ -83,17 +83,20 @@ SOGoTabsController.prototype = { currentNode.observe("mousedown", this.onTabMouseDownBound, false); currentNode.observe("click", this.onTabClickBound, false); + if (currentNode.hasClassName("active")) + this.activeTab = currentNode; //$(currentNode.getAttribute("target")).hide(); } this.firstTab.addClassName("first"); - this.firstTab.addClassName("active"); - this.activeTab = this.firstTab; - + if (this.activeTab == null) { + this.activeTab = this.firstTab; + this.activeTab.addClassName("active"); + } var last = nodes.length - 1; this.lastTab = $(nodes[last]); - var target = $(this.firstTab.getAttribute("target")); + var target = $(this.activeTab.getAttribute("target")); target.addClassName("active"); } this.onWindowResizeBound = this.onWindowResize.bindAsEventListener(this); @@ -141,6 +144,7 @@ SOGoTabsController.prototype = { this.activeTab = $(clickedTab); this.activeTab.addClassName("active"); // current LI content.addClassName("active"); + this.activeTab.fire("tabs:click", content.id); // Prototype alternative diff --git a/UI/WebServerResources/SchedulerUI.css b/UI/WebServerResources/SchedulerUI.css index e243922ed..4407be4ac 100644 --- a/UI/WebServerResources/SchedulerUI.css +++ b/UI/WebServerResources/SchedulerUI.css @@ -4,57 +4,44 @@ DIV#leftPanel left: 0px; width: 19.25em; bottom: 0px; + background-color: #CCDDEC; overflow: hidden; } DIV#schedulerTabs { position: absolute; top: 4px; - left: 2px; - right: 2px; + left: 1px; + right: 0px; height: 186px; } -DIV#tasksListView -{ position: absolute; - top: 200px; - bottom: 0px; - left: 2px; - right: 0px; - overflow: hidden; } +DIV#schedulerTabs .tabs +{ right: 5px; } -DIV#tasksListView H2 -{ font-size: 10pt; - margin: 0px; - margin-left: .25em; - padding: 0px; } - -DIV#tasksListView LABEL -{ margin: .25em; } +DIV#schedulerTabs .tab +{ left: 0px; + right: 0px; } DIV#calendarSelectorView -{ top: 3px; - overflow: hidden; } +{ overflow: hidden; } -DIV#calendarsList -{ height: 100%; } +DIV#calendarSelectorButtons +{ padding-left: 6px; } DIV.colorBox { display: inline; - border: 1px solid #333; font-weight: normal; margin-right: 3px; font-size: 80%; width: 1em; - height: .75em; } + height: .75em; + -webkit-border-radius: 2px; + border-radius: 2px; } -UL#tasksList, UL#calendarList +UL#calendarList { cursor: default; + clear: left; margin: 0px; padding: 0px; - border-top: 1px solid #909090; - border-left: 1px solid #909090; - border-bottom: 1px solid #FFFFFF; - border-right: 1px solid #FFFFFF; - background-color: #CCDDEC; list-style-type: none; list-style-image: none; overflow: hidden; @@ -62,61 +49,51 @@ UL#tasksList, UL#calendarList -moz-user-select: none; -khtml-user-select: none; } -UL#calendarList -{ clear: left; - height: 115px; } - UL#calendarList LI -{ cursor: pointer; - white-space: nowrap; } - -UL#tasksList -{ position: absolute; - top: 2em; - left: 0px; - right: 0px; - bottom: .25em; } - -UL#tasksList LI { cursor: pointer; width: 100%; - white-space: nowrap; } + white-space: nowrap; + line-height: 2em; + padding-left: 10px; } -UL#tasksList LI.duelater, -UL#tasksList LI.duetoday, -UL#tasksList LI.overdue +#tasksList .duelater, +#tasksList .duetoday, +#tasksList .overdue { font-weight: bold; } -UL#tasksList LI.overdue, -UL#tasksList LI.important +#tasksList .overdue, +#tasksList .important { color: #f00 !important; } -UL#tasksList LI.duetoday +#tasksList .low +{ color: #666 !important; } + +#tasksList .duetoday { color: #00f !important; } -UL#tasksList LI.completed SPAN +#tasksList .completed span { text-decoration: line-through; color: #000; } -UL#tasksList LI.important SPAN +#tasksList .important SPAN { background-image: url(important.png); background-repeat: no-repeat; background-position: 3px 2px; padding-left: 10px; } -UL#tasksList LI SPAN +#tasksList SPAN { padding-left: 2px; } -UL#tasksList LI._selected.overdue +#tasksList ._selected.overdue { color: #fff !important; background-color: #f00 !important; } -UL#tasksList LI._selected.duetoday +#tasksList ._selected.duetoday { color: #fff !important; background-color: #00f !important; } -UL#tasksList LI._selected.duelater, -UL#tasksList LI._selected.completed +#tasksList ._selected.duelater, +#tasksList ._selected.completed { color: #fff !important; background-color: #9ABCD8 !important; } @@ -129,17 +106,12 @@ DIV#rightPanel margin-left: 5px; overflow: hidden; } -/* top list */ -DIV#eventsListView +/* top lists in tabs */ +DIV#eventsListView, +DIV#tasksListView { cursor: default; - position: absolute; background-color: #FFFFFF; - top: 2.5em; - left: 0px; - right: 0px; - height: 15.5em; overflow: hidden; - border-left: 1px solid #9B9B9B; overflow-y: auto; } DIV#calendarView @@ -174,9 +146,6 @@ DIV#calendarView A right: 0px; height: 5px; } -#filterPanel -{ padding-right: .5em; } - DIV#dateSelectorView { overflow: hidden; } @@ -184,7 +153,7 @@ DIV#dateSelectorView { margin: 0px auto; height: 13.5em; background-color: #fff; - border-top: 1px solid #FFFFFF !important; + border-top: 1px solid #909090 !important; border-left: 1px solid #FFFFFF !important; border-bottom: 1px solid #909090 !important; border-right: 1px solid #909090 !important; } @@ -279,21 +248,45 @@ TABLE#dateSelectorTable TD TABLE TD.dayOfToday { visibility: hidden; display: none; } -TABLE#eventsList +TABLE#eventsList, +TABLE#tasksList { width: 100%; } +TABLE#eventsList .colorBox +{ margin-left: 2px; } + TABLE#eventsList TD.headerTitle, TABLE#eventsList TD.headerDateTime { width: 30%; } TABLE#eventsList TD, -TABLE#eventsList TH +TABLE#eventsList TH, +TABLE#tasksList TD, +TABLE#tasksList TH { overflow: hidden; + line-height: 1.5em; white-space: nowrap; } /* pre, normal, nowrap */ -TABLE#eventsList TH +TABLE#eventsList TH, +TABLE#tasksList TH { white-space: pre; } +TABLE#tasksList TD#completedHeader +{ text-align: center; + width: 20px; } + +TABLE#eventsList THEAD TD:last-child, +TABLE#tasksList THEAD TD:last-child +{ border-right: 0px; } + +#filterPanel, +.tab label +{ display: block; + margin: 0; + padding: 5px; + background-color: #eee; + background-color: #E6E7E6; } + DIV#eventDialog { width: 200px; } diff --git a/UI/WebServerResources/SchedulerUI.js b/UI/WebServerResources/SchedulerUI.js index f0f128dc1..e60e42fcd 100644 --- a/UI/WebServerResources/SchedulerUI.js +++ b/UI/WebServerResources/SchedulerUI.js @@ -241,8 +241,11 @@ function deleteEvent() { } if (sortedNodes[calendar].indexOf(nodes[i].cname) < 0) { sortedNodes[calendar].push(nodes[i].cname); - if (nodes[i].tagName == 'TR') - events.push(nodes[i].down('td').allTextContent()); // extract the first column only + if (nodes[i].tagName == 'TR') { + var cell = nodes[i].down('td span'); + var title = cell.allTextContent(); + events.push(title); // extract the first column only + } else events.push(nodes[i].allTextContent()); } @@ -422,7 +425,7 @@ function onMenuRawEvent(event) { var calendar = selectedCalendarCell[0].calendar; var cname = selectedCalendarCell[0].cname; - var url = ApplicationBaseURL + calendar + "/" + cname + "/raw" + var url = ApplicationBaseURL + calendar + "/" + cname + "/raw"; openGenericWindow(url); } @@ -918,8 +921,8 @@ function eventsListCallback(http) { var rows = table.select("TBODY TR"); rows.each(function(e) { - e.remove(); - }); + e.remove(); + }); if (http.responseText.length > 0) { var data = http.responseText.evalJSON(true); @@ -927,13 +930,14 @@ function eventsListCallback(http) { var row = createElement("tr"); table.tBodies[0].appendChild(row); row.addClassName("eventRow"); + var calendar = escape(data[i][1]); var rTime = data[i][16]; var id = escape(data[i][1] + "-" + data[i][0]); if (rTime) id += "-" + escape(rTime); row.setAttribute("id", id); row.cname = escape(data[i][0]); - row.calendar = escape(data[i][1]); + row.calendar = calendar; if (rTime) row.recurrenceTime = escape(rTime); row.isException = data[i][17]; @@ -954,8 +958,13 @@ function eventsListCallback(http) { var td = createElement("td"); row.appendChild(td); td.observe("mousedown", listRowMouseDownHandler, true); - td.appendChild(document.createTextNode(data[i][4])); // title - + var colorDiv = createElement("div", false, "colorBox calendarFolder" + calendar); + td.appendChild(colorDiv); + colorDiv.update('OO'); + var span = createElement("span"); + td.appendChild(span); + span.update(data[i][4]); // title + td = createElement("td"); row.appendChild(td); td.observe("mousedown", listRowMouseDownHandler, true); @@ -1002,57 +1011,98 @@ function eventsListCallback(http) { } function tasksListCallback(http) { - var div = $("tasksListView"); - if (http.readyState == 4 && http.status == 200) { + var div = $("tasksListView"); document.tasksListAjaxRequest = null; - var list = $("tasksList"); + var table = $("tasksList"); + lastClickedRow = -1; // from generic.js + + var rows = table.select("TBODY TR"); + rows.each(function(e) { + e.remove(); + }); if (http.responseText.length > 0) { var data = http.responseText.evalJSON(true); - - list.previousScroll = list.scrollTop; - while (list.childNodes.length) - list.removeChild(list.childNodes[0]); + // [0] Task ID + // [1] Calendar ID + // [2] Calendar name + // [3] Status (0, 1 = completed, 2) + // [4] Title + // [5] Due date (int) + // [6] Classification (0 = public, 1, = private, 2 = confidential) + // [7] Location + // [8] Category + // [9] Editable? + // [10] Erasable? + // [11] Priority (0, 1 = important, 9 = low) + // [12] Status CSS class (duelater, completed, etc) + // (13) Due date (formatted) + for (var i = 0; i < data.length; i++) { - var listItem = createElement("li"); - list.appendChild(listItem); - listItem.on("dblclick", editDoubleClickedEvent); + var row = createElement("tr"); + table.tBodies[0].appendChild(row); + + row.on("dblclick", editDoubleClickedEvent); var calendar = escape(data[i][1]); var cname = escape(data[i][0]); - listItem.setAttribute("id", calendar + "-" + cname); + row.setAttribute("id", calendar + "-" + cname); //listItem.addClassName(data[i][5]); // Classification - listItem.addClassName(data[i][9]); // status (duelater, completed, etc) - listItem.calendar = calendar; - listItem.cname = cname; - listItem.erasable = data[i][7] || IsSuperUser; + row.addClassName(data[i][12]); // status + row.calendar = calendar; + row.cname = cname; + row.erasable = data[i][10] || IsSuperUser; + if (parseInt(data[i][11]) == 1) { + row.addClassName("important"); + } + else if (parseInt(data[i][11]) == 9) { + row.addClassName("low"); + } + + var cell = createElement("td"); + row.appendChild(cell); var input = createElement("input"); input.setAttribute("type", "checkbox"); - if (parseInt(data[i][6]) == 0) // editable? - input.setAttribute("disabled", true); - if (parseInt(data[i][8]) == 1) { - listItem.addClassName("important"); - } - listItem.appendChild(input); - input.observe("click", updateTaskStatus, true); + cell.appendChild(input); input.setAttribute("value", "1"); - if (data[i][2] == 1) + if (parseInt(data[i][9]) == 0) // editable? + input.setAttribute("disabled", true); + input.addClassName("checkBox"); + if (parseInt(data[i][3]) == 1) // completed? input.setAttribute("checked", "checked"); - $(input).addClassName("checkBox"); + input.observe("click", updateTaskStatus, true); + cell = createElement("td"); + row.appendChild(cell); var colorDiv = createElement("div", false, "colorBox calendarFolder" + calendar); + cell.appendChild(colorDiv); colorDiv.update('OO'); - listItem.appendChild(colorDiv); - var t = new Element ("span"); - t.update(data[i][3]); - listItem.appendChild (t); + cell.appendChild(t); + t.update(data[i][4]); // title + + cell = createElement("td"); + row.appendChild(cell); + if (data[i][13]) + cell.update(data[i][13]); // end date + + cell = createElement("td"); + row.appendChild(cell); + cell.update(data[i][7]); // location + + cell = createElement("td"); + row.appendChild(cell); + cell.update(data[i][8]); // category + + cell = createElement("td"); + row.appendChild(cell); + cell.update(data[i][2]); // calendar name } - list.scrollTop = list.previousScroll; + table.scrollTop = table.previousScroll; if (http.callbackData) { var selectedNodesId = http.callbackData; @@ -1999,7 +2049,7 @@ function onEventsSelectionChange() { tasksList.addClassName("_unfocused"); deselectAll(tasksList); - var rows = $(this.tBodies[0]).getSelectedNodes(); + var rows = $(this).getSelectedNodes(); if (rows.length == 1) { var row = rows[0]; changeCalendarDisplay( { "day": row.day, @@ -2412,7 +2462,7 @@ function onShowCompletedTasks(event) { function updateTaskStatus(event) { var newStatus = (this.checked ? 1 : 0); - _updateTaskCompletion (this.parentNode, newStatus); + _updateTaskCompletion (this.up("tr"), newStatus); return false; } @@ -2637,7 +2687,7 @@ function newTask () { } function marksTasksAsCompleted () { - var selectedTasks = $$("UL#tasksList LI._selected"); + var selectedTasks = $$("#tasksList ._selected"); for (var i = 0; i < selectedTasks.length; i++) { var task = selectedTasks[i]; @@ -2655,7 +2705,7 @@ function _updateTaskCompletion (task, value) { } function onMenuRawTask(event) { - var selectedTasks = $$("UL#tasksList LI._selected"); + var selectedTasks = $$("#tasksList ._selected"); if (selectedTasks.length != 1) { return; } @@ -2706,7 +2756,7 @@ function configureDragHandles() { handle = $("rightDragHandle"); if (handle) { handle.addInterface(SOGoDragHandlesInterface); - handle.upperBlock = $("eventsListView"); + handle.upperBlock = $("schedulerTabs"); handle.lowerBlock = $("calendarView"); } } @@ -3106,7 +3156,7 @@ function deletePersonalCalendarCallback(http) { } function configureLists() { - var list = $("tasksList"); + var list = $$("#tasksList tbody").first(); list.multiselect = true; list.on("mousedown", onTasksSelectionChange); list.on("selectstart", listRowMouseDownHandler); @@ -3121,7 +3171,7 @@ function configureLists() { list.multiselect = true; configureSortableTableHeaders(list); TableKit.Resizable.init(list, {'trueResize' : true, 'keepWidth' : true}); - list.observe("mousedown", onEventsSelectionChange); + list.down("tbody").on("mousedown", onEventsSelectionChange); } function initDateSelectorEvents() { @@ -3223,6 +3273,15 @@ function onDocumentKeydown(event) { } } +function saveTabState(event) { + var tab = $(event).memo; + + var url = ApplicationBaseURL + "saveSelectedList"; + var params = "list=" + tab; + triggerAjaxRequest(url, null, null, params, + { "Content-type": "application/x-www-form-urlencoded" }); +} + function initScheduler() { sorting["attribute"] = "start"; sorting["ascending"] = true; @@ -3234,6 +3293,7 @@ function initScheduler() { var tabsContainer = $("schedulerTabs"); var controller = new SOGoTabsController(); controller.attachToTabsContainer(tabsContainer); + schedulerTabs.on("tabs:click", saveTabState); if (UserSettings['ShowCompletedTasks']) { showCompletedTasks = parseInt(UserSettings['ShowCompletedTasks']); diff --git a/UI/WebServerResources/generic.css b/UI/WebServerResources/generic.css index e2b6922d0..f5597e9d4 100644 --- a/UI/WebServerResources/generic.css +++ b/UI/WebServerResources/generic.css @@ -55,6 +55,14 @@ LABEL white-space: nowrap; margin-left: .5em; } +H6 +{ font-size: 11px; + color: #9ABCD8; + color: #627e9c; + text-transform: uppercase; + margin: 10px 0px 5px 0px; + padding-left: 5px; } + TABLE { table-layout: fixed; border-spacing: 0px; } @@ -493,7 +501,7 @@ DIV.noJavascriptErrorMessage A margin: 0px auto; } LI.denied -{ background-color: #fefefe; +{ n0background-color: #fefefe; font-style: italic; color: #f33; } @@ -507,7 +515,7 @@ TD._selected color: #fff; } -LI[class~="_selected"].denied +LI._selected.denied { background-color: #f33; } diff --git a/UI/WebServerResources/generic.js b/UI/WebServerResources/generic.js index 63817e1bf..66871ba6c 100644 --- a/UI/WebServerResources/generic.js +++ b/UI/WebServerResources/generic.js @@ -1193,7 +1193,7 @@ function initCriteria() { var searchValue = $("searchValue"); var searchOptions = $("searchOptions"); - if (searchValue) { + if (searchValue && searchOptions) { var firstOption = searchOptions.down("li"); if (firstOption) { searchCriteria.value = firstOption.getAttribute('id'); diff --git a/UI/WebServerResources/iefixes.css b/UI/WebServerResources/iefixes.css index 2fb102b10..a38507ed3 100644 --- a/UI/WebServerResources/iefixes.css +++ b/UI/WebServerResources/iefixes.css @@ -171,7 +171,8 @@ TABLE.framenocaption TABLE.frame TBODY { padding: 20px; } -UL#calendarList +UL#calendarList, +UL#contactFolders { margin-top: 2px; } A.toolbarButton SPAN, @@ -179,10 +180,8 @@ A.toolbarButton:hover SPAN { height: 50px; padding: 5px 2px 6px 5px; } -A.smallToolbarButton, A.smallToolbarButton:hover, -A.smallToolbarButton SPAN, A.smallToolbarButton:hover SPAN -{ height: 33px; } - +A.smallToolbarButton, A.smallToolbarButton:hover +{ height: 34px; } A.toolbarButton:active SPAN { background-position: auto; /*broken*/ }