Mantis 139: dialog boxes of webcalendar
Monotone-Parent: fe1684747671de5019121d2155b79f89a2f376eb Monotone-Revision: 525ded69698841a7e49b579ace037c3eca060d31 Monotone-Author: crobert@inverse.ca Monotone-Date: 2009-09-21T14:10:16 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
78cf07608f
commit
facfdaadd3
|
@ -1,3 +1,10 @@
|
||||||
|
2009-09-21 Cyril Robert <crobert@inverse.ca>
|
||||||
|
|
||||||
|
* UI/Scheduler/UIxCalMainActions.m (displayNameForUrl:): The calendar's
|
||||||
|
display name is extracted from the URL for web calendars.
|
||||||
|
* UI/Scheduler/UIxCalendarProperties.m (webCalendarURL, isWebCalendar):
|
||||||
|
Added new methods to display a web calendar's url in the properties dialog.
|
||||||
|
|
||||||
2009-09-21 Ludovic Marcotte <lmarcotte@inverse.ca>
|
2009-09-21 Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||||
|
|
||||||
* Updated the contact import text to be more
|
* Updated the contact import text to be more
|
||||||
|
|
|
@ -536,3 +536,4 @@ vtodo_class2 = "(Tarefa Confidencial)";
|
||||||
|
|
||||||
"Subscribe to a web calendar..." = "Subscribe to a web calendar...";
|
"Subscribe to a web calendar..." = "Subscribe to a web calendar...";
|
||||||
"URL of the Calendar" = "URL of the Calendar";
|
"URL of the Calendar" = "URL of the Calendar";
|
||||||
|
"Web Calendar" = "Web Calendar";
|
||||||
|
|
|
@ -536,3 +536,4 @@ vtodo_class2 = "(Důvěrný úkol)";
|
||||||
|
|
||||||
"Subscribe to a web calendar..." = "Subscribe to a web calendar...";
|
"Subscribe to a web calendar..." = "Subscribe to a web calendar...";
|
||||||
"URL of the Calendar" = "URL of the Calendar";
|
"URL of the Calendar" = "URL of the Calendar";
|
||||||
|
"Web Calendar" = "Web Calendar";
|
||||||
|
|
|
@ -536,3 +536,4 @@ vtodo_class2 = "(Vertrouwelijke taak)";
|
||||||
|
|
||||||
"Subscribe to a web calendar..." = "Subscribe to a web calendar...";
|
"Subscribe to a web calendar..." = "Subscribe to a web calendar...";
|
||||||
"URL of the Calendar" = "URL of the Calendar";
|
"URL of the Calendar" = "URL of the Calendar";
|
||||||
|
"Web Calendar" = "Web Calendar";
|
||||||
|
|
|
@ -536,3 +536,4 @@ vtodo_class2 = "(Confidential task)";
|
||||||
|
|
||||||
"Subscribe to a web calendar..." = "Subscribe to a web calendar...";
|
"Subscribe to a web calendar..." = "Subscribe to a web calendar...";
|
||||||
"URL of the Calendar" = "URL of the Calendar";
|
"URL of the Calendar" = "URL of the Calendar";
|
||||||
|
"Web Calendar" = "Web Calendar";
|
||||||
|
|
|
@ -536,3 +536,4 @@ vtodo_class2 = "(Tâche confidentielle)";
|
||||||
|
|
||||||
"Subscribe to a web calendar..." = "S'inscrire à un agenda en ligne...";
|
"Subscribe to a web calendar..." = "S'inscrire à un agenda en ligne...";
|
||||||
"URL of the Calendar" = "URL de l'agenda";
|
"URL of the Calendar" = "URL de l'agenda";
|
||||||
|
"Web Calendar" = "Calendrier web";
|
||||||
|
|
|
@ -536,3 +536,4 @@ vtodo_class2 = "(Vertrauliche Aufgabe)";
|
||||||
|
|
||||||
"Subscribe to a web calendar..." = "Subscribe to a web calendar...";
|
"Subscribe to a web calendar..." = "Subscribe to a web calendar...";
|
||||||
"URL of the Calendar" = "URL of the Calendar";
|
"URL of the Calendar" = "URL of the Calendar";
|
||||||
|
"Web Calendar" = "Web Calendar";
|
||||||
|
|
|
@ -536,3 +536,4 @@ vtodo_class2 = "(Bizalmas feladat)";
|
||||||
|
|
||||||
"Subscribe to a web calendar..." = "Subscribe to a web calendar...";
|
"Subscribe to a web calendar..." = "Subscribe to a web calendar...";
|
||||||
"URL of the Calendar" = "URL of the Calendar";
|
"URL of the Calendar" = "URL of the Calendar";
|
||||||
|
"Web Calendar" = "Web Calendar";
|
||||||
|
|
|
@ -536,3 +536,4 @@ vtodo_class2 = "(Attività confidenziale)";
|
||||||
|
|
||||||
"Subscribe to a web calendar..." = "Subscribe to a web calendar...";
|
"Subscribe to a web calendar..." = "Subscribe to a web calendar...";
|
||||||
"URL of the Calendar" = "URL of the Calendar";
|
"URL of the Calendar" = "URL of the Calendar";
|
||||||
|
"Web Calendar" = "Web Calendar";
|
||||||
|
|
|
@ -536,3 +536,4 @@ vtodo_class2 = "(Confidential task)";
|
||||||
|
|
||||||
"Subscribe to a web calendar..." = "Subscribe to a web calendar...";
|
"Subscribe to a web calendar..." = "Subscribe to a web calendar...";
|
||||||
"URL of the Calendar" = "URL of the Calendar";
|
"URL of the Calendar" = "URL of the Calendar";
|
||||||
|
"Web Calendar" = "Web Calendar";
|
||||||
|
|
|
@ -536,3 +536,4 @@ vtodo_class2 = "(Tarea confidencial)";
|
||||||
|
|
||||||
"Subscribe to a web calendar..." = "Subscribe to a web calendar...";
|
"Subscribe to a web calendar..." = "Subscribe to a web calendar...";
|
||||||
"URL of the Calendar" = "URL of the Calendar";
|
"URL of the Calendar" = "URL of the Calendar";
|
||||||
|
"Web Calendar" = "Web Calendar";
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
WOResponse *response;
|
WOResponse *response;
|
||||||
SOGoWebAppointmentFolder *folder;
|
SOGoWebAppointmentFolder *folder;
|
||||||
NSURL *url;
|
NSURL *url;
|
||||||
NSString *name;
|
NSString *name, *displayName;
|
||||||
NSMutableDictionary *rc;
|
NSMutableDictionary *rc;
|
||||||
int imported = 0;
|
int imported = 0;
|
||||||
|
|
||||||
|
@ -53,7 +53,8 @@
|
||||||
url = [NSURL URLWithString: [r formValueForKey: @"url"]];
|
url = [NSURL URLWithString: [r formValueForKey: @"url"]];
|
||||||
if (url)
|
if (url)
|
||||||
{
|
{
|
||||||
[[self clientObject] newFolderWithName: @"Web Calendar"
|
displayName = [self displayNameForUrl: [r formValueForKey: @"url"]];
|
||||||
|
[[self clientObject] newFolderWithName: displayName
|
||||||
nameInContainer: &name];
|
nameInContainer: &name];
|
||||||
[self saveUrl: url forCalendar: name];
|
[self saveUrl: url forCalendar: name];
|
||||||
folder = [[self clientObject] lookupName: name
|
folder = [[self clientObject] lookupName: name
|
||||||
|
@ -65,7 +66,7 @@
|
||||||
|
|
||||||
if (imported >= 0)
|
if (imported >= 0)
|
||||||
{
|
{
|
||||||
[rc setObject: @"Web Calendar" forKey: @"displayname"];
|
[rc setObject: displayName forKey: @"displayname"];
|
||||||
[rc setObject: name forKey: @"name"];
|
[rc setObject: name forKey: @"name"];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -82,6 +83,20 @@
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (NSString *) displayNameForUrl: (NSString *) calendarURL
|
||||||
|
{
|
||||||
|
NSString *rc, *tmp;
|
||||||
|
|
||||||
|
tmp = [calendarURL lastPathComponent];
|
||||||
|
if (tmp)
|
||||||
|
rc = [tmp stringByDeletingSuffix: @".ics"];
|
||||||
|
else
|
||||||
|
rc = [self labelForKey: @"Web Calendar"];
|
||||||
|
|
||||||
|
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
- (void) saveUrl: (NSURL *) calendarURL
|
- (void) saveUrl: (NSURL *) calendarURL
|
||||||
forCalendar: (NSString *) calendarName
|
forCalendar: (NSString *) calendarName
|
||||||
{
|
{
|
||||||
|
|
|
@ -172,6 +172,31 @@
|
||||||
[calendar setShowCalendarTasks: new];
|
[calendar setShowCalendarTasks: new];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (NSString *) webCalendarURL
|
||||||
|
{
|
||||||
|
NSUserDefaults *settings;
|
||||||
|
NSMutableDictionary *calendarSettings;
|
||||||
|
NSMutableDictionary *webCalendars;
|
||||||
|
NSString *rc;
|
||||||
|
|
||||||
|
settings = [[context activeUser] userSettings];
|
||||||
|
calendarSettings = [settings objectForKey: @"Calendar"];
|
||||||
|
|
||||||
|
if (calendarSettings)
|
||||||
|
{
|
||||||
|
webCalendars = [calendarSettings objectForKey: @"WebCalendars"];
|
||||||
|
if (webCalendars)
|
||||||
|
rc = [webCalendars objectForKey: [calendar nameInContainer]];
|
||||||
|
}
|
||||||
|
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL) isWebCalendar
|
||||||
|
{
|
||||||
|
return ([self webCalendarURL] != nil);
|
||||||
|
}
|
||||||
|
|
||||||
- (BOOL) shouldTakeValuesFromRequest: (WORequest *) request
|
- (BOOL) shouldTakeValuesFromRequest: (WORequest *) request
|
||||||
inContext: (WOContext*) context
|
inContext: (WOContext*) context
|
||||||
{
|
{
|
||||||
|
|
|
@ -536,3 +536,4 @@ vtodo_class2 = "(Tasg gyhoeddus)";
|
||||||
|
|
||||||
"Subscribe to a web calendar..." = "Subscribe to a web calendar...";
|
"Subscribe to a web calendar..." = "Subscribe to a web calendar...";
|
||||||
"URL of the Calendar" = "URL of the Calendar";
|
"URL of the Calendar" = "URL of the Calendar";
|
||||||
|
"Web Calendar" = "Web Calendar";
|
||||||
|
|
|
@ -23,6 +23,12 @@
|
||||||
class="textField"
|
class="textField"
|
||||||
var:value="calendarName"
|
var:value="calendarName"
|
||||||
/></span></div>
|
/></span></div>
|
||||||
|
<var:if condition="isWebCalendar"
|
||||||
|
><div const:id="webCalendarUrl"><span class="label"
|
||||||
|
><var:string label:value="URL:"/></span
|
||||||
|
><span class="content" var:title="webCalendarURL"
|
||||||
|
><var:string var:value="webCalendarURL"/>
|
||||||
|
</span></div></var:if>
|
||||||
<div><span class="label"><var:string
|
<div><span class="label"><var:string
|
||||||
label:value="Color:"
|
label:value="Color:"
|
||||||
/></span><span class="content"
|
/></span><span class="content"
|
||||||
|
|
|
@ -41,3 +41,7 @@ DIV#buttons
|
||||||
|
|
||||||
INPUT#calendarSyncTag
|
INPUT#calendarSyncTag
|
||||||
{ width: 7em; }
|
{ width: 7em; }
|
||||||
|
|
||||||
|
#webCalendarUrl span.content
|
||||||
|
{ white-space:nowrap;
|
||||||
|
overflow: hidden; }
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
/* -*- Mode: java; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
/* -*- Mode: java; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||||
|
|
||||||
function onLoadCalendarProperties() {
|
function onLoadCalendarProperties() {
|
||||||
|
if ($("webCalendarUrl"))
|
||||||
|
window.resizeTo(500,360);
|
||||||
|
|
||||||
var colorButton = $("colorButton");
|
var colorButton = $("colorButton");
|
||||||
var calendarColor = $("calendarColor");
|
var calendarColor = $("calendarColor");
|
||||||
colorButton.setStyle({ "backgroundColor": calendarColor.value, display: "inline" });
|
colorButton.setStyle({ "backgroundColor": calendarColor.value, display: "inline" });
|
||||||
|
|
Loading…
Reference in New Issue