+2007-08-21 Wolfgang Sourdeau <wsourdeau@inverse.ca>
+
+ * UI/SOGoElements/SOGoIEConditional.m: new extension module class
+ to handle "<var:if-ie>" template tags.
+
+ * UI/SOGoElements: new extension bundle containing sogo-specific
+ dynamic elements.
+
+ * UI/Scheduler/UIxComponentEditor.m ([UIxComponentEditor
+ -takeValuesFromRequest:_rqinContext:_ctx]): save the category
+ selected in the dialog.
+ ([UIxComponentEditor -setComponent:newComponent]): retrieve the
+ first category, if ever, of the calendar entity.
+
+ * UI/MailerUI/UIxMailMainFrame.m ([UIxMailMainFrame
+ -composeAction]): restored method since it is needed by the
+ address book.
+
+ * UI/MailerUI/UIxMailAccountActions.m ([UIxMailAccountActions
+ -composeAction]): the address fields should be arrays and not
+ simple strings.
+
+ * UI/Common/UIxPageFrame.m ([UIxPageFrame -buildDate]): new method
+ that returns the build date of SOGo in the template.
+
2007-08-20 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* SoObjects/Contacts/SOGoContactGCSFolder.m ([SOGoContactGCSFolder
-/* build.h - this file is part of $PROJECT_NAME_HERE$
+/* build.h - this file is part of SOGo
*
* Copyright (C) 2007 Inverse groupe conseil
*
- (NSException *) delete
{
- return [self deleteWithBaseSequence:0];
+ return [self deleteWithBaseSequence: 0];
}
/* EMail Notifications */
#import <SOGoUI/UIxComponent.h>
#import <SOGo/SOGoUser.h>
+#import <Main/build.h>
+
#import "UIxPageFrame.h"
@implementation UIxPageFrame
return item;
}
+- (NSString *) buildDate
+{
+ return SOGoBuildDate;
+}
+
- (NSString *) ownerInContext
{
return [[self clientObject] ownerInContext: nil];
SUBPROJECTS += \
SOGoUI \
+ SOGoElements \
Common \
Contacts \
MailerUI \
"Stop" = "Stop";
"Write" = "Write";
+"Send" = "Send";
+"Contacts" = "Contacts";
+"Attach" = "Attach";
+"Save" = "Save";
+
/* Main Frame */
"Home" = "Home";
"Stop" = "Stop";
"Write" = "Écrire";
+"Send" = "Envoyer";
+"Contacts" = "Contacts";
+"Attach" = "Joindre";
+"Save" = "Enregistrer";
+
/* Main Frame */
"Home" = "Accueil";
"Attachments:" = "Pièces jointes :";
-"To" = "À";
-"Cc" = "Cc";
-"Bcc" = "Cci";
+"To" = "Pour";
+"Cc" = "Copie à";
+"Bcc" = "Copie cachée à";
-"to" = "À";
-"cc" = "Cc";
-"bcc" = "Cci";
+"to" = "Pour";
+"cc" = "Copie à";
+"bcc" = "Copie cachée à";
"Edit Draft..." = "Modifier le brouillon...";
{
SOGoDraftsFolder *drafts;
SOGoDraftObject *newDraftMessage;
- NSString *urlBase, *url;
- NSString *mailTo;
+ NSString *urlBase, *url, *value;
+ NSArray *mailTo;
+
drafts = [[self clientObject] draftsFolderInContext: context];
newDraftMessage = [drafts newDraft];
- mailTo = [[self request] formValueForKey: @"mailto"];
- if ([mailTo length] > 0)
+ value = [[self request] formValueForKey: @"mailto"];
+ if ([value length] > 0)
{
+ mailTo = [NSArray arrayWithObject: value];
[newDraftMessage setHeaders: [NSDictionary dictionaryWithObject: mailTo
forKey: @"to"]];
[newDraftMessage storeInfo];
#import <SoObjects/Mailer/SOGoMailObject.h>
#import <SoObjects/Mailer/SOGoMailAccounts.h>
+#import <SoObjects/SOGo/NSDictionary+URL.h>
#import <SoObjects/SOGo/NSArray+Utilities.h>
#import <SoObjects/SOGo/SOGoUser.h>
#import <SOGoUI/UIxComponent.h>
return [u hasSuffix:@"/"] ? @"view" : @"#";
}
+- (id <WOActionResults>) composeAction
+{
+ NSArray *accounts;
+ NSString *firstAccount, *newLocation;
+ SOGoMailAccounts *co;
+ NSDictionary *formValues;
+
+ co = [self clientObject];
+ accounts = [[context activeUser] mailAccounts];
+ firstAccount = [[accounts objectsForKey: @"name"] objectAtIndex: 0];
+ formValues = [[context request] formValues];
+ newLocation = [NSString stringWithFormat: @"%@/%@/compose%@",
+ [co baseURLInContext: context],
+ firstAccount,
+ [formValues asURLParameters]];
+
+ return [self redirectToLocation: newLocation];
+}
+
@end /* UIxMailMainFrame */
int currentIndex;
}
-- (void)setTo:(NSArray *)_to;
-- (NSArray *)to;
-- (void)setCc:(NSArray *)_cc;
-- (NSArray *)cc;
-- (void)setBcc:(NSArray *)_bcc;
-- (NSArray *)bcc;
+- (void) setTo: (NSArray *) _to;
+- (NSArray *) to;
+- (void) setCc: (NSArray *) _cc;
+- (NSArray *) cc;
+- (void) setBcc: (NSArray *) _bcc;
+- (NSArray *) bcc;
-- (NSArray *)properlySplitAddresses:(NSArray *)_addresses;
+- (NSArray *) properlySplitAddresses: (NSArray *) _addresses;
-- (void)getAddressesFromFormValues:(NSDictionary *)_dict;
-- (NSString *)getIndexFromIdentifier:(NSString *)_identifier;
+- (void) getAddressesFromFormValues: (NSDictionary *) _dict;
+- (NSString *) getIndexFromIdentifier: (NSString *) _identifier;
@end
static NSArray *headers = nil;
-+ (void)initialize {
++ (void) initialize
+{
static BOOL didInit = NO;
- if (didInit)
- return;
-
- didInit = YES;
- headers = [[NSArray alloc] initWithObjects:@"to", @"cc", @"bcc", nil];
+ if (!didInit)
+ {
+ didInit = YES;
+ headers = [[NSArray alloc] initWithObjects: @"to", @"cc", @"bcc", nil];
+ }
}
-- (id)init {
- self = [super init];
- if(self) {
- self->currentIndex = 0;
- }
+- (id) init
+{
+ if ((self = [super init]))
+ currentIndex = 0;
+
return self;
}
-- (void)dealloc {
- [self->to release];
- [self->cc release];
- [self->bcc release];
- [self->item release];
- [self->address release];
- [self->addressList release];
+- (void) dealloc
+{
+ [to release];
+ [cc release];
+ [bcc release];
+ [item release];
+ [address release];
+ [addressList release];
[super dealloc];
}
/* accessors */
-- (void)setTo:(NSArray *)_to
+- (void) setTo: (NSArray *) _to
{
- _to = [self properlySplitAddresses:_to];
- ASSIGNCOPY(self->to, _to);
+ ASSIGN (to, [self properlySplitAddresses: _to]);
}
- (NSArray *) to
{
NSString *mailto;
- mailto = [self queryParameterForKey:@"mailto"];
+ mailto = [self queryParameterForKey: @"mailto"];
if ([mailto length] > 0 && ![to count])
{
to = [NSArray arrayWithObject: mailto];
[to retain];
}
- return self->to;
+ return to;
}
-- (void)setCc:(NSArray *)_cc {
- _cc = [self properlySplitAddresses:_cc];
- ASSIGNCOPY(self->cc, _cc);
+- (void) setCc: (NSArray *) _cc
+{
+ ASSIGN (cc, [self properlySplitAddresses: _cc]);
}
-- (NSArray *)cc {
- return self->cc;
+- (NSArray *) cc
+{
+ return cc;
}
-- (void)setBcc:(NSArray *)_bcc {
- _bcc = [self properlySplitAddresses:_bcc];
- ASSIGNCOPY(self->bcc, _bcc);
+- (void) setBcc: (NSArray *) _bcc
+{
+ ASSIGN (bcc, [self properlySplitAddresses: _bcc]);
}
-- (NSArray *)bcc {
- return self->bcc;
+
+- (NSArray *) bcc
+{
+ return bcc;
}
-- (void)setAddressList:(NSArray *)_addressList {
- ASSIGN(self->addressList, _addressList);
+- (void) setAddressList: (NSArray *) _addressList
+{
+ ASSIGN (addressList, _addressList);
}
-- (NSArray *)addressList {
- return self->addressList;
+
+- (NSArray *) addressList
+{
+ return addressList;
}
-- (void)setAddress:(id)_address {
- ASSIGN(self->address, _address);
+- (void) setAddress: (id) _address
+{
+ ASSIGN (address, _address);
}
-- (id)address {
- return self->address;
+
+- (id) address
+{
+ return address;
}
-- (void)setItem:(id)_item {
- ASSIGN(self->item, _item);
+- (void) setItem: (id) _item
+{
+ ASSIGN (item, _item);
}
-- (id)item {
- return self->item;
+
+- (id) item
+{
+ return item;
}
-- (NSArray *)addressLists {
+- (NSArray *) addressLists
+{
NSMutableArray *ma;
ma = [NSMutableArray arrayWithCapacity:3];
- if ([self->to isNotNull]) [ma addObject:self->to];
- if ([self->cc isNotNull]) [ma addObject:self->cc];
- if ([self->bcc isNotNull]) [ma addObject:self->bcc];
-
+ if ([to isNotNull])
+ [ma addObject: to];
+ if ([cc isNotNull])
+ [ma addObject: cc];
+ if ([bcc isNotNull])
+ [ma addObject: bcc];
+
/* ensure that at least one object is available */
- if ([ma count] == 0) {
- NSArray *tmp = [NSArray arrayWithObject:@""];
- ASSIGNCOPY(self->to, tmp);
- [ma addObject:self->to];
- }
+ if ([ma count] == 0)
+ {
+ NSArray *tmp = [NSArray arrayWithObject:@""];
+ ASSIGN (to, tmp);
+ [ma addObject:to];
+ }
+
return ma;
}
-- (NSArray *)headers {
+- (NSArray *) headers
+{
return headers;
}
-- (NSString *)currentHeader {
- if(self->addressList == self->to)
+- (NSString *) currentHeader
+{
+ if (addressList == to)
return @"to";
- else if(self->addressList == self->cc)
+ else if (addressList == cc)
return @"cc";
+
return @"bcc";
}
/* identifiers */
-- (NSString *)currentRowId {
- char buf[16];
- sprintf(buf, "row_%d", self->currentIndex);
- return [NSString stringWithCString:buf];
+- (NSString *) currentRowId
+{
+ return [NSString stringWithFormat: @"row_%d", currentIndex];
}
-- (NSString *)currentPopUpId {
- char buf[16];
- sprintf(buf, "popup_%d", self->currentIndex);
- return [NSString stringWithCString:buf];
+- (NSString *) currentPopUpId
+{
+ return [NSString stringWithFormat: @"popup_%d", currentIndex];
}
-- (NSString *)currentAddressId {
- char buf[16];
- sprintf(buf, "addr_%d", self->currentIndex);
- return [NSString stringWithCString:buf];
+- (NSString *) currentAddressId
+{
+ return [NSString stringWithFormat: @"addr_%d", currentIndex];
}
-- (NSString *)nextId {
- self->currentIndex++;
+- (NSString *) nextId
+{
+ currentIndex++;
+
return @"";
}
/* address handling */
-- (NSArray *)properlySplitAddresses:(NSArray *)_addresses {
+- (NSArray *) properlySplitAddresses: (NSArray *) _addresses
+{
NSString *addrs;
NGMailAddressParser *parser;
NSArray *result;
NSMutableArray *ma;
unsigned i, count;
- if(!_addresses || [_addresses count] == 0)
+ if (!_addresses || [_addresses count] == 0)
return nil;
/* create one huge string, then split it using the parser */
/* handling requests */
-- (void)getAddressesFromFormValues:(NSDictionary *)_dict {
+- (void) getAddressesFromFormValues: (NSDictionary *) _dict
+{
NSMutableArray *rawTo, *rawCc, *rawBcc;
NSArray *keys;
unsigned i, count;
keys = [_dict allKeys];
count = [keys count];
- for (i = 0; i < count; i++) {
- NSString *key;
+ for (i = 0; i < count; i++)
+ {
+ NSString *key;
- key = [keys objectAtIndex:i];
- if([key hasPrefix:@"addr_"]) {
- NSString *idx, *addr, *popupKey, *popupValue;
-
- addr = [[_dict objectForKey:key] lastObject];
- idx = [self getIndexFromIdentifier:key];
- popupKey = [NSString stringWithFormat:@"popup_%@", idx];
- popupValue = [[_dict objectForKey:popupKey] lastObject];
- if([popupValue isEqualToString:@"0"])
- [rawTo addObject:addr];
- else if([popupValue isEqualToString:@"1"])
- [rawCc addObject:addr];
- else
- [rawBcc addObject:addr];
+ key = [keys objectAtIndex:i];
+ if ([key hasPrefix:@"addr_"])
+ {
+ NSString *idx, *addr, *popupKey, *popupValue;
+
+ addr = [[_dict objectForKey:key] lastObject];
+ idx = [self getIndexFromIdentifier:key];
+ popupKey = [NSString stringWithFormat:@"popup_%@", idx];
+ popupValue = [[_dict objectForKey:popupKey] lastObject];
+ if([popupValue isEqualToString:@"0"])
+ [rawTo addObject:addr];
+ else if([popupValue isEqualToString:@"1"])
+ [rawCc addObject:addr];
+ else
+ [rawBcc addObject:addr];
+ }
}
- }
- [self setTo:rawTo];
- [self setCc:rawCc];
- [self setBcc:rawBcc];
+ [self setTo: rawTo];
+ [self setCc: rawCc];
+ [self setBcc: rawBcc];
}
-- (NSString *)getIndexFromIdentifier:(NSString *)_identifier {
+- (NSString *) getIndexFromIdentifier: (NSString *) _identifier
+{
NSRange r;
- r = [_identifier rangeOfString:@"_"];
- return [_identifier substringFromIndex:NSMaxRange(r)];
+ r = [_identifier rangeOfString: @"_"];
+
+ return [_identifier substringFromIndex: NSMaxRange(r)];
}
-- (void)takeValuesFromRequest:(WORequest *)_rq inContext:(WOContext *)_ctx {
+- (void) takeValuesFromRequest: (WORequest *) _rq
+ inContext: (WOContext *) _ctx
+{
/* OK, we have a special form value processor */
NSDictionary *d;
__PRETTY_FUNCTION__,
d);
#endif
- [self getAddressesFromFormValues:d];
+ [self getAddressesFromFormValues: d];
}
-- (int)addressCount {
- return [self->to count] + [self->cc count] + [self->bcc count];
+- (int) addressCount
+{
+ return [to count] + [cc count] + [bcc count];
}
-- (int)currentIndex {
+- (int) currentIndex
+{
int count;
count = [self addressCount];
+
return count > 0 ? count - 1 : 0;
}
protectedBy = "View";
pageName = "UIxMailMainFrame";
};
- getMail = {
+ compose = {
protectedBy = "View";
- pageName = "UIxMailAccountsView";
+ pageName = "UIxMailMainFrame";
+ actionName = "compose";
};
};
};
--- /dev/null
+# GNUstep makefile
+
+-include ../../config.make
+include $(GNUSTEP_MAKEFILES)/common.make
+
+SOPE_VERSION = 4.7
+
+BUNDLE_NAME = SOGoElements
+BUNDLE_EXTENSION = .wox
+BUNDLE_INSTALL_DIR = $(GNUSTEP_INSTALLATION_DIR)/Library/WOxElemBuilders-$(SOPE_VERSION)/
+
+SOGoElements_PRINCIPAL_CLASS = SOGoElementsBundle
+
+SOGoElements_OBJC_FILES = \
+ SOGoElementsBundle.m \
+ SOGoElementsBuilder.m \
+ SOGoIEConditional.m
+
+# building
+
+-include GNUmakefile.preamble
+include $(GNUSTEP_MAKEFILES)/bundle.make
+-include GNUmakefile.postamble
+-include fhs.make
--- /dev/null
+ifneq ($(GNUSTEP_BUILD_DIR),)
+after-SOGoElements-all ::
+ @(cp bundle-info.plist \
+ $(GNUSTEP_BUILD_DIR)/$(BUNDLE_NAME)$(BUNDLE_EXTENSION))
+else
+after-SOGoElements-all ::
+ @(cd $(BUNDLE_NAME)$(BUNDLE_EXTENSION);\
+ cp ../bundle-info.plist .)
+endif
--- /dev/null
+/* SOGoElementsBuilder.h - this file is part of SOGo
+ *
+ * Copyright (C) 2007 Inverse groupe conseil
+ *
+ * Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
+ *
+ * This file is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This file is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef SOGOELEMENTSBUILDER_H
+#define SOGOELEMENTSBUILDER_H
+
+#import <NGObjWeb/WOxElemBuilder.h>
+
+@interface SOGoElementsBuilder : WOxTagClassElemBuilder
+@end
+
+#endif /* SOGOELEMENTSBUILDER_H */
--- /dev/null
+/* SOGoElementsBuilder.m - this file is part of SOGo
+ *
+ * Copyright (C) 2007 Inverse groupe conseil
+ *
+ * Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
+ *
+ * This file is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This file is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#import <Foundation/NSString.h>
+
+#import <SaxObjC/XMLNamespaces.h>
+
+#import "SOGoIEConditional.h"
+
+#import "SOGoElementsBuilder.h"
+
+@implementation SOGoElementsBuilder
+
+- (Class) classForElement: (id<DOMElement>) _element
+{
+ NSString *tagName;
+ Class zeClass;
+
+ zeClass = Nil;
+
+ if ([[_element namespaceURI] isEqualToString: XMLNS_OD_BIND])
+ {
+ tagName = [_element tagName];
+ if ([tagName isEqualToString: @"if-ie"])
+ zeClass = [SOGoIEConditional class];
+ }
+
+ return zeClass;
+}
+
+@end
--- /dev/null
+/* SOGoElementsBundle.m - this file is part of SOGo
+ *
+ * Copyright (C) 2007 Inverse groupe conseil
+ *
+ * Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
+ *
+ * This file is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This file is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#import <Foundation/NSObject.h>
+
+@interface SOGoElementsBundle : NSObject
+@end
+
+@implementation SOGoElementsBundle
+@end
--- /dev/null
+/* SOGoIEConditional.h - this file is part of SOGo
+ *
+ * Copyright (C) 2007 Inverse groupe conseil
+ *
+ * Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
+ *
+ * This file is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This file is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef SOGOIECONDITIONAL_H
+#define SOGOIECONDITIONAL_H
+
+#import <NGObjWeb/WODynamicElement.h>
+
+@class WOContext;
+@class WOElement;
+@class WOResponse;
+
+@interface SOGoIEConditional : WODynamicElement
+{
+ WOElement *template;
+}
+
+- (void) appendToResponse: (WOResponse *) _response
+ inContext: (WOContext *) _ctx;
+
+@end
+
+#endif /* SOGOIECONDITIONAL_H */
--- /dev/null
+/* SOGoIEConditional.m - this file is part of SOGo
+ *
+ * Copyright (C) 2007 Inverse groupe conseil
+ *
+ * Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
+ *
+ * This file is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This file is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#import <NGObjWeb/WOContext.h>
+#import <NGObjWeb/WOResponse.h>
+
+#import "SOGoIEConditional.h"
+
+@implementation SOGoIEConditional
+
+- (id) initWithName: (NSString *) name
+ associations: (NSDictionary *) associations
+ template: (WOElement *) newTemplate
+{
+ ASSIGN (template, newTemplate);
+
+ return self;
+}
+
+- (void) dealloc
+{
+ [template release];
+ [super dealloc];
+}
+
+- (void) appendToResponse: (WOResponse *) response
+ inContext: (WOContext *) context
+{
+ [response appendContentString: @"<!--[if IE]>"];
+ [template appendToResponse: response inContext: context];
+ [response appendContentString: @"<![endif]-->"];
+}
+
+@end
--- /dev/null
+{
+ requires = {
+ bundleManagerVersion = 1;
+
+ classes = (
+ { name = NSObject; }
+ );
+ };
+
+ provides = {
+ WOxElemBuilder = (
+ { name = "SOGoElementsBuilder"; },
+ );
+
+ WODynamicElements = (
+ { name = "SOGoIEConditional"; },
+ );
+
+ classes = (
+ { name = "SOGoElementsBuilder"; },
+ );
+ };
+}
NSString *priority;
NSString *privacy;
NSString *status;
+ NSString *category;
NSArray *categories;
NSDictionary *cycle;
NSString *cycleEnd;
[emails release];
}
+- (void) _loadCategories
+{
+ NSString *compCategories, *simpleCategory;
+
+ compCategories = [component categories];
+ if ([compCategories length] > 0)
+ {
+ simpleCategory = [[compCategories componentsSeparatedByString: @","]
+ objectAtIndex: 0];
+ ASSIGN (category, [simpleCategory uppercaseString]);
+ }
+}
+
/* warning: we use this method which will be triggered by the template system
when the page is instantiated, but we should find another and cleaner way of
doing this... for example, when the clientObject is set */
ASSIGN (status, [component status]);
ASSIGN (categories, [[component categories] commaSeparatedValues]);
ASSIGN (organizer, [component organizer]);
+ [self _loadCategories];
[self _loadAttendees];
}
// /* cycles */
return categories;
}
+- (void) setCategory: (NSArray *) newCategory
+{
+ ASSIGN (category, newCategory);
+}
+
+- (NSString *) category
+{
+ return category;
+}
+
- (NSString *) itemCategoryText
{
return [self labelForKey:
[component setComment: comment];
[component setUrl: url];
[component setAccessClass: privacy];
+ [component setCategories: [category capitalizedString]];
[self _handleAttendeesEdition];
[self _handleOrganizer];
clientObject = [self clientObject];
+++ /dev/null
-<?xml version='1.0' standalone='yes'?>
-
-<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:var="http://www.skyrix.com/od/binding"
- xmlns:const="http://www.skyrix.com/od/constant"
- xmlns:rsrc="OGo:url"
->
- <head>
- <title><var:string value="name"/></title>
- </head>
-
- <body>
- You shouldn't see this content at all - the direct actions redirect to
- the proper destinations, hence this component is _never_ rendered.
- </body>
-</html>
\ No newline at end of file
<script type="text/javascript">
var currentIndex = <var:string value="currentIndex" />;
</script>
- <script type="text/javascript" rsrc:src="UIxMailToSelection.js"> <!-- Space! --></script>
-
+ <script type="text/javascript" rsrc:src="UIxMailToSelection.js"><!-- space --></script>
+
<div id="addressList"
><var:foreach list="addressLists" item="addressList"
><var:foreach list="addressList" item="address">
<meta name="description" content="SOGo Web Interface" />
<meta name="author" content="SKYRIX Software AG/Inverse groupe conseil" />
<meta name="robots" content="stop" />
+ <meta name="build" var:content="buildDate" />
<link href="mailto:support@inverse.ca" rev="made" />
<link rel="shortcut icon" rsrc:href="lori_16x16.ico" type="image/x-icon" />
<link type="text/css" rel="stylesheet" rsrc:href="generic.css" />
<var:if condition="hasPageSpecificCSS"
><link type="text/css" rel="stylesheet" var:href="pageCSSURL"
/></var:if>
+ <var:if-ie
+ ><link type="text/css" rel="stylesheet" rsrc:href="iefixes.css"
+ /></var:if-ie>
</head>
<body var:class="bodyClasses">
var usersRightsWindowHeight = 200;
var usersRightsWindowWidth = 450;
-function openContactWindow(sender, url) {
- var msgWin = window.open(url, null, "width=450,height=600,resizable=0");
- msgWin.focus();
-}
-
function validateEditorInput(sender) {
var errortext = "";
var field;
function onContactRowDblClick(event, node) {
var contactId = node.getAttribute('id');
- openContactWindow(null,
- URLForFolderID(currentContactFolder)
- + "/" + contactId + "/edit");
+ openContactWindow(URLForFolderID(currentContactFolder)
+ + "/" + contactId + "/edit", contactId);
return false;
}
function onMenuEditContact(event) {
var contactId = document.menuTarget.getAttribute('id');
- openContactWindow(null,
- URLForFolderID(currentContactFolder)
- + "/" + contactId + "/edit");
+ openContactWindow(URLForFolderID(currentContactFolder)
+ + "/" + contactId + "/edit", contactId);
}
function onMenuWriteToContact(event) {
var rows = contactsList.getSelectedRowsId();
for (var i = 0; i < rows.length; i++) {
- openContactWindow(null,
- URLForFolderID(currentContactFolder)
- + "/" + rows[i] + "/edit");
+ openContactWindow(URLForFolderID(currentContactFolder)
+ + "/" + rows[i] + "/edit", rows[i]);
}
return false;
var mailto = sanitizeMailTo(sender.parentNode.parentNode.menuTarget.innerHTML);
if (mailto.length > 0)
- {
- w = window.open("compose?mailto=" + mailto,
- "SOGo_compose",
- "width=680,height=520,resizable=1,scrollbars=1,toolbar=0," +
- "location=0,directories=0,status=0,menubar=0,copyhistory=0");
- w.focus();
- }
+ openMailComposeWindow("compose?mailto=" + mailto);
return false; /* stop following the link */
}
preventDefault(event);
}
-function registerDraggableMessageNodes() {
- log ("can we drag...");
-}
-
function newContact(sender) {
- openContactWindow(sender,
- URLForFolderID(currentContactFolder) + "/new");
+ openContactWindow(URLForFolderID(currentContactFolder) + "/new");
return false; /* stop following the link */
}
visibility: hidden;
border: 0px;
-moz-opacity: 0.7;
- opacity: 0.7;
- filter: alpha(opacity=70); }
+ opacity: 0.7; }
TABLE#addr_table
{
wId += "SOGo_msg_" + msguid;
markMailReadInWindow(window, msguid);
}
- var msgWin = window.open(url, wId,
- "width=680,height=520,resizable=1,scrollbars=1,toolbar=0,"
- + "location=0,directories=0,status=0,menubar=0,copyhistory=0");
+ var msgWin = openMailComposeWindow(url, wId);
if (msguid) {
msgWin.messageId = msguid;
msgWin.messageURL = ApplicationBaseURL + currentMailbox + "/" + msguid;
return markMailInWindow(win, msguid, true);
}
-/* main window */
-
-function reopenToRemoveLocationBar() {
- // we cannot really use this, see below at the close comment
- if (window.locationbar && window.locationbar.visible) {
- newwin = window.open(window.location.href, "SOGo",
- "width=800,height=600,resizable=1,scrollbars=1," +
- "toolbar=0,location=0,directories=0,status=0," +
- "menubar=0,copyhistory=0");
- if (newwin) {
- window.close(); // this does only work for windows opened by scripts!
- newwin.focus();
- return true;
- }
- return false;
- }
- return true;
-}
-
/* mail list reply */
function openMessageWindowsForSelection(action, firstOnly) {
function composeNewMessage() {
var account = currentMailbox.split("/")[1];
var url = ApplicationBaseURL + "/" + account + "/compose";
- window.open(url, null,
- "width=680,height=520,resizable=1,scrollbars=1,toolbar=0,"
- + "location=0,directories=0,status=0,menubar=0,copyhistory=0");
+ openMailComposeWindow(url);
}
function openMailbox(mailbox, reload, idx) {
if (rows.length > 0) {
var url = (ApplicationBaseURL + currentMailbox + "/"
+ rows[0].substr(4) + "/viewsource");
- window.open(url, "",
- "width=680,height=520,resizable=1,scrollbars=1,toolbar=0,"
- + "location=0,directories=0,status=0,menubar=0,copyhistory=0");
+ openMailComposeWindow(url);
}
preventDefault(event);
var url = UserFolderURL + "Contacts/new?contactEmail=" + email;
if (c_name)
url += "&contactFN=" + c_name;
- w = window.open(url, null,
- "width=546,height=490,resizable=1,scrollbars=1,toolbar=0,"
- + "location=0,directories=0,status=0,menubar=0,copyhistory=0");
- w.focus();
+ openContactWindow(url);
}
return false; /* stop following the link */
DIV[class~="event"]._selected > DIV.eventInside
{ -moz-opacity: 0.7;
- opacity: 0.7;
- filter: alpha(opacity=70); }
+ opacity: 0.7; }
DIV.event > DIV.eventInside
{ position: absolute;
top: 2px;
bottom: 3px;
-moz-opacity: 0.1;
- opacity: 0.1;
- filter: alpha(opacity=10); }
+ opacity: 0.1; }
DIV.shadow2
{ left: 1px;
top: 1px;
bottom: 2px;
-moz-opacity: 0.1;
- opacity: 0.1;
- filter: alpha(opacity=10); }
+ opacity: 0.1; }
DIV.shadow3
{ left: 2px;
top: 0px;
bottom: 3px;
-moz-opacity: 0.1;
- opacity: 0.1;
- filter: alpha(opacity=10); }
+ opacity: 0.1; }
DIV.shadow4
{ left: 3px;
top: 3px;
bottom: 4px;
-moz-opacity: 0.4;
- opacity: 0.4;
- filter: alpha(opacity=40); }
+ opacity: 0.4; }
DIV.gradient, DIV.text
{ position: absolute;
var owner = data[i][1];
listItem.owner = owner;
$(listItem).addClassName("ownerIs" + owner);
- listItem.cname = data[i][0];
+ listItem.cname = escape(data[i][0]);
var input = document.createElement("input");
input.setAttribute("type", "checkbox");
listItem.appendChild(input);
function newEventDIV(cname, owner, starts, lasts,
startHour, endHour, title) {
var eventDiv = document.createElement("div");
- eventDiv.cname = cname;
+ eventDiv.cname = escape(cname);
eventDiv.owner = owner;
$(eventDiv).addClassName("event");
$(eventDiv).addClassName("starts" + starts);
SPAN.disabledToolbarButton
{ -moz-opacity: 0.4;
- opacity: 0.4;
- filter: alpha(opacity=40); }
+ opacity: 0.4; }
SPAN.toolbarButton:hover
{ color: -moz-buttonhovertext;
background-color: #999;
-moz-opacity: 0.6;
opacity: 0.6;
- filter: alpha(opacity=60);
z-index: 2;
top: 0px;
left: 0px;
{ position: absolute;
z-index: 2;
border-bottom: 2px solid #888;
- -moz-border-bottom-colors: #000 #9c9a94 transparent;
padding: 1em;
margin: 0px auto;
- -moz-opacity: 1.0;
- opacity: 1.0;
- filter: alpha(opacity=100);
color: #000;
- background-color: #d4d0c8; }
+ background-color: #d4d0c8;
+ -moz-border-bottom-colors: #000 #9c9a94 transparent;
+ -moz-opacity: 1.0;
+ opacity: 1.0; }
DIV.javascriptMessagePseudoTopWindow
{ border-top: 0px;
{
BODY
{ position: static;
- font-size: 25%;
+ font-size: 10pt;
height: auto;
overflow: visible; }
w.focus();
}
-function openMailComposeWindow(url) {
- var w = window.open(url, null,
+function openContactWindow(url, wId) {
+ if (!wId)
+ wId = "" + (new Date().getTime());
+ var w = window.open(url, wId,
+ "width=450,height=600,resizable=0");
+ w.focus();
+
+ return w;
+}
+
+function openMailComposeWindow(url, wId) {
+ if (!wId)
+ wId = "" + (new Date().getTime());
+ var w = window.open(url, wId,
"width=680,height=520,resizable=1,scrollbars=1,toolbar=0,"
+ "location=0,directories=0,status=0,menubar=0"
+ ",copyhistory=0");