Monotone-Parent: f36908690fb1287e17d7bb0eb4155ddc4c6f6a55

Monotone-Revision: 3ea5e4c3ab43c68fb675c5144a1c3378da620a48

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2008-08-22T06:44:27
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Francis Lachapelle
2008-08-22 06:44:27 +00:00
parent a0de2d52f7
commit a1bda982f2
9 changed files with 66 additions and 23 deletions
+1
View File
@@ -38,6 +38,7 @@
NSString *item;
NGVCard *card;
NSMutableDictionary *snapshot; /* contains the values for editing */
SOGoContactFolder *componentAddressBook;
}
- (void) setAddressBookItem: (id) _item;
+22
View File
@@ -204,6 +204,12 @@
return folder;
}
- (void) setComponentAddressBook: (SOGoContactFolder *) _componentAddressBook
{
ASSIGN (componentAddressBook, _componentAddressBook);
}
- (NSString *) addressBookDisplayName
{
NSString *fDisplayName;
@@ -595,6 +601,8 @@
SOGoContactGCSEntry *contact;
id result;
NSString *jsRefreshMethod;
SoSecurityManager *sm;
NSException *ex;
contact = [self clientObject];
card = [contact vCard];
@@ -604,6 +612,20 @@
[self _saveSnapshot];
[contact save];
if (componentAddressBook && componentAddressBook != [self componentAddressBook])
{
sm = [SoSecurityManager sharedSecurityManager];
if (![sm validatePermission: SoPerm_DeleteObjects
onObject: componentAddressBook
inContext: context])
{
if (![sm validatePermission: SoPerm_AddDocumentsImagesAndFiles
onObject: componentAddressBook
inContext: context])
ex = [contact moveToFolder: componentAddressBook];
}
}
if ([[[[self context] request] formValueForKey: @"nojs"] intValue])
result = [self redirectToLocation: [self applicationPath]];
else
+1
View File
@@ -31,6 +31,7 @@
@interface UIxAppointmentEditor : UIxComponent
{
iCalEvent *event;
SOGoAppointmentFolder *componentCalendar;
BOOL isAllDay;
NSCalendarDate *aptStartDate;
NSCalendarDate *aptEndDate;
+21 -16
View File
@@ -138,6 +138,16 @@
return item;
}
- (SOGoAppointmentFolder *) componentCalendar
{
return componentCalendar;
}
- (void) setComponentCalendar: (SOGoAppointmentFolder *) _componentCalendar
{
ASSIGN (componentCalendar, _componentCalendar);
}
/* actions */
- (NSCalendarDate *) newStartDate
{
@@ -236,7 +246,6 @@
- (id <WOActionResults>) saveAction
{
NSString *newCalendar;
SOGoAppointmentFolder *thisFolder, *newFolder;
SOGoAppointmentFolders *parentFolder;
SOGoAppointmentObject *co;
@@ -246,25 +255,21 @@
co = [self clientObject];
[co saveComponent: event];
newCalendar = [self queryParameterForKey: @"moveToCalendar"];
if ([newCalendar length])
if (componentCalendar)
{
sm = [SoSecurityManager sharedSecurityManager];
thisFolder = [co container];
if (![sm validatePermission: SoPerm_DeleteObjects
onObject: thisFolder
inContext: context])
{
parentFolder = [[self container] container];
newFolder = [[thisFolder container] lookupName: newCalendar
inContext: context
acquire: NO];
if (![sm validatePermission: SoPerm_AddDocumentsImagesAndFiles
onObject: newFolder
inContext: context])
ex = [co moveToFolder: newFolder];
}
if (componentCalendar != thisFolder)
if (![sm validatePermission: SoPerm_DeleteObjects
onObject: thisFolder
inContext: context])
{
if (![sm validatePermission: SoPerm_AddDocumentsImagesAndFiles
onObject: componentCalendar
inContext: context])
ex = [co moveToFolder: componentCalendar];
}
}
return [self jsCloseWithRefreshMethod: @"refreshEventsAndDisplay()"];
+8
View File
@@ -48,6 +48,7 @@
NSCalendarDate *cycleUntilDate;
NSString *title;
NSString *location;
SOGoAppointmentFolder *componentCalendar;
NSString *comment;
NSString *url;
NSString *priority;
@@ -93,6 +94,13 @@
- (SOGoAppointmentFolder *) componentCalendar;
- (NSArray *) calendarList;
- (NSString *) calendarsFoldersList;
- (NSString *) calendarDisplayName;
- (SOGoAppointmentFolder *) componentCalendar;
- (void) setComponentCalendar: (SOGoAppointmentFolder *) _componentCalendar;
- (NSArray *) categoryList;
- (void) setCategories: (NSArray *) _categories;
- (NSArray *) categories;
+10 -6
View File
@@ -375,6 +375,10 @@ iRANGE(2);
[self _loadCategories];
[self _loadAttendees];
[self _loadRRules];
componentCalendar = [co container];
if ([componentCalendar isKindOfClass: [SOGoCalendarComponent class]])
componentCalendar = [componentCalendar container];
}
}
// /* cycles */
@@ -821,15 +825,15 @@ iRANGE(2);
return [calendars componentsJoinedByString: @","];
}
- (SOGoAppointmentFolder *) componentCalendar
{
SOGoAppointmentFolder *calendar;
return componentCalendar;
}
calendar = [[self clientObject] container];
if ([calendar isKindOfClass: [SOGoCalendarComponent class]])
calendar = [calendar container];
return calendar;
- (void) setComponentCalendar: (SOGoAppointmentFolder *) _componentCalendar
{
ASSIGN (componentCalendar, _componentCalendar);
}
/* priorities */
@@ -8,6 +8,7 @@
xmlns:rsrc="OGo:url"
xmlns:label="OGo:label"
className="UIxComponentEditor"
componentCalendar="componentCalendar"
var:component="event"
var:saveURL="saveURL">
+1
View File
@@ -198,6 +198,7 @@ TABLE#contactsList TD,
TABLE#contactsList TH
{ overflow: hidden;
line-height: 16px;
height: 18px;
white-space: nowrap; } /* pre, normal, nowrap */
TABLE#contactsList TH
+1 -1
View File
@@ -2,7 +2,7 @@ DIV#addressBookSelector
{ margin: .5em; }
DIV#addressBookSelector SELECT
{ width: auto; }
{ width: 32em; }
DIV#editorTabs
{ position: absolute;