mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-10 22:15:26 +00:00
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:
@@ -38,6 +38,7 @@
|
||||
NSString *item;
|
||||
NGVCard *card;
|
||||
NSMutableDictionary *snapshot; /* contains the values for editing */
|
||||
SOGoContactFolder *componentAddressBook;
|
||||
}
|
||||
|
||||
- (void) setAddressBookItem: (id) _item;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
@interface UIxAppointmentEditor : UIxComponent
|
||||
{
|
||||
iCalEvent *event;
|
||||
SOGoAppointmentFolder *componentCalendar;
|
||||
BOOL isAllDay;
|
||||
NSCalendarDate *aptStartDate;
|
||||
NSCalendarDate *aptEndDate;
|
||||
|
||||
@@ -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()"];
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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">
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -2,7 +2,7 @@ DIV#addressBookSelector
|
||||
{ margin: .5em; }
|
||||
|
||||
DIV#addressBookSelector SELECT
|
||||
{ width: auto; }
|
||||
{ width: 32em; }
|
||||
|
||||
DIV#editorTabs
|
||||
{ position: absolute;
|
||||
|
||||
Reference in New Issue
Block a user