From 68f86216d25bb58dd3db505c7238d729d335b2b4 Mon Sep 17 00:00:00 2001 From: wolfgang Date: Thu, 27 Mar 2008 16:11:31 +0000 Subject: [PATCH] git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1392 d1b88da0-ebda-0310-925b-ed51d893ca5b --- ChangeLog | 6 + ...et-r1618.diff => sope-patchset-r1619.diff} | 475 ++++++++---------- UI/Scheduler/UIxComponentEditor.m | 37 +- .../SchedulerUI/UIxRecurrenceEditor.wox | 76 +-- UI/WebServerResources/UIxRecurrenceEditor.js | 21 +- UI/WebServerResources/generic.js | 5 +- 6 files changed, 292 insertions(+), 328 deletions(-) rename SOPE/{sope-patchset-r1618.diff => sope-patchset-r1619.diff} (96%) diff --git a/ChangeLog b/ChangeLog index 87b2d996..5d07f8d5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-03-27 Wolfgang Sourdeau + + * UI/Scheduler/UIxComponentEditor.m ([UIxComponentEditor + -setComponent:newComponent]): the weeks start on sunday in + OpenStep and are indexed from 0. + 2008-03-25 Wolfgang Sourdeau * UI/Scheduler/UIxComponentEditor.m ([UIxComponentEditor diff --git a/SOPE/sope-patchset-r1618.diff b/SOPE/sope-patchset-r1619.diff similarity index 96% rename from SOPE/sope-patchset-r1618.diff rename to SOPE/sope-patchset-r1619.diff index 38306917..85da01a1 100644 --- a/SOPE/sope-patchset-r1618.diff +++ b/SOPE/sope-patchset-r1619.diff @@ -1,6 +1,184 @@ +Index: sope-gdl1/PostgreSQL/PostgreSQL72Channel.m +=================================================================== +--- sope-gdl1/PostgreSQL/PostgreSQL72Channel.m (révision 1619) ++++ 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 1619) ++++ 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-gdl1/Oracle8/OracleAdaptorChannelController.m +=================================================================== +--- sope-gdl1/Oracle8/OracleAdaptorChannelController.m (révision 1619) ++++ sope-gdl1/Oracle8/OracleAdaptorChannelController.m (copie de travail) +@@ -31,6 +31,8 @@ + #import + #import + ++static BOOL debugOn = NO; ++ + // + // + // +@@ -48,6 +50,14 @@ + // + @implementation OracleAdaptorChannelController + +++ (void) initialize ++{ ++ NSUserDefaults *ud; ++ ++ ud = [NSUserDefaults standardUserDefaults]; ++ debugOn = [ud boolForKey: @"OracleAdaptorDebug"]; ++} ++ + - (EODelegateResponse) adaptorChannel: (id) theChannel + willInsertRow: (NSMutableDictionary *) theRow + forEntity: (EOEntity *) theEntity +@@ -56,7 +66,8 @@ + NSArray *keys; + int i, c; + +- NSLog(@"willInsertRow: %@ %@", [theRow description], [theEntity description]); ++ if (debugOn) ++ NSLog(@"willInsertRow: %@ %@", [theRow description], [theEntity description]); + + s = AUTORELEASE([[NSMutableString alloc] init]); + +@@ -101,7 +112,8 @@ + NSArray *keys; + int i, c; + +- NSLog(@"willUpdatetRow: %@ %@", [theRow description], [theQualifier description]); ++ if (debugOn) ++ NSLog(@"willUpdateRow: %@ %@", [theRow description], [theQualifier description]); + + s = AUTORELEASE([[NSMutableString alloc] init]); + Index: sope-mime/NGImap4/NGImap4Connection.m =================================================================== ---- sope-mime/NGImap4/NGImap4Connection.m (révision 1618) +--- sope-mime/NGImap4/NGImap4Connection.m (révision 1619) +++ sope-mime/NGImap4/NGImap4Connection.m (copie de travail) @@ -381,7 +381,7 @@ @@ -13,7 +191,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 1618) +--- sope-mime/NGImap4/NGImap4ResponseNormalizer.m (révision 1619) +++ sope-mime/NGImap4/NGImap4ResponseNormalizer.m (copie de travail) @@ -648,14 +648,13 @@ enumerator = [_flags objectEnumerator]; @@ -39,7 +217,7 @@ Index: sope-mime/NGImap4/NGImap4ResponseNormalizer.m if (objs) free(objs); Index: sope-mime/NGImap4/NGImap4ResponseParser.m =================================================================== ---- sope-mime/NGImap4/NGImap4ResponseParser.m (révision 1618) +--- sope-mime/NGImap4/NGImap4ResponseParser.m (révision 1619) +++ sope-mime/NGImap4/NGImap4ResponseParser.m (copie de travail) @@ -84,6 +84,8 @@ static NSDictionary *_parseMultipartBody(NGImap4ResponseParser *self, @@ -264,7 +442,7 @@ Index: sope-mime/NGImap4/NGImap4ResponseParser.m { Index: sope-mime/NGMail/NGSmtpClient.m =================================================================== ---- sope-mime/NGMail/NGSmtpClient.m (révision 1618) +--- sope-mime/NGMail/NGSmtpClient.m (révision 1619) +++ sope-mime/NGMail/NGSmtpClient.m (copie de travail) @@ -24,6 +24,82 @@ #include "NGSmtpReplyCodes.h" @@ -420,7 +598,7 @@ Index: sope-mime/NGMail/NGSmtpClient.m reply = [self receiveReply]; Index: sope-mime/NGMail/NGMimeMessageGenerator.m =================================================================== ---- sope-mime/NGMail/NGMimeMessageGenerator.m (révision 1618) +--- sope-mime/NGMail/NGMimeMessageGenerator.m (révision 1619) +++ sope-mime/NGMail/NGMimeMessageGenerator.m (copie de travail) @@ -86,37 +86,40 @@ char *des = NULL; @@ -486,7 +664,7 @@ Index: sope-mime/NGMail/NGMimeMessageGenerator.m unsigned isoEndLen = 2; Index: sope-mime/NGMime/NGMimeRFC822DateHeaderFieldParser.m =================================================================== ---- sope-mime/NGMime/NGMimeRFC822DateHeaderFieldParser.m (révision 1618) +--- sope-mime/NGMime/NGMimeRFC822DateHeaderFieldParser.m (révision 1619) +++ sope-mime/NGMime/NGMimeRFC822DateHeaderFieldParser.m (copie de travail) @@ -19,88 +19,45 @@ 02111-1307, USA. @@ -881,7 +1059,7 @@ Index: sope-mime/NGMime/NGMimeRFC822DateHeaderFieldParser.m #if 0 Index: sope-mime/NGMime/NGMimeHeaderFieldGeneratorSet.m =================================================================== ---- sope-mime/NGMime/NGMimeHeaderFieldGeneratorSet.m (révision 1618) +--- sope-mime/NGMime/NGMimeHeaderFieldGeneratorSet.m (révision 1619) +++ sope-mime/NGMime/NGMimeHeaderFieldGeneratorSet.m (copie de travail) @@ -77,6 +77,7 @@ [rfc822Set setGenerator:gen forField:@"bcc"]; @@ -893,7 +1071,7 @@ Index: sope-mime/NGMime/NGMimeHeaderFieldGeneratorSet.m Index: sope-mime/NGMime/NGMimeBodyPart.m =================================================================== ---- sope-mime/NGMime/NGMimeBodyPart.m (révision 1618) +--- sope-mime/NGMime/NGMimeBodyPart.m (révision 1619) +++ sope-mime/NGMime/NGMimeBodyPart.m (copie de travail) @@ -31,18 +31,6 @@ return 2; @@ -931,7 +1109,7 @@ Index: sope-mime/NGMime/NGMimeBodyPart.m - (NSString *)contentId { Index: sope-mime/NGMime/GNUmakefile.preamble =================================================================== ---- sope-mime/NGMime/GNUmakefile.preamble (révision 1618) +--- sope-mime/NGMime/GNUmakefile.preamble (révision 1619) +++ sope-mime/NGMime/GNUmakefile.preamble (copie de travail) @@ -5,6 +5,11 @@ -DLIBRARY_MINOR_VERSION=${MINOR_VERSION} \ @@ -947,7 +1125,7 @@ Index: sope-mime/NGMime/GNUmakefile.preamble -I../../sope-core/NGStreams/ \ Index: sope-mime/NGMime/NGMimeBodyParser.m =================================================================== ---- sope-mime/NGMime/NGMimeBodyParser.m (révision 1618) +--- sope-mime/NGMime/NGMimeBodyParser.m (révision 1619) +++ sope-mime/NGMime/NGMimeBodyParser.m (copie de travail) @@ -67,7 +67,10 @@ if (_data == nil) return nil; @@ -963,7 +1141,7 @@ Index: sope-mime/NGMime/NGMimeBodyParser.m Index: sope-mime/NGMime/NGMimePartParser.h =================================================================== ---- sope-mime/NGMime/NGMimePartParser.h (révision 1618) +--- sope-mime/NGMime/NGMimePartParser.h (révision 1619) +++ sope-mime/NGMime/NGMimePartParser.h (copie de travail) @@ -117,6 +117,7 @@ BOOL parserParseRawBodyDataOfPart:1; @@ -985,7 +1163,7 @@ Index: sope-mime/NGMime/NGMimePartParser.h @interface NSObject(NGMimePartParser) Index: sope-mime/NGMime/NGMimePartParser.m =================================================================== ---- sope-mime/NGMime/NGMimePartParser.m (révision 1618) +--- sope-mime/NGMime/NGMimePartParser.m (révision 1619) +++ sope-mime/NGMime/NGMimePartParser.m (copie de travail) @@ -227,7 +227,7 @@ } @@ -1010,7 +1188,7 @@ Index: sope-mime/NGMime/NGMimePartParser.m : [NGMimeType mimeType:[ctype stringValue]]; Index: sope-mime/NGMime/NGMimeAddressHeaderFieldGenerator.m =================================================================== ---- sope-mime/NGMime/NGMimeAddressHeaderFieldGenerator.m (révision 1618) +--- sope-mime/NGMime/NGMimeAddressHeaderFieldGenerator.m (révision 1619) +++ sope-mime/NGMime/NGMimeAddressHeaderFieldGenerator.m (copie de travail) @@ -130,8 +130,13 @@ @@ -1041,7 +1219,7 @@ Index: sope-mime/NGMime/NGMimeAddressHeaderFieldGenerator.m bufLen = [data length]; Index: sope-mime/NGMime/NGMimeContentDispositionHeaderFieldGenerator.m =================================================================== ---- sope-mime/NGMime/NGMimeContentDispositionHeaderFieldGenerator.m (révision 1618) +--- sope-mime/NGMime/NGMimeContentDispositionHeaderFieldGenerator.m (révision 1619) +++ sope-mime/NGMime/NGMimeContentDispositionHeaderFieldGenerator.m (copie de travail) @@ -49,80 +49,70 @@ @@ -1175,187 +1353,9 @@ Index: sope-mime/NGMime/NGMimeContentDispositionHeaderFieldGenerator.m } return data; } -Index: sope-gdl1/PostgreSQL/PostgreSQL72Channel.m -=================================================================== ---- sope-gdl1/PostgreSQL/PostgreSQL72Channel.m (révision 1618) -+++ 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 1618) -+++ 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-gdl1/Oracle8/OracleAdaptorChannelController.m -=================================================================== ---- sope-gdl1/Oracle8/OracleAdaptorChannelController.m (révision 1618) -+++ sope-gdl1/Oracle8/OracleAdaptorChannelController.m (copie de travail) -@@ -31,6 +31,8 @@ - #import - #import - -+static BOOL debugOn = NO; -+ - // - // - // -@@ -48,6 +50,14 @@ - // - @implementation OracleAdaptorChannelController - -++ (void) initialize -+{ -+ NSUserDefaults *ud; -+ -+ ud = [NSUserDefaults standardUserDefaults]; -+ debugOn = [ud boolForKey: @"OracleAdaptorDebug"]; -+} -+ - - (EODelegateResponse) adaptorChannel: (id) theChannel - willInsertRow: (NSMutableDictionary *) theRow - forEntity: (EOEntity *) theEntity -@@ -56,7 +66,8 @@ - NSArray *keys; - int i, c; - -- NSLog(@"willInsertRow: %@ %@", [theRow description], [theEntity description]); -+ if (debugOn) -+ NSLog(@"willInsertRow: %@ %@", [theRow description], [theEntity description]); - - s = AUTORELEASE([[NSMutableString alloc] init]); - -@@ -101,7 +112,8 @@ - NSArray *keys; - int i, c; - -- NSLog(@"willUpdatetRow: %@ %@", [theRow description], [theQualifier description]); -+ if (debugOn) -+ NSLog(@"willUpdateRow: %@ %@", [theRow description], [theQualifier description]); - - s = AUTORELEASE([[NSMutableString alloc] init]); - Index: sope-core/NGExtensions/FdExt.subproj/NSString+Encoding.m =================================================================== ---- sope-core/NGExtensions/FdExt.subproj/NSString+Encoding.m (révision 1618) +--- sope-core/NGExtensions/FdExt.subproj/NSString+Encoding.m (révision 1619) +++ sope-core/NGExtensions/FdExt.subproj/NSString+Encoding.m (copie de travail) @@ -140,8 +140,12 @@ @@ -1398,7 +1398,7 @@ Index: sope-core/NGExtensions/FdExt.subproj/NSString+Encoding.m static char *iconv_wrapper(id self, char *_src, unsigned _srcLen, Index: sope-core/NGExtensions/EOExt.subproj/EOGlobalID+Ext.m =================================================================== ---- sope-core/NGExtensions/EOExt.subproj/EOGlobalID+Ext.m (révision 1618) +--- sope-core/NGExtensions/EOExt.subproj/EOGlobalID+Ext.m (révision 1619) +++ sope-core/NGExtensions/EOExt.subproj/EOGlobalID+Ext.m (copie de travail) @@ -19,6 +19,7 @@ 02111-1307, USA. @@ -1410,7 +1410,7 @@ Index: sope-core/NGExtensions/EOExt.subproj/EOGlobalID+Ext.m Index: sope-xml/libxmlSAXDriver/libxmlHTMLSAXDriver.h =================================================================== ---- sope-xml/libxmlSAXDriver/libxmlHTMLSAXDriver.h (révision 1618) +--- sope-xml/libxmlSAXDriver/libxmlHTMLSAXDriver.h (révision 1619) +++ sope-xml/libxmlSAXDriver/libxmlHTMLSAXDriver.h (copie de travail) @@ -19,6 +19,8 @@ 02111-1307, USA. @@ -1432,7 +1432,7 @@ Index: sope-xml/libxmlSAXDriver/libxmlHTMLSAXDriver.h id entityResolver; Index: sope-xml/libxmlSAXDriver/libxmlHTMLSAXDriver.m =================================================================== ---- sope-xml/libxmlSAXDriver/libxmlHTMLSAXDriver.m (révision 1618) +--- sope-xml/libxmlSAXDriver/libxmlHTMLSAXDriver.m (révision 1619) +++ sope-xml/libxmlSAXDriver/libxmlHTMLSAXDriver.m (copie de travail) @@ -30,6 +30,12 @@ #include @@ -1492,7 +1492,7 @@ Index: sope-xml/libxmlSAXDriver/libxmlHTMLSAXDriver.m - (void)tearDownParser { Index: sope-appserver/mod_ngobjweb/config.c =================================================================== ---- sope-appserver/mod_ngobjweb/config.c (révision 1618) +--- sope-appserver/mod_ngobjweb/config.c (révision 1619) +++ sope-appserver/mod_ngobjweb/config.c (copie de travail) @@ -21,7 +21,7 @@ @@ -1505,7 +1505,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 1618) +--- sope-appserver/mod_ngobjweb/NGBufferedDescriptor.c (révision 1619) +++ sope-appserver/mod_ngobjweb/NGBufferedDescriptor.c (copie de travail) @@ -23,6 +23,7 @@ #include @@ -1517,9 +1517,9 @@ 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 1618) +--- sope-appserver/mod_ngobjweb/GNUmakefile (révision 1619) +++ sope-appserver/mod_ngobjweb/GNUmakefile (copie de travail) -@@ -81,7 +81,7 @@ +@@ -82,7 +82,7 @@ CFLAGS = -Wall -I. -fPIC \ $(APXS_CFLAGS) $(APR_CFLAGS) \ @@ -1527,31 +1527,12 @@ Index: sope-appserver/mod_ngobjweb/GNUmakefile + $(APXS_INCLUDE_DIRS) $(APR_INCLUDE_DIRS) -O0 -ggdb LDFLAGS = $(APXS_LDFLAGS) $(APR_LDFLAGS) -shared -fPIC - + LDLIBS = $(APXS_LIBS) $(APR_LIBS) Index: sope-appserver/mod_ngobjweb/handler.c =================================================================== ---- sope-appserver/mod_ngobjweb/handler.c (révision 1618) +--- sope-appserver/mod_ngobjweb/handler.c (révision 1619) +++ sope-appserver/mod_ngobjweb/handler.c (copie de travail) -@@ -267,7 +267,7 @@ - const char *uri; - unsigned requestContentLength; - void *requestBody; -- -+ - uri = r->uri; - requestContentLength = 0; - requestBody = NULL; -@@ -404,6 +404,9 @@ - "could not create socket in domain %i.", domain); - return DECLINED; - } -+/* else */ -+/* ap_log_error(__FILE__, __LINE__, APLOG_ERR, 0, r->server, */ -+/* "appFd socket created in domain %i: %d", domain, appFd); */ - - if ((result = _connectInstance(r, appFd, address, addressLen)) < 0) - return 500; -@@ -646,7 +649,10 @@ +@@ -646,7 +646,10 @@ writeErrorHandler: if (writeError == 1) { @@ -1563,7 +1544,7 @@ Index: sope-appserver/mod_ngobjweb/handler.c ap_log_error(__FILE__, __LINE__, APLOG_ERR, 0, r->server, "socket write error during transfer of HTTP header section"); -@@ -659,7 +665,10 @@ +@@ -659,7 +662,10 @@ if (!NGBufferedDescriptor_safeWrite(toApp, requestBody, requestContentLength)) { @@ -1575,7 +1556,7 @@ Index: sope-appserver/mod_ngobjweb/handler.c ap_log_error(__FILE__, __LINE__, APLOG_ERR, 0, r->server, "couldn't transfer HTTP req body to app server (%i bytes)", contentLength); -@@ -677,7 +686,10 @@ +@@ -677,7 +683,10 @@ /* read response line */ if (!NGScanResponseLine(toApp, NULL, &statusCode, NULL)) { @@ -1587,25 +1568,22 @@ Index: sope-appserver/mod_ngobjweb/handler.c ap_log_error(__FILE__, __LINE__, APLOG_ERR, 0, r->server, "error during reading of response line .."); return 500; -@@ -716,16 +728,8 @@ +@@ -716,13 +725,8 @@ } // read whole response - if (!NGBufferedDescriptor_safeRead(toApp, buffer, contentLength)) { -- if (toApp) NGBufferedDescriptor_free(toApp); +- if (toApp != NULL) { NGBufferedDescriptor_free(toApp); toApp = NULL; } - } + NGBufferedDescriptor_safeRead(toApp, buffer, contentLength); - // close connection to app -- if (toApp) { -- NGBufferedDescriptor_free(toApp); -- toApp = NULL; -- } -- +- if (toApp != NULL) { NGBufferedDescriptor_free(toApp); toApp = NULL; } +- ap_log_error(__FILE__, __LINE__, APLOG_INFO, 0, r->server, "send response (size=%i)", contentLength); -@@ -739,15 +743,14 @@ +@@ -736,15 +740,14 @@ int result = 0; int writeCount = 0; @@ -1628,7 +1606,7 @@ Index: sope-appserver/mod_ngobjweb/handler.c if (HEAVY_LOG && (writeCount > 0)) { ap_log_error(__FILE__, __LINE__, APLOG_INFO, 0, r->server, -@@ -756,10 +759,26 @@ +@@ -753,7 +756,13 @@ } } } @@ -1643,22 +1621,9 @@ Index: sope-appserver/mod_ngobjweb/handler.c return OK; } -+/* int ngobjweb_handler(request_rec *r) { */ -+/* int code; */ -+ -+/* fprintf (stderr, "ngobjweb_handler...\n======================"); */ -+/* code = real_ngobjweb_handler(r); */ -+/* fprintf (stderr, "================ %d\n", code); */ -+ -+/* return code; */ -+/* } */ -+ - #if WITH_LOGGING - #if 0 - static void test(void) { Index: sope-appserver/NGObjWeb/GNUmakefile.postamble =================================================================== ---- sope-appserver/NGObjWeb/GNUmakefile.postamble (révision 1618) +--- sope-appserver/NGObjWeb/GNUmakefile.postamble (révision 1619) +++ sope-appserver/NGObjWeb/GNUmakefile.postamble (copie de travail) @@ -23,14 +23,20 @@ @@ -1690,7 +1655,7 @@ Index: sope-appserver/NGObjWeb/GNUmakefile.postamble + $(DESTDIR)/$(GNUSTEP_MAKEFILES)/wobundle.make Index: sope-appserver/NGObjWeb/WOContext.m =================================================================== ---- sope-appserver/NGObjWeb/WOContext.m (révision 1618) +--- sope-appserver/NGObjWeb/WOContext.m (révision 1619) +++ sope-appserver/NGObjWeb/WOContext.m (copie de travail) @@ -64,11 +64,13 @@ static BOOL testNSURLs = NO; @@ -1730,7 +1695,7 @@ Index: sope-appserver/NGObjWeb/WOContext.m serverURL = [@"http://" stringByAppendingString:host]; Index: sope-appserver/NGObjWeb/DAVPropMap.plist =================================================================== ---- sope-appserver/NGObjWeb/DAVPropMap.plist (révision 1618) +--- sope-appserver/NGObjWeb/DAVPropMap.plist (révision 1619) +++ sope-appserver/NGObjWeb/DAVPropMap.plist (copie de travail) @@ -120,17 +120,21 @@ "{http://ucb.openoffice.org/dav/props/}IsRemoveable" = isOOoRemoveable; @@ -1758,7 +1723,7 @@ Index: sope-appserver/NGObjWeb/DAVPropMap.plist "{urn:ietf:params:xml:ns:carddav}supported-address-data" = Index: sope-appserver/NGObjWeb/WebDAV/SaxDAVHandler.m =================================================================== ---- sope-appserver/NGObjWeb/WebDAV/SaxDAVHandler.m (révision 1618) +--- sope-appserver/NGObjWeb/WebDAV/SaxDAVHandler.m (révision 1619) +++ sope-appserver/NGObjWeb/WebDAV/SaxDAVHandler.m (copie de travail) @@ -655,6 +655,7 @@ if (self->responses == nil) @@ -1770,7 +1735,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 1618) +--- sope-appserver/NGObjWeb/DynamicElements/WOHyperlinkInfo.m (révision 1619) +++ sope-appserver/NGObjWeb/DynamicElements/WOHyperlinkInfo.m (copie de travail) @@ -216,6 +216,12 @@ assocCount++; @@ -1787,7 +1752,7 @@ Index: sope-appserver/NGObjWeb/DynamicElements/WOHyperlinkInfo.m Index: sope-appserver/NGObjWeb/DynamicElements/_WOComplexHyperlink.m =================================================================== ---- sope-appserver/NGObjWeb/DynamicElements/_WOComplexHyperlink.m (révision 1618) +--- sope-appserver/NGObjWeb/DynamicElements/_WOComplexHyperlink.m (révision 1619) +++ sope-appserver/NGObjWeb/DynamicElements/_WOComplexHyperlink.m (copie de travail) @@ -41,6 +41,7 @@ WOAssociation *string; @@ -1820,7 +1785,7 @@ Index: sope-appserver/NGObjWeb/DynamicElements/_WOComplexHyperlink.m return NO; Index: sope-appserver/NGObjWeb/DynamicElements/WOHyperlinkInfo.h =================================================================== ---- sope-appserver/NGObjWeb/DynamicElements/WOHyperlinkInfo.h (révision 1618) +--- sope-appserver/NGObjWeb/DynamicElements/WOHyperlinkInfo.h (révision 1619) +++ sope-appserver/NGObjWeb/DynamicElements/WOHyperlinkInfo.h (copie de travail) @@ -41,7 +41,8 @@ WOAssociation *pageName; @@ -1834,7 +1799,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 1618) +--- sope-appserver/NGObjWeb/SoObjects/SoObject.m (révision 1619) +++ sope-appserver/NGObjWeb/SoObjects/SoObject.m (copie de travail) @@ -39,22 +39,34 @@ static int debugLookup = -1; @@ -1985,7 +1950,7 @@ Index: sope-appserver/NGObjWeb/SoObjects/SoObject.m Index: sope-appserver/NGObjWeb/WOHttpAdaptor/WOHttpTransaction.m =================================================================== ---- sope-appserver/NGObjWeb/WOHttpAdaptor/WOHttpTransaction.m (révision 1618) +--- sope-appserver/NGObjWeb/WOHttpAdaptor/WOHttpTransaction.m (révision 1619) +++ sope-appserver/NGObjWeb/WOHttpAdaptor/WOHttpTransaction.m (copie de travail) @@ -32,6 +32,7 @@ #include diff --git a/UI/Scheduler/UIxComponentEditor.m b/UI/Scheduler/UIxComponentEditor.m index 91d40d0f..27ad5be2 100644 --- a/UI/Scheduler/UIxComponentEditor.m +++ b/UI/Scheduler/UIxComponentEditor.m @@ -218,24 +218,19 @@ iRANGE(2); - (NSString *) _dayMaskToInteger: (unsigned int) theMask { - NSMutableString *s; + iCalWeekDay maskDays[] = {iCalWeekDaySunday, iCalWeekDayMonday, + iCalWeekDayTuesday, iCalWeekDayWednesday, + iCalWeekDayThursday, iCalWeekDayFriday, + iCalWeekDaySaturday}; unsigned int i; + NSMutableString *s; - unsigned char maskDays[] = { iCalWeekDayMonday, iCalWeekDayTuesday, - iCalWeekDayWednesday, iCalWeekDayThursday, - iCalWeekDayFriday, iCalWeekDaySaturday, - iCalWeekDaySunday }; - s = [NSMutableString string]; - - for (i = 0; i < 7; i++) - { - if ((theMask&maskDays[i]) == maskDays[i]) - [s appendFormat: @"%d,", i+1]; - } - if ([s length]) - return [s substringToIndex: [s length]-1]; + for (i = 0; i < 7; i++) + if ((theMask & maskDays[i])) + [s appendFormat: @"%d,", i]; + [s deleteSuffix: @","]; return s; } @@ -262,9 +257,7 @@ iRANGE(2); | iCalWeekDayFriday)) { if ([rule isInfinite]) - { - repeat = @"EVERY WEEKDAY"; - } + repeat = @"EVERY WEEKDAY"; repeat1 = @"1"; } else @@ -272,9 +265,7 @@ iRANGE(2); repeat1 = @"0"; if ([rule repeatInterval] == 1 && [rule isInfinite]) - { - repeat = @"DAILY"; - } + repeat = @"DAILY"; [self setRepeat2: [NSString stringWithFormat: @"%d", [rule repeatInterval]]]; } @@ -351,9 +342,7 @@ iRANGE(2); [self setRange2: [[rule untilDate] descriptionWithCalendarFormat: @"%Y-%m-%d"]]; } else - { - [self setRange1: @"0"]; - } + [self setRange1: @"0"]; } else DESTROY(repeat); @@ -1394,7 +1383,7 @@ RANGE(2); mask = 0; while (c--) - mask |= 1 << ([[v objectAtIndex: c] intValue] - 1); + mask |= 1 << ([[v objectAtIndex: c] intValue]); [theRule setByDayMask: mask]; } diff --git a/UI/Templates/SchedulerUI/UIxRecurrenceEditor.wox b/UI/Templates/SchedulerUI/UIxRecurrenceEditor.wox index a9764a1b..d17d0fc6 100644 --- a/UI/Templates/SchedulerUI/UIxRecurrenceEditor.wox +++ b/UI/Templates/SchedulerUI/UIxRecurrenceEditor.wox @@ -60,13 +60,13 @@
-

-

-

-

-

-

-

+

+

+

+

+

+

+

@@ -103,45 +103,45 @@
-

1

-

2

-

3

-

4

-

5

-

6

-

7

+

1

+

2

+

3

+

4

+

5

+

6

+

7

-

8

-

9

-

10

-

11

-

12

-

13

-

14

+

8

+

9

+

10

+

11

+

12

+

13

+

14

-

15

-

16

-

17

-

18

-

19

-

20

-

21

+

15

+

16

+

17

+

18

+

19

+

20

+

21

-

22

-

23

-

24

-

25

-

26

-

27

-

28

+

22

+

23

+

24

+

25

+

26

+

27

+

28

-

29

-

30

-

31

+

29

+

30

+

31

diff --git a/UI/WebServerResources/UIxRecurrenceEditor.js b/UI/WebServerResources/UIxRecurrenceEditor.js index b513dc12..5443379f 100644 --- a/UI/WebServerResources/UIxRecurrenceEditor.js +++ b/UI/WebServerResources/UIxRecurrenceEditor.js @@ -25,12 +25,16 @@ function setRepeatType(type) { }); } -function getSelectedDays(element) { +function getSelectedDays(periodType) { + var element = $(periodType); var elementsArray = $A(element.getElementsByTagName('DIV')); var days = new Array(); + var dayPrefix = periodType + "Day"; elementsArray.each(function(item) { - if (isNodeSelected(item)) - days.push(item.readAttribute("name")); + if (isNodeSelected(item)) { + var label = "" + item.getAttribute("id"); + days.push(label.substr(dayPrefix.length)); + } }); return days.join(","); } @@ -93,15 +97,13 @@ function initializeFormValues() { else if (repeatType == 1) { // Repeat weekly $('weeklyWeeksField').value = parent$("repeat1").value; - var weekDiv = $($("week").firstChild); // log ("div: " + weekDiv); // log ("days: " + parent$("repeat2").value); var days = "" + parent$("repeat2").value; if (days.length > 0) { var daysArray = days.split(","); - var divs = weekDiv.childNodesWithTag("div"); daysArray.each(function(index) { - divs[index-1].addClassName("_selected"); + $("weekDay"+index).addClassName("_selected"); }); } } @@ -111,12 +113,11 @@ function initializeFormValues() { $('recurrence_form').setRadioValue('monthlyRadioButtonName', parent$("repeat2").value); $('monthlyRepeat').value = parent$("repeat3").value; $('monthlyDay').value = parent$("repeat4").value; - var monthDiv = $("month"); var days = "" + parent$("repeat5").value; if (days.length > 0) { var daysArray = days.split(","); daysArray.each(function(index) { - $(monthDiv).down('DIV[name="'+index+'"]').addClassName("_selected"); + $("monthDay" + index).addClassName("_selected"); }); } } @@ -200,7 +201,7 @@ function handleWeeklyRecurrence() { validate = true; showError = false; parent$("repeat1").value = fieldValue; - parent$("repeat2").value = getSelectedDays($('week')); + parent$("repeat2").value = getSelectedDays("week"); } } @@ -233,7 +234,7 @@ function handleMonthlyRecurrence() { parent$("repeat2").value = radioValue; parent$("repeat3").value = $('monthlyRepeat').value; parent$("repeat4").value = $('monthlyDay').value; - parent$("repeat5").value = getSelectedDays($('month')); + parent$("repeat5").value = getSelectedDays("month"); } } diff --git a/UI/WebServerResources/generic.js b/UI/WebServerResources/generic.js index 832d5cac..c21d7031 100644 --- a/UI/WebServerResources/generic.js +++ b/UI/WebServerResources/generic.js @@ -1373,7 +1373,10 @@ function onLoadHandler(event) { } function onBodyClickContextMenu(event) { - preventDefault(event); + if (!(event.target + && (event.target.tagName == "INPUT" + || event.target.tagName == "TEXTAREA"))) + preventDefault(event); } function configureSortableTableHeaders(table) { -- 2.39.5