From ac274947c732423ade874f36c3745bb79b6b44f4 Mon Sep 17 00:00:00 2001 From: wolfgang Date: Tue, 5 Feb 2008 15:13:02 +0000 Subject: [PATCH] git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1355 d1b88da0-ebda-0310-925b-ed51d893ca5b --- ...et-r1593.diff => sope-patchset-r1597.diff} | 338 +++++++++--------- SoObjects/SOGo/SOGoUserFolder.m | 22 +- UI/Contacts/UIxContactFoldersView.h | 7 + UI/Contacts/UIxContactFoldersView.m | 62 ++++ UI/Contacts/product.plist | 10 + .../French.lproj/Localizable.strings | 2 +- UI/MailerUI/UIxMailMainFrame.h | 2 +- UI/MailerUI/UIxMailMainFrame.m | 33 +- UI/MailerUI/product.plist | 4 +- UI/MainUI/product.plist | 1 + UI/Scheduler/UIxCalMainView.h | 5 + UI/Scheduler/UIxCalMainView.m | 64 ++++ UI/Scheduler/product.plist | 10 + UI/WebServerResources/ContactsUI.js | 26 +- UI/WebServerResources/MailerUI.js | 39 +- UI/WebServerResources/SOGoDragHandles.js | 22 +- UI/WebServerResources/SchedulerUI.js | 26 +- UI/WebServerResources/UIxMailEditor.js | 11 +- 18 files changed, 452 insertions(+), 232 deletions(-) rename SOPE/{sope-patchset-r1593.diff => sope-patchset-r1597.diff} (97%) diff --git a/SOPE/sope-patchset-r1593.diff b/SOPE/sope-patchset-r1597.diff similarity index 97% rename from SOPE/sope-patchset-r1593.diff rename to SOPE/sope-patchset-r1597.diff index 2fb75ed9..da002790 100644 --- a/SOPE/sope-patchset-r1593.diff +++ b/SOPE/sope-patchset-r1597.diff @@ -1,136 +1,6 @@ -Index: sope-gdl1/PostgreSQL/PostgreSQL72Channel.m -=================================================================== ---- sope-gdl1/PostgreSQL/PostgreSQL72Channel.m (révision 1593) -+++ sope-gdl1/PostgreSQL/PostgreSQL72Channel.m (copie de travail) -@@ -713,6 +713,39 @@ - return ms; - } - -+/* GCSEOAdaptorChannel protocol */ -+static NSString *sqlFolderFormat = (@"CREATE TABLE %@ (\n" \ -+ @" c_name VARCHAR (256) NOT NULL,\n" -+ @" c_content VARCHAR (100000) NOT NULL,\n" -+ @" c_creationdate INT4 NOT NULL,\n" -+ @" c_lastmodified INT4 NOT NULL,\n" -+ @" c_version INT4 NOT NULL,\n" -+ @" c_deleted INT4 NULL\n" -+ @")"); -+static NSString *sqlFolderACLFormat = (@"CREATE TABLE %@ (\n" \ -+ @" c_uid VARCHAR (256) NOT NULL,\n" -+ @" c_object VARCHAR (256) NOT NULL,\n" -+ @" c_role VARCHAR (80) NOT NULL\n" -+ @")"); -+ -+- (NSException *) createGCSFolderTableWithName: (NSString *) tableName -+{ -+ NSString *sql; -+ -+ sql = [NSString stringWithFormat: sqlFolderFormat, tableName]; -+ -+ return [self evaluateExpressionX: sql]; -+} -+ -+- (NSException *) createGCSFolderACLTableWithName: (NSString *) tableName -+{ -+ NSString *sql; -+ -+ sql = [NSString stringWithFormat: sqlFolderACLFormat, tableName]; -+ -+ return [self evaluateExpressionX: sql]; -+} -+ - @end /* PostgreSQL72Channel */ - - @implementation PostgreSQL72Channel(PrimaryKeyGeneration) -Index: sope-gdl1/Oracle8/OracleAdaptorChannel.m -=================================================================== ---- sope-gdl1/Oracle8/OracleAdaptorChannel.m (révision 1593) -+++ sope-gdl1/Oracle8/OracleAdaptorChannel.m (copie de travail) -@@ -30,6 +30,7 @@ - - #import - -+static BOOL debugOn = NO; - // - // - // -@@ -41,10 +42,19 @@ - - @implementation OracleAdaptorChannel (Private) - --- (void) _cleanup -++ (void) initialize - { -+ NSUserDefaults *ud; -+ -+ ud = [NSUserDefaults standardUserDefaults]; -+ debugOn = [ud boolForKey: @"OracleAdaptorDebug"]; -+} -+ -+- (void) _cleanup -+{ - column_info *info; - int c; -+ sword result; - - [_resultSetProperties removeAllObjects]; - -@@ -58,11 +68,29 @@ - // so we just free the value instead. - if (info->value) - { -- if (OCIDescriptorFree((dvoid *)info->value, (ub4)OCI_DTYPE_LOB) != OCI_SUCCESS) -+ if (info->type == SQLT_CLOB -+ || info->type == SQLT_BLOB -+ || info->type == SQLT_BFILEE -+ || info->type == SQLT_CFILEE) -+ { -+ result = OCIDescriptorFree((dvoid *)info->value, (ub4) OCI_DTYPE_LOB); -+ if (result != OCI_SUCCESS) -+ { -+ NSLog (@"value was not a LOB descriptor"); -+ abort(); -+ } -+ } -+ else - free(info->value); - info->value = NULL; - } -- free(info); -+ else -+ { -+ NSLog (@"trying to free an already freed value!"); -+ abort(); -+ } -+ free(info); -+ - [_row_buffer removeObjectAtIndex: c]; - } - -@@ -231,6 +259,9 @@ - - [self _cleanup]; - -+ if (debugOn) -+ [self logWithFormat: @"expression: %@", theExpression]; -+ - if (!theExpression || ![theExpression length]) - { - [NSException raise: @"OracleInvalidExpressionException" -@@ -302,7 +333,9 @@ - // We read the maximum width of a column - info->max_width = 0; - status = OCIAttrGet((dvoid*)param, (ub4)OCI_DTYPE_PARAM, (dvoid*)&(info->max_width), (ub4 *)0, (ub4)OCI_ATTR_DATA_SIZE, (OCIError *)_oci_err); -- -+ -+ if (debugOn) -+ NSLog(@"name: %s, type: %d", cname, info->type); - attribute = [EOAttribute attributeWithOracleType: info->type name: cname length: clen width: info->max_width]; - [_resultSetProperties addObject: attribute]; - Index: sope-mime/NGImap4/NGImap4Connection.m =================================================================== ---- sope-mime/NGImap4/NGImap4Connection.m (révision 1593) +--- sope-mime/NGImap4/NGImap4Connection.m (révision 1597) +++ sope-mime/NGImap4/NGImap4Connection.m (copie de travail) @@ -381,7 +381,7 @@ @@ -143,7 +13,7 @@ Index: sope-mime/NGImap4/NGImap4Connection.m [self errorWithFormat:@"Could not list mailbox hierarchy!"]; Index: sope-mime/NGImap4/NGImap4ResponseNormalizer.m =================================================================== ---- sope-mime/NGImap4/NGImap4ResponseNormalizer.m (révision 1593) +--- sope-mime/NGImap4/NGImap4ResponseNormalizer.m (révision 1597) +++ sope-mime/NGImap4/NGImap4ResponseNormalizer.m (copie de travail) @@ -648,14 +648,13 @@ enumerator = [_flags objectEnumerator]; @@ -169,7 +39,7 @@ Index: sope-mime/NGImap4/NGImap4ResponseNormalizer.m if (objs) free(objs); Index: sope-mime/NGImap4/NGImap4ResponseParser.m =================================================================== ---- sope-mime/NGImap4/NGImap4ResponseParser.m (révision 1593) +--- sope-mime/NGImap4/NGImap4ResponseParser.m (révision 1597) +++ sope-mime/NGImap4/NGImap4ResponseParser.m (copie de travail) @@ -84,6 +84,8 @@ static NSDictionary *_parseMultipartBody(NGImap4ResponseParser *self, @@ -380,7 +250,7 @@ Index: sope-mime/NGImap4/NGImap4ResponseParser.m { Index: sope-mime/NGMail/NGSmtpClient.m =================================================================== ---- sope-mime/NGMail/NGSmtpClient.m (révision 1593) +--- sope-mime/NGMail/NGSmtpClient.m (révision 1597) +++ sope-mime/NGMail/NGSmtpClient.m (copie de travail) @@ -24,6 +24,82 @@ #include "NGSmtpReplyCodes.h" @@ -536,7 +406,7 @@ Index: sope-mime/NGMail/NGSmtpClient.m reply = [self receiveReply]; Index: sope-mime/NGMail/NGMimeMessageGenerator.m =================================================================== ---- sope-mime/NGMail/NGMimeMessageGenerator.m (révision 1593) +--- sope-mime/NGMail/NGMimeMessageGenerator.m (révision 1597) +++ sope-mime/NGMail/NGMimeMessageGenerator.m (copie de travail) @@ -86,37 +86,40 @@ char *des = NULL; @@ -602,7 +472,7 @@ Index: sope-mime/NGMail/NGMimeMessageGenerator.m unsigned isoEndLen = 2; Index: sope-mime/NGMime/NGMimeRFC822DateHeaderFieldParser.m =================================================================== ---- sope-mime/NGMime/NGMimeRFC822DateHeaderFieldParser.m (révision 1593) +--- sope-mime/NGMime/NGMimeRFC822DateHeaderFieldParser.m (révision 1597) +++ sope-mime/NGMime/NGMimeRFC822DateHeaderFieldParser.m (copie de travail) @@ -19,88 +19,45 @@ 02111-1307, USA. @@ -997,7 +867,7 @@ Index: sope-mime/NGMime/NGMimeRFC822DateHeaderFieldParser.m #if 0 Index: sope-mime/NGMime/NGMimeHeaderFieldGeneratorSet.m =================================================================== ---- sope-mime/NGMime/NGMimeHeaderFieldGeneratorSet.m (révision 1593) +--- sope-mime/NGMime/NGMimeHeaderFieldGeneratorSet.m (révision 1597) +++ sope-mime/NGMime/NGMimeHeaderFieldGeneratorSet.m (copie de travail) @@ -77,6 +77,7 @@ [rfc822Set setGenerator:gen forField:@"bcc"]; @@ -1009,7 +879,7 @@ Index: sope-mime/NGMime/NGMimeHeaderFieldGeneratorSet.m Index: sope-mime/NGMime/NGMimeBodyPart.m =================================================================== ---- sope-mime/NGMime/NGMimeBodyPart.m (révision 1593) +--- sope-mime/NGMime/NGMimeBodyPart.m (révision 1597) +++ sope-mime/NGMime/NGMimeBodyPart.m (copie de travail) @@ -31,18 +31,6 @@ return 2; @@ -1047,7 +917,7 @@ Index: sope-mime/NGMime/NGMimeBodyPart.m - (NSString *)contentId { Index: sope-mime/NGMime/GNUmakefile.preamble =================================================================== ---- sope-mime/NGMime/GNUmakefile.preamble (révision 1593) +--- sope-mime/NGMime/GNUmakefile.preamble (révision 1597) +++ sope-mime/NGMime/GNUmakefile.preamble (copie de travail) @@ -5,6 +5,11 @@ -DLIBRARY_MINOR_VERSION=${MINOR_VERSION} \ @@ -1063,7 +933,7 @@ Index: sope-mime/NGMime/GNUmakefile.preamble -I../../sope-core/NGStreams/ \ Index: sope-mime/NGMime/NGMimeBodyParser.m =================================================================== ---- sope-mime/NGMime/NGMimeBodyParser.m (révision 1593) +--- sope-mime/NGMime/NGMimeBodyParser.m (révision 1597) +++ sope-mime/NGMime/NGMimeBodyParser.m (copie de travail) @@ -67,7 +67,10 @@ if (_data == nil) return nil; @@ -1079,7 +949,7 @@ Index: sope-mime/NGMime/NGMimeBodyParser.m Index: sope-mime/NGMime/NGMimePartParser.h =================================================================== ---- sope-mime/NGMime/NGMimePartParser.h (révision 1593) +--- sope-mime/NGMime/NGMimePartParser.h (révision 1597) +++ sope-mime/NGMime/NGMimePartParser.h (copie de travail) @@ -117,6 +117,7 @@ BOOL parserParseRawBodyDataOfPart:1; @@ -1101,7 +971,7 @@ Index: sope-mime/NGMime/NGMimePartParser.h @interface NSObject(NGMimePartParser) Index: sope-mime/NGMime/NGMimePartParser.m =================================================================== ---- sope-mime/NGMime/NGMimePartParser.m (révision 1593) +--- sope-mime/NGMime/NGMimePartParser.m (révision 1597) +++ sope-mime/NGMime/NGMimePartParser.m (copie de travail) @@ -227,7 +227,7 @@ } @@ -1126,7 +996,7 @@ Index: sope-mime/NGMime/NGMimePartParser.m : [NGMimeType mimeType:[ctype stringValue]]; Index: sope-mime/NGMime/NGMimeAddressHeaderFieldGenerator.m =================================================================== ---- sope-mime/NGMime/NGMimeAddressHeaderFieldGenerator.m (révision 1593) +--- sope-mime/NGMime/NGMimeAddressHeaderFieldGenerator.m (révision 1597) +++ sope-mime/NGMime/NGMimeAddressHeaderFieldGenerator.m (copie de travail) @@ -130,8 +130,13 @@ @@ -1157,7 +1027,7 @@ Index: sope-mime/NGMime/NGMimeAddressHeaderFieldGenerator.m bufLen = [data length]; Index: sope-mime/NGMime/NGMimeContentDispositionHeaderFieldGenerator.m =================================================================== ---- sope-mime/NGMime/NGMimeContentDispositionHeaderFieldGenerator.m (révision 1593) +--- sope-mime/NGMime/NGMimeContentDispositionHeaderFieldGenerator.m (révision 1597) +++ sope-mime/NGMime/NGMimeContentDispositionHeaderFieldGenerator.m (copie de travail) @@ -49,80 +49,70 @@ @@ -1291,9 +1161,139 @@ Index: sope-mime/NGMime/NGMimeContentDispositionHeaderFieldGenerator.m } return data; } +Index: sope-gdl1/PostgreSQL/PostgreSQL72Channel.m +=================================================================== +--- sope-gdl1/PostgreSQL/PostgreSQL72Channel.m (révision 1597) ++++ sope-gdl1/PostgreSQL/PostgreSQL72Channel.m (copie de travail) +@@ -713,6 +713,39 @@ + return ms; + } + ++/* GCSEOAdaptorChannel protocol */ ++static NSString *sqlFolderFormat = (@"CREATE TABLE %@ (\n" \ ++ @" c_name VARCHAR (256) NOT NULL,\n" ++ @" c_content VARCHAR (100000) NOT NULL,\n" ++ @" c_creationdate INT4 NOT NULL,\n" ++ @" c_lastmodified INT4 NOT NULL,\n" ++ @" c_version INT4 NOT NULL,\n" ++ @" c_deleted INT4 NULL\n" ++ @")"); ++static NSString *sqlFolderACLFormat = (@"CREATE TABLE %@ (\n" \ ++ @" c_uid VARCHAR (256) NOT NULL,\n" ++ @" c_object VARCHAR (256) NOT NULL,\n" ++ @" c_role VARCHAR (80) NOT NULL\n" ++ @")"); ++ ++- (NSException *) createGCSFolderTableWithName: (NSString *) tableName ++{ ++ NSString *sql; ++ ++ sql = [NSString stringWithFormat: sqlFolderFormat, tableName]; ++ ++ return [self evaluateExpressionX: sql]; ++} ++ ++- (NSException *) createGCSFolderACLTableWithName: (NSString *) tableName ++{ ++ NSString *sql; ++ ++ sql = [NSString stringWithFormat: sqlFolderACLFormat, tableName]; ++ ++ return [self evaluateExpressionX: sql]; ++} ++ + @end /* PostgreSQL72Channel */ + + @implementation PostgreSQL72Channel(PrimaryKeyGeneration) +Index: sope-gdl1/Oracle8/OracleAdaptorChannel.m +=================================================================== +--- sope-gdl1/Oracle8/OracleAdaptorChannel.m (révision 1597) ++++ sope-gdl1/Oracle8/OracleAdaptorChannel.m (copie de travail) +@@ -30,6 +30,7 @@ + + #import + ++static BOOL debugOn = NO; + // + // + // +@@ -41,10 +42,19 @@ + + @implementation OracleAdaptorChannel (Private) + +-- (void) _cleanup +++ (void) initialize + { ++ NSUserDefaults *ud; ++ ++ ud = [NSUserDefaults standardUserDefaults]; ++ debugOn = [ud boolForKey: @"OracleAdaptorDebug"]; ++} ++ ++- (void) _cleanup ++{ + column_info *info; + int c; ++ sword result; + + [_resultSetProperties removeAllObjects]; + +@@ -58,11 +68,29 @@ + // so we just free the value instead. + if (info->value) + { +- if (OCIDescriptorFree((dvoid *)info->value, (ub4)OCI_DTYPE_LOB) != OCI_SUCCESS) ++ if (info->type == SQLT_CLOB ++ || info->type == SQLT_BLOB ++ || info->type == SQLT_BFILEE ++ || info->type == SQLT_CFILEE) ++ { ++ result = OCIDescriptorFree((dvoid *)info->value, (ub4) OCI_DTYPE_LOB); ++ if (result != OCI_SUCCESS) ++ { ++ NSLog (@"value was not a LOB descriptor"); ++ abort(); ++ } ++ } ++ else + free(info->value); + info->value = NULL; + } +- free(info); ++ else ++ { ++ NSLog (@"trying to free an already freed value!"); ++ abort(); ++ } ++ free(info); ++ + [_row_buffer removeObjectAtIndex: c]; + } + +@@ -231,6 +259,9 @@ + + [self _cleanup]; + ++ if (debugOn) ++ [self logWithFormat: @"expression: %@", theExpression]; ++ + if (!theExpression || ![theExpression length]) + { + [NSException raise: @"OracleInvalidExpressionException" +@@ -302,7 +333,9 @@ + // We read the maximum width of a column + info->max_width = 0; + status = OCIAttrGet((dvoid*)param, (ub4)OCI_DTYPE_PARAM, (dvoid*)&(info->max_width), (ub4 *)0, (ub4)OCI_ATTR_DATA_SIZE, (OCIError *)_oci_err); +- ++ ++ if (debugOn) ++ NSLog(@"name: %s, type: %d", cname, info->type); + attribute = [EOAttribute attributeWithOracleType: info->type name: cname length: clen width: info->max_width]; + [_resultSetProperties addObject: attribute]; + Index: sope-core/NGExtensions/FdExt.subproj/NSString+Encoding.m =================================================================== ---- sope-core/NGExtensions/FdExt.subproj/NSString+Encoding.m (révision 1593) +--- sope-core/NGExtensions/FdExt.subproj/NSString+Encoding.m (révision 1597) +++ sope-core/NGExtensions/FdExt.subproj/NSString+Encoding.m (copie de travail) @@ -140,8 +140,12 @@ @@ -1336,7 +1336,7 @@ Index: sope-core/NGExtensions/FdExt.subproj/NSString+Encoding.m static char *iconv_wrapper(id self, char *_src, unsigned _srcLen, Index: sope-xml/libxmlSAXDriver/libxmlHTMLSAXDriver.h =================================================================== ---- sope-xml/libxmlSAXDriver/libxmlHTMLSAXDriver.h (révision 1593) +--- sope-xml/libxmlSAXDriver/libxmlHTMLSAXDriver.h (révision 1597) +++ sope-xml/libxmlSAXDriver/libxmlHTMLSAXDriver.h (copie de travail) @@ -19,6 +19,8 @@ 02111-1307, USA. @@ -1358,7 +1358,7 @@ Index: sope-xml/libxmlSAXDriver/libxmlHTMLSAXDriver.h id entityResolver; Index: sope-xml/libxmlSAXDriver/libxmlHTMLSAXDriver.m =================================================================== ---- sope-xml/libxmlSAXDriver/libxmlHTMLSAXDriver.m (révision 1593) +--- sope-xml/libxmlSAXDriver/libxmlHTMLSAXDriver.m (révision 1597) +++ sope-xml/libxmlSAXDriver/libxmlHTMLSAXDriver.m (copie de travail) @@ -30,6 +30,12 @@ #include @@ -1418,7 +1418,7 @@ Index: sope-xml/libxmlSAXDriver/libxmlHTMLSAXDriver.m - (void)tearDownParser { Index: sope-appserver/mod_ngobjweb/config.c =================================================================== ---- sope-appserver/mod_ngobjweb/config.c (révision 1593) +--- sope-appserver/mod_ngobjweb/config.c (révision 1597) +++ sope-appserver/mod_ngobjweb/config.c (copie de travail) @@ -21,7 +21,7 @@ @@ -1431,7 +1431,7 @@ Index: sope-appserver/mod_ngobjweb/config.c if (buf == NULL) Index: sope-appserver/mod_ngobjweb/NGBufferedDescriptor.c =================================================================== ---- sope-appserver/mod_ngobjweb/NGBufferedDescriptor.c (révision 1593) +--- sope-appserver/mod_ngobjweb/NGBufferedDescriptor.c (révision 1597) +++ sope-appserver/mod_ngobjweb/NGBufferedDescriptor.c (copie de travail) @@ -23,6 +23,7 @@ #include @@ -1443,7 +1443,7 @@ Index: sope-appserver/mod_ngobjweb/NGBufferedDescriptor.c // returns the number of bytes which where read from the buffer Index: sope-appserver/mod_ngobjweb/GNUmakefile =================================================================== ---- sope-appserver/mod_ngobjweb/GNUmakefile (révision 1593) +--- sope-appserver/mod_ngobjweb/GNUmakefile (révision 1597) +++ sope-appserver/mod_ngobjweb/GNUmakefile (copie de travail) @@ -81,7 +81,7 @@ @@ -1456,7 +1456,7 @@ Index: sope-appserver/mod_ngobjweb/GNUmakefile Index: sope-appserver/mod_ngobjweb/handler.c =================================================================== ---- sope-appserver/mod_ngobjweb/handler.c (révision 1593) +--- sope-appserver/mod_ngobjweb/handler.c (révision 1597) +++ sope-appserver/mod_ngobjweb/handler.c (copie de travail) @@ -267,7 +267,7 @@ const char *uri; @@ -1584,7 +1584,7 @@ Index: sope-appserver/mod_ngobjweb/handler.c static void test(void) { Index: sope-appserver/NGObjWeb/GNUmakefile.postamble =================================================================== ---- sope-appserver/NGObjWeb/GNUmakefile.postamble (révision 1593) +--- sope-appserver/NGObjWeb/GNUmakefile.postamble (révision 1597) +++ sope-appserver/NGObjWeb/GNUmakefile.postamble (copie de travail) @@ -23,14 +23,20 @@ @@ -1613,7 +1613,7 @@ Index: sope-appserver/NGObjWeb/GNUmakefile.postamble -endif Index: sope-appserver/NGObjWeb/WOContext.m =================================================================== ---- sope-appserver/NGObjWeb/WOContext.m (révision 1593) +--- sope-appserver/NGObjWeb/WOContext.m (révision 1597) +++ sope-appserver/NGObjWeb/WOContext.m (copie de travail) @@ -64,11 +64,13 @@ static BOOL testNSURLs = NO; @@ -1653,7 +1653,7 @@ Index: sope-appserver/NGObjWeb/WOContext.m serverURL = [@"http://" stringByAppendingString:host]; Index: sope-appserver/NGObjWeb/DAVPropMap.plist =================================================================== ---- sope-appserver/NGObjWeb/DAVPropMap.plist (révision 1593) +--- sope-appserver/NGObjWeb/DAVPropMap.plist (révision 1597) +++ sope-appserver/NGObjWeb/DAVPropMap.plist (copie de travail) @@ -123,11 +123,14 @@ @@ -1674,7 +1674,7 @@ Index: sope-appserver/NGObjWeb/DAVPropMap.plist } Index: sope-appserver/NGObjWeb/WebDAV/SaxDAVHandler.m =================================================================== ---- sope-appserver/NGObjWeb/WebDAV/SaxDAVHandler.m (révision 1593) +--- sope-appserver/NGObjWeb/WebDAV/SaxDAVHandler.m (révision 1597) +++ sope-appserver/NGObjWeb/WebDAV/SaxDAVHandler.m (copie de travail) @@ -655,6 +655,7 @@ if (self->responses == nil) @@ -1686,7 +1686,7 @@ Index: sope-appserver/NGObjWeb/WebDAV/SaxDAVHandler.m case 'n': Index: sope-appserver/NGObjWeb/DynamicElements/WOHyperlinkInfo.m =================================================================== ---- sope-appserver/NGObjWeb/DynamicElements/WOHyperlinkInfo.m (révision 1593) +--- sope-appserver/NGObjWeb/DynamicElements/WOHyperlinkInfo.m (révision 1597) +++ sope-appserver/NGObjWeb/DynamicElements/WOHyperlinkInfo.m (copie de travail) @@ -216,6 +216,12 @@ assocCount++; @@ -1703,9 +1703,9 @@ Index: sope-appserver/NGObjWeb/DynamicElements/WOHyperlinkInfo.m Index: sope-appserver/NGObjWeb/DynamicElements/_WOComplexHyperlink.m =================================================================== ---- sope-appserver/NGObjWeb/DynamicElements/_WOComplexHyperlink.m (révision 1593) +--- sope-appserver/NGObjWeb/DynamicElements/_WOComplexHyperlink.m (révision 1597) +++ sope-appserver/NGObjWeb/DynamicElements/_WOComplexHyperlink.m (copie de travail) -@@ -40,6 +40,7 @@ +@@ -41,6 +41,7 @@ WOAssociation *string; WOAssociation *target; WOAssociation *disabled; @@ -1713,7 +1713,7 @@ Index: sope-appserver/NGObjWeb/DynamicElements/_WOComplexHyperlink.m WOElement *template; /* new in WO4: */ -@@ -359,6 +360,7 @@ +@@ -360,6 +361,7 @@ { if ((self = [super initWithName:_name hyperlinkInfo:_info template:_t])) { self->href = _info->href; @@ -1721,19 +1721,25 @@ Index: sope-appserver/NGObjWeb/DynamicElements/_WOComplexHyperlink.m } return self; } -@@ -374,6 +376,9 @@ +@@ -375,11 +377,14 @@ // TODO: we need a binding to disable rewriting! NSRange r; - + + if ([[self->isAbsolute valueInContext:_ctx] boolValue] == YES) + return NO; + + r.length = [_s length]; + + /* do not rewrite pure fragment URLs */ + if (r.length > 0 && [_s characterAtIndex:0] == '#') +- return false; ++ return NO; + + /* rewrite all URLs w/o a protocol */ r = [_s rangeOfString:@":"]; - if (r.length == 0) - return YES; Index: sope-appserver/NGObjWeb/DynamicElements/WOHyperlinkInfo.h =================================================================== ---- sope-appserver/NGObjWeb/DynamicElements/WOHyperlinkInfo.h (révision 1593) +--- sope-appserver/NGObjWeb/DynamicElements/WOHyperlinkInfo.h (révision 1597) +++ sope-appserver/NGObjWeb/DynamicElements/WOHyperlinkInfo.h (copie de travail) @@ -41,7 +41,8 @@ WOAssociation *pageName; @@ -1747,7 +1753,7 @@ Index: sope-appserver/NGObjWeb/DynamicElements/WOHyperlinkInfo.h /* 'ivar' associations */ Index: sope-appserver/NGObjWeb/SoObjects/SoObject.m =================================================================== ---- sope-appserver/NGObjWeb/SoObjects/SoObject.m (révision 1593) +--- sope-appserver/NGObjWeb/SoObjects/SoObject.m (révision 1597) +++ sope-appserver/NGObjWeb/SoObjects/SoObject.m (copie de travail) @@ -39,22 +39,34 @@ static int debugLookup = -1; @@ -1898,7 +1904,7 @@ Index: sope-appserver/NGObjWeb/SoObjects/SoObject.m Index: sope-appserver/NGObjWeb/WOHttpAdaptor/WOHttpTransaction.m =================================================================== ---- sope-appserver/NGObjWeb/WOHttpAdaptor/WOHttpTransaction.m (révision 1593) +--- sope-appserver/NGObjWeb/WOHttpAdaptor/WOHttpTransaction.m (révision 1597) +++ sope-appserver/NGObjWeb/WOHttpAdaptor/WOHttpTransaction.m (copie de travail) @@ -31,6 +31,7 @@ #include diff --git a/SoObjects/SOGo/SOGoUserFolder.m b/SoObjects/SOGo/SOGoUserFolder.m index b034c311..d8a475db 100644 --- a/SoObjects/SOGo/SOGoUserFolder.m +++ b/SoObjects/SOGo/SOGoUserFolder.m @@ -51,20 +51,20 @@ @implementation SOGoUserFolder -+ (void) initialize -{ - SoClassSecurityInfo *sInfo; - NSArray *basicRoles; +// + (void) initialize +// { +// SoClassSecurityInfo *sInfo; +// NSArray *basicRoles; - sInfo = [self soClassSecurityInfo]; - [sInfo declareObjectProtected: SoPerm_View]; +// sInfo = [self soClassSecurityInfo]; +// [sInfo declareObjectProtected: SoPerm_View]; - basicRoles = [NSArray arrayWithObject: SoRole_Authenticated]; +// basicRoles = [NSArray arrayWithObject: SoRole_Authenticated]; - /* require Authenticated role for View and WebDAV */ - [sInfo declareRoles: basicRoles asDefaultForPermission: SoPerm_View]; - [sInfo declareRoles: basicRoles asDefaultForPermission: SoPerm_WebDAVAccess]; -} +// /* require Authenticated role for View and WebDAV */ +// [sInfo declareRoles: basicRoles asDefaultForPermission: SoPerm_View]; +// [sInfo declareRoles: basicRoles asDefaultForPermission: SoPerm_WebDAVAccess]; +// } /* accessors */ diff --git a/UI/Contacts/UIxContactFoldersView.h b/UI/Contacts/UIxContactFoldersView.h index 68698219..51f58b9d 100644 --- a/UI/Contacts/UIxContactFoldersView.h +++ b/UI/Contacts/UIxContactFoldersView.h @@ -26,6 +26,13 @@ #import @interface UIxContactFoldersView : UIxComponent +{ + NSUserDefaults *ud; + NSMutableDictionary *moduleSettings; +} + +- (WOResponse *) getDragHandlesStateAction; +- (WOResponse *) saveDragHandleStateAction; @end diff --git a/UI/Contacts/UIxContactFoldersView.m b/UI/Contacts/UIxContactFoldersView.m index c662072a..964d3506 100644 --- a/UI/Contacts/UIxContactFoldersView.m +++ b/UI/Contacts/UIxContactFoldersView.m @@ -21,6 +21,7 @@ */ #import +#import #import #import @@ -46,6 +47,27 @@ @implementation UIxContactFoldersView +- (void) _setupContext +{ + SOGoUser *activeUser; + NSString *module; + SOGoContactFolders *clientObject; + + activeUser = [context activeUser]; + clientObject = [self clientObject]; + + module = [clientObject nameInContainer]; + + ud = [activeUser userSettings]; + moduleSettings = [ud objectForKey: module]; + if (!moduleSettings) + { + moduleSettings = [NSMutableDictionary new]; + [moduleSettings autorelease]; + } + [ud setObject: moduleSettings forKey: module]; +} + - (id) _selectActionForApplication: (NSString *) actionName { SOGoContactFolders *folders; @@ -247,4 +269,44 @@ // ? contactFolder : nil); // } +- (WOResponse *) getDragHandlesStateAction +{ + NSArray *dragHandles; + NSString *vertical, *horizontal; + + [self _setupContext]; + + vertical = [moduleSettings objectForKey: @"DragHandleVertical"]; + horizontal = [moduleSettings objectForKey: @"DragHandleHorizontal"]; + dragHandles = [[NSArray alloc] initWithObjects: + vertical ? vertical : @"", + horizontal ? horizontal : @"", + nil]; + + return [self responseWithStatus: 200 + andString: [dragHandles jsonRepresentation]]; +} + +- (WOResponse *) saveDragHandleStateAction +{ + WORequest *request; + NSString *dragHandle; + + [self _setupContext]; + request = [context request]; + + if ((dragHandle = [request formValueForKey: @"vertical"]) != nil) + [moduleSettings setObject: dragHandle + forKey: @"DragHandleVertical"]; + else if ((dragHandle = [request formValueForKey: @"horizontal"]) != nil) + [moduleSettings setObject: dragHandle + forKey: @"DragHandleHorizontal"]; + else + return [self responseWithStatus: 400]; + + [ud synchronize]; + + return [self responseWithStatus: 204]; +} + @end diff --git a/UI/Contacts/product.plist b/UI/Contacts/product.plist index 7cb5f6fc..4a0285ae 100644 --- a/UI/Contacts/product.plist +++ b/UI/Contacts/product.plist @@ -50,6 +50,16 @@ protectedBy = "View"; pageName = "UIxContactsUserFolders"; }; + dragHandlesState = { + protectedBy = ""; + pageName = "UIxContactFoldersView"; + actionName = "getDragHandlesState"; + }; + saveDragHandleState = { + protectedBy = "View"; + pageName = "UIxContactFoldersView"; + actionName = "saveDragHandleState"; + }; }; }; diff --git a/UI/MailPartViewers/French.lproj/Localizable.strings b/UI/MailPartViewers/French.lproj/Localizable.strings index e1268352..8574aca1 100644 --- a/UI/MailPartViewers/French.lproj/Localizable.strings +++ b/UI/MailPartViewers/French.lproj/Localizable.strings @@ -10,7 +10,7 @@ you_are_an_attendee = "vous êtes invité"; add_info_text = "iMIP 'ADD' requests are not yet supported by SOGo."; publish_info_text = "L'expéditeur vous informe de l'événement attaché."; cancel_info_text = "Votre invitation ou l'événement au complet a été annulé."; -request_info_no_attendee = "propose une réunion entre les invités. Ce message tint seulement lieu d'avis, vous n'êtes pas indiqué comme invité."; +request_info_no_attendee = "propose une réunion entre les invités. Ce message tient seulement lieu d'avis, vous n'êtes pas indiqué comme invité."; Appointment = "Événement"; Organizer = "Organisateur"; diff --git a/UI/MailerUI/UIxMailMainFrame.h b/UI/MailerUI/UIxMailMainFrame.h index 2147d5f1..a4f3dcc6 100644 --- a/UI/MailerUI/UIxMailMainFrame.h +++ b/UI/MailerUI/UIxMailMainFrame.h @@ -34,7 +34,7 @@ - (WOResponse *) getDragHandlesStateAction; - (WOResponse *) getFoldersStateAction; -- (WOResponse *) saveDragHandlesStateAction; +- (WOResponse *) saveDragHandleStateAction; - (WOResponse *) saveFoldersStateAction; @end diff --git a/UI/MailerUI/UIxMailMainFrame.m b/UI/MailerUI/UIxMailMainFrame.m index 83f24614..40126f46 100644 --- a/UI/MailerUI/UIxMailMainFrame.m +++ b/UI/MailerUI/UIxMailMainFrame.m @@ -165,12 +165,20 @@ - (WOResponse *) getDragHandlesStateAction { - NSString *dragHandles; + NSArray *dragHandles; + NSString *vertical, *horizontal; [self _setupContext]; - dragHandles = [moduleSettings objectForKey: @"DragHandles"]; - return [self responseWithStatus: 200 andString: dragHandles]; + vertical = [moduleSettings objectForKey: @"DragHandleVertical"]; + horizontal = [moduleSettings objectForKey: @"DragHandleHorizontal"]; + dragHandles = [[NSArray alloc] initWithObjects: + vertical ? vertical : @"", + horizontal ? horizontal : @"", + nil]; + + return [self responseWithStatus: 200 + andString: [dragHandles jsonRepresentation]]; } - (WOResponse *) getFoldersStateAction @@ -183,20 +191,25 @@ return [self responseWithStatus: 200 andString: expandedFolders]; } -- (WOResponse *) saveDragHandlesStateAction +- (WOResponse *) saveDragHandleStateAction { WORequest *request; - NSString *dragHandles; + NSString *dragHandle; [self _setupContext]; request = [context request]; - dragHandles = [request formValueForKey: @"dragHandles"]; - - [moduleSettings setObject: dragHandles - forKey: @"DragHandles"]; + if ((dragHandle = [request formValueForKey: @"vertical"]) != nil) + [moduleSettings setObject: dragHandle + forKey: @"DragHandleVertical"]; + else if ((dragHandle = [request formValueForKey: @"horizontal"]) != nil) + [moduleSettings setObject: dragHandle + forKey: @"DragHandleHorizontal"]; + else + return [self responseWithStatus: 400]; + [ud synchronize]; - + return [self responseWithStatus: 204]; } diff --git a/UI/MailerUI/product.plist b/UI/MailerUI/product.plist index e15dd206..4b10ad44 100644 --- a/UI/MailerUI/product.plist +++ b/UI/MailerUI/product.plist @@ -340,10 +340,10 @@ pageName = "UIxMailMainFrame"; actionName = "getFoldersState"; }; - saveDragHandlesState = { + saveDragHandleState = { protectedBy = "View"; pageName = "UIxMailMainFrame"; - actionName = "saveDragHandlesState"; + actionName = "saveDragHandleState"; }; saveFoldersState = { protectedBy = "View"; diff --git a/UI/MainUI/product.plist b/UI/MainUI/product.plist index af40eccd..952e5474 100644 --- a/UI/MainUI/product.plist +++ b/UI/MainUI/product.plist @@ -75,6 +75,7 @@ defaultRoles = { "Access Contents Information" = ( "Authenticated" ); "WebDAV Access" = ( "Authenticated" ); + "View" = ( "Authenticated" ); }; }; SOGoGCSFolder = { diff --git a/UI/Scheduler/UIxCalMainView.h b/UI/Scheduler/UIxCalMainView.h index b1e13a08..3ebb2fe0 100644 --- a/UI/Scheduler/UIxCalMainView.h +++ b/UI/Scheduler/UIxCalMainView.h @@ -33,6 +33,8 @@ { NSString *monthMenuItem; NSNumber *yearMenuItem; + NSUserDefaults *ud; + NSMutableDictionary *moduleSettings; } - (NSArray *) monthMenuItems; @@ -45,6 +47,9 @@ - (void) setYearMenuItem: (NSNumber *) aYearMenuItem; - (NSNumber *) yearMenuItem; +- (WOResponse *) getDragHandlesStateAction; +- (WOResponse *) saveDragHandleStateAction; + @end #endif /* UIXCALMAINVIEW_H */ diff --git a/UI/Scheduler/UIxCalMainView.m b/UI/Scheduler/UIxCalMainView.m index fdbdd81f..0739df96 100644 --- a/UI/Scheduler/UIxCalMainView.m +++ b/UI/Scheduler/UIxCalMainView.m @@ -28,11 +28,14 @@ #import #import +#import #import #import #import +#import + #import "UIxCalMainView.h" #import @@ -42,6 +45,27 @@ static NSMutableArray *yearMenuItems = nil; @implementation UIxCalMainView +- (void) _setupContext +{ + SOGoUser *activeUser; + NSString *module; + SOGoAppointmentFolders *clientObject; + + activeUser = [context activeUser]; + clientObject = [self clientObject]; + + module = [clientObject nameInContainer]; + + ud = [activeUser userSettings]; + moduleSettings = [ud objectForKey: module]; + if (!moduleSettings) + { + moduleSettings = [NSMutableDictionary new]; + [moduleSettings autorelease]; + } + [ud setObject: moduleSettings forKey: module]; +} + - (NSArray *) monthMenuItems { unsigned int count; @@ -100,4 +124,44 @@ static NSMutableArray *yearMenuItems = nil; return yearMenuItem; } +- (WOResponse *) getDragHandlesStateAction +{ + NSArray *dragHandles; + NSString *vertical, *horizontal; + + [self _setupContext]; + + vertical = [moduleSettings objectForKey: @"DragHandleVertical"]; + horizontal = [moduleSettings objectForKey: @"DragHandleHorizontal"]; + dragHandles = [[NSArray alloc] initWithObjects: + vertical != nil ? vertical : @"", + horizontal ? horizontal : @"", + nil]; + + return [self responseWithStatus: 200 + andString: [dragHandles jsonRepresentation]]; +} + +- (WOResponse *) saveDragHandleStateAction +{ + WORequest *request; + NSString *dragHandle; + + [self _setupContext]; + request = [context request]; + + if ((dragHandle = [request formValueForKey: @"vertical"]) != nil) + [moduleSettings setObject: dragHandle + forKey: @"DragHandleVertical"]; + else if ((dragHandle = [request formValueForKey: @"horizontal"]) != nil) + [moduleSettings setObject: dragHandle + forKey: @"DragHandleHorizontal"]; + else + return [self responseWithStatus: 400]; + + [ud synchronize]; + + return [self responseWithStatus: 204]; +} + @end diff --git a/UI/Scheduler/product.plist b/UI/Scheduler/product.plist index 5b1c5248..18a20e1a 100644 --- a/UI/Scheduler/product.plist +++ b/UI/Scheduler/product.plist @@ -40,6 +40,16 @@ protectedBy = "View"; pageName = "UIxCalMainView"; }; + dragHandlesState = { + protectedBy = ""; + pageName = "UIxCalMainView"; + actionName = "getDragHandlesState"; + }; + saveDragHandleState = { + protectedBy = "View"; + pageName = "UIxCalMainView"; + actionName = "saveDragHandleState"; + }; dateselector = { protectedBy = "View"; pageName = "UIxCalDateSelector"; diff --git a/UI/WebServerResources/ContactsUI.js b/UI/WebServerResources/ContactsUI.js index 03eae4a4..87c12eae 100644 --- a/UI/WebServerResources/ContactsUI.js +++ b/UI/WebServerResources/ContactsUI.js @@ -763,8 +763,29 @@ function folderRenameCallback(http) { } } -function saveDragHandlesState() { - // Call from SOGoDragHandles.js +function getDragHandlesState() { + var urlstr = ApplicationBaseURL + "dragHandlesState"; + triggerAjaxRequest(urlstr, getDragHandlesStateCallback); +} + +function getDragHandlesStateCallback(http) { + if (http.status == 200) { + if (http.responseText.length > 0) { + // The response text is a JSON array + // of the top and right offsets. + var data = http.responseText.evalJSON(true); + if (data[0].length > 0) { + $("contactsListContent").setStyle({ height: data[0] }); + $("contactView").setStyle({ top: data[0] }); + $("rightDragHandle").setStyle({ top: data[0] }); + } + if (data[1].length > 0) { + $("contactFoldersList").setStyle({ width: data[1] }); + $("rightPanel").setStyle({ left: data[1] }); + $("dragHandle").setStyle({ left: data[1] }); + } + } + } } function onMenuSharing(event) { @@ -836,6 +857,7 @@ function configureSelectionButtons() { function initContacts(event) { if (!document.body.hasClassName("popup")) { configureAbToolbar(); + getDragHandlesState(); } else configureSelectionButtons(); diff --git a/UI/WebServerResources/MailerUI.js b/UI/WebServerResources/MailerUI.js index 83e7a0ff..fb055ebc 100644 --- a/UI/WebServerResources/MailerUI.js +++ b/UI/WebServerResources/MailerUI.js @@ -1496,15 +1496,18 @@ function getDragHandlesStateCallback(http) { if (http.status == 200) { if (http.responseText.length > 0) { // The response text is a JSON array - // of the right and top offsets. + // of the top and right offsets. var data = http.responseText.evalJSON(true); - - $("leftPanel").setStyle({ width: data[0] }); - $("rightPanel").setStyle({ left: data[0] }); - $("verticalDragHandle").setStyle({ left: data[0] }); - $("mailboxContent").setStyle({ height: data[1] }); - $("messageContent").setStyle({ top: data[1] }); - $("rightDragHandle").setStyle({ top: data[1] }); + if (data[0].length > 0) { + $("mailboxContent").setStyle({ height: data[0] }); + $("messageContent").setStyle({ top: data[0] }); + $("rightDragHandle").setStyle({ top: data[0] }); + } + if (data[1].length > 0) { + $("leftPanel").setStyle({ width: data[1] }); + $("rightPanel").setStyle({ left: data[1] }); + $("verticalDragHandle").setStyle({ left: data[1] }); + } } } } @@ -1532,26 +1535,6 @@ function getFoldersStateCallback(http) { } } -function saveDragHandlesState() { - // Call from SOGoDragHandles.js - var leftBlock = $("leftPanel"); - var upperBlock = $("mailboxContent"); - - if (leftBlock && upperBlock) { - var dragHandlesState = new Array(leftBlock.getStyle("width"), - upperBlock.getStyle("height")); - var urlstr = ApplicationBaseURL + "saveDragHandlesState" + "?dragHandles=" + dragHandlesState.toJSON(); - triggerAjaxRequest(urlstr, saveDragHandlesStateCallback); - } -} - -function saveDragHandlesStateCallback(http) { - if (http.readyState == 4 - && isHttpStatus204(http.status)) { - log ("drag handles state saved"); - } -} - function saveFoldersState() { if (mailAccounts.length > 0) { var foldersState = mailboxTree.getFoldersState(); diff --git a/UI/WebServerResources/SOGoDragHandles.js b/UI/WebServerResources/SOGoDragHandles.js index b81b281d..54ac371b 100644 --- a/UI/WebServerResources/SOGoDragHandles.js +++ b/UI/WebServerResources/SOGoDragHandles.js @@ -70,7 +70,9 @@ var SOGoDragHandlesInterface = { this.rightBlock.setStyle({ left: (this.origRight + deltaX) + 'px' }); this.leftBlock.setStyle({ width: (this.origLeft + deltaX) + 'px' }); } - } else if (this.dhType == 'vertical') { + this.saveDragHandleState(this.dhType, this.leftBlock.getStyle("width")); + } + else if (this.dhType == 'vertical') { var pointerY = Event.pointerY(event); if (pointerY <= this.topMargin) { this.lowerBlock.setStyle({ top: (this.topMargin - delta) + 'px' }); @@ -81,6 +83,7 @@ var SOGoDragHandlesInterface = { this.lowerBlock.setStyle({ top: (this.origLower + deltaY - delta) + 'px' }); this.upperBlock.setStyle({ height: (this.origUpper + deltaY - delta) + 'px' }); } + this.saveDragHandleState(this.dhType, this.upperBlock.getStyle("height")); } Event.stopObserving(document.body, "mouseup", this.stopHandleDraggingBound, true); Event.stopObserving(document.body, "mousemove", this.moveBound, true); @@ -88,8 +91,6 @@ var SOGoDragHandlesInterface = { document.body.setAttribute('style', ''); Event.stop(event); - - saveDragHandlesState(); }, move: function (event) { if (!this.dhType) @@ -135,6 +136,19 @@ var SOGoDragHandlesInterface = { this.lowerBlock.setStyle({ top: (uTop + topdelta) + 'px' }); } } + }, + saveDragHandleState: function (type, position) { + var urlstr = ApplicationBaseURL + "saveDragHandleState" + + "?" + type + "=" + position; + triggerAjaxRequest(urlstr, this.saveDragHandleStateCallback); + }, + + saveDragHandleStateCallback: function (http) { + if (isHttpStatus204(http.status)) { + log ("drag handle state saved"); + } + else if (http.readyState == 4) { + log ("can't save handle state"); + } } - }; diff --git a/UI/WebServerResources/SchedulerUI.js b/UI/WebServerResources/SchedulerUI.js index 510d0cb6..d9ab3489 100644 --- a/UI/WebServerResources/SchedulerUI.js +++ b/UI/WebServerResources/SchedulerUI.js @@ -1722,8 +1722,29 @@ function deletePersonalCalendarCallback(http) { log ("ajax problem 5: " + http.status); } -function saveDragHandlesState() { - // Call from SOGoDragHandles.js +function getDragHandlesState() { + var urlstr = ApplicationBaseURL + "dragHandlesState"; + triggerAjaxRequest(urlstr, getDragHandlesStateCallback); +} + +function getDragHandlesStateCallback(http) { + if (http.status == 200) { + if (http.responseText.length > 0) { + // The response text is a JSON array + // of the top and right offsets. + var data = http.responseText.evalJSON(true); + if (data[0].length > 0) { + $("eventsListView").setStyle({ height: data[0] }); + $("calendarView").setStyle({ top: data[0] }); + $("rightDragHandle").setStyle({ top: data[0] }); + } + if (data[1].length > 0) { + $("leftPanel").setStyle({ width: data[1] }); + $("rightPanel").setStyle({ left: data[1] }); + $("verticalDragHandle").setStyle({ left: data[1] }); + } + } + } } function configureLists() { @@ -1765,6 +1786,7 @@ function initCalendars() { sorting["ascending"] = true; if (!document.body.hasClassName("popup")) { + getDragHandlesState(); initDateSelectorEvents(); initCalendarSelector(); configureSearchField(); diff --git a/UI/WebServerResources/UIxMailEditor.js b/UI/WebServerResources/UIxMailEditor.js index fbcf30a1..53d1fd81 100644 --- a/UI/WebServerResources/UIxMailEditor.js +++ b/UI/WebServerResources/UIxMailEditor.js @@ -278,9 +278,10 @@ function onTextContextMenu(event) { } function onTextMouseDown(event) { - log("coucou 1"); - event.returnValue = false; - event.cancelBubble = false; + if (event.button == 0) { + event.returnValue = false; + event.cancelBubble = false; + } } function initMailEditor() { @@ -307,8 +308,8 @@ function initMailEditor() { textarea.scrollTop = textarea.scrollHeight; textarea.observe("focus", onTextFirstFocus); textarea.observe("focus", onTextFocus); - textarea.observe("contextmenu", onTextContextMenu); - textarea.observe("mousedown", onTextMouseDown); +// textarea.observe("contextmenu", onTextContextMenu); + textarea.observe("mousedown", onTextMouseDown, true); onWindowResize(null); Event.observe(window, "resize", onWindowResize); -- 2.39.5