+2007-07-20 Wolfgang Sourdeau <wsourdeau@inverse.ca>
+
+ * UI/Contacts/UIxContactsListView.m ([UIxContactsListView
+ -contactInfos]): cache the results to avoid multiple invocations.
+
+ * SoObjects/Contacts/SOGoContactLDAPFolder.m
+ ([SOGoContactLDAPFolder -toOneRelationshipKeys]): check whether we
+ really should return something or if we fake to return nil...
+
2007-07-13 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* SoObjects/SOGo/SOGoUser.m ([SOGoUser +initialize]): set
# version file
MAJOR_VERSION=4
-MINOR_VERSION=5
+MINOR_VERSION=7
SUBMINOR_VERSION:=76
# v4.5.40 requires NGExtensions v4.5.145
-#!/bin/sh
+#!/bin/bash
+#
+# sogod Scalable OpenGroupware.org (Inverse edition)
+#
+# chkconfig: - 85 15
+# description: SOGo is a groupware server
+# processname: sogod-0.9
+# config: /etc/sysconfig/sogo
+# config: /etc/httpd/conf.d/SOGo.conf
+# pidfile: /var/run/sogo/sogod.pid
PATH=/sbin:/bin:/usr/sbin:/usr/bin
+. /etc/rc.d/init.d/functions
+
DAEMON=/usr/sbin/sogod
NAME=sogo
-DESC="Scalable OpenGroupware.Org"
+DESC="Scalable OpenGroupware.Org (Inverse edition)"
PIDFILE=/var/run/sogo/sogod.pid
. /etc/sysconfig/sogo
fi
-. /etc/init.d/functions
-
test -x $DAEMON || exit 0
#set -e
case "$1" in
start)
- echo -n "Starting $DESC: "
- daemon $DAEMON
+ echo -n $"Starting $DESC: " /
+ daemon --user sogo --pidfile $PIDFILE $DAEMON
echo "$NAME."
;;
stop)
- echo -n "Stopping $DESC: "
- killall sogod-0.9 2> /dev/null
+ echo -n $"Stopping $DESC: "
+ killproc --pidfile $PIDFILE $DAEMON
rm -f $PIDFILE
echo "$NAME."
;;
restart|force-reload)
- echo -n "Restarting $DESC: "
- killall sogod-0.9 2> /dev/null
+ echo -n $"Restarting $DESC: "
+ killproc --pidfile $PIDFILE $DAEMON
rm -f $PIDFILE
sleep 1
- daemon $DAEMON
+ daemon --user sogo --pidfile $PIDFILE $DAEMON
echo "$NAME."
;;
+ status)
+ status $DAEMON
+ ;;
*)
N=/etc/init.d/$NAME
- echo "Usage: $N {start|stop|restart|force-reload}" >&2
+ echo "Usage: $N {start|stop|restart|force-reload|status}" >&2
exit 1
;;
esac
PIDFILE=/var/run/sogo/sogod.pid
-. /usr/lib/GNUstep/System/Library/Makefiles/GNUstep.sh
+. /usr/GNUstep/System/Library/Makefiles/GNUstep.sh
echo $$ > $PIDFILE
-exec $GNUSTEP_LOCAL_ROOT/Tools/sogod-0.9 >& /var/log/sogo/sogod.log
-
+exec $GNUSTEP_SYSTEM_ROOT/Tools/sogod-0.9 >& /var/log/sogo/sogod.log
NSString *displayName;
LDAPSource *ldapSource;
NSMutableDictionary *entries;
+ BOOL ignoreSoObjectHunger;
}
- (id <SOGoContactFolder>) initWithName: (NSString *) newName
displayName = nil;
entries = nil;
ldapSource = nil;
+ ignoreSoObjectHunger = NO;
}
return self;
// NSLog (@"looking up name '%@'...", name);
/* first check attributes directly bound to the application */
+ ignoreSoObjectHunger = YES;
obj = [super lookupName: objectName inContext: lookupContext acquire: NO];
+ ignoreSoObjectHunger = NO;
if (!obj)
{
ldifEntry = [ldapSource lookupContactEntry: objectName];
- (NSArray *) toOneRelationshipKeys
{
- return [ldapSource allEntryIDs];
+ NSArray *keys;
+
+ if (ignoreSoObjectHunger)
+ keys = nil;
+ else
+ keys = [ldapSource allEntryIDs];
+
+ return keys;
}
- (NSArray *) lookupContactsWithFilter: (NSString *) filter
{
NSDictionary *currentContact;
NSString *selectorComponentClass;
+ NSArray *contactInfos;
}
@end
#import <Contacts/SOGoContactFolder.h>
#import <Contacts/SOGoContactFolders.h>
-#import "common.h"
-
#import "UIxContactsListView.h"
@implementation UIxContactsListView
if ((self = [super init]))
{
selectorComponentClass = nil;
+ contactInfos = nil;
}
return self;
}
+- (void) dealloc
+{
+ [contactInfos release];
+ [super dealloc];
+}
+
/* accessors */
- (void) setCurrentContact: (NSDictionary *) _contact
NSString *ascending, *searchText, *valueText;
NSComparisonResult ordering;
- folder = [self clientObject];
-
- ascending = [self queryParameterForKey: @"asc"];
- ordering = ((![ascending length] || [ascending boolValue])
- ? NSOrderedAscending : NSOrderedDescending);
-
- searchText = [self queryParameterForKey: @"search"];
- if ([searchText length] > 0)
- valueText = [self queryParameterForKey: @"value"];
- else
- valueText = nil;
+ if (!contactInfos)
+ {
+ folder = [self clientObject];
+
+ ascending = [self queryParameterForKey: @"asc"];
+ ordering = ((![ascending length] || [ascending boolValue])
+ ? NSOrderedAscending : NSOrderedDescending);
+
+ searchText = [self queryParameterForKey: @"search"];
+ if ([searchText length] > 0)
+ valueText = [self queryParameterForKey: @"value"];
+ else
+ valueText = nil;
+
+ ASSIGN (contactInfos,
+ [folder lookupContactsWithFilter: valueText
+ sortBy: [self sortKey]
+ ordering: ordering]);
+ }
- return [folder lookupContactsWithFilter: valueText
- sortBy: [self sortKey]
- ordering: ordering];
+ return contactInfos;
}
/* actions */
<var:component-content />
<hr />
<label id="commentArea"><var:string label:value="Description:"
- /><textarea name="comment" var:value="comment" /></label>
+ /><textarea rows="20" name="comment" var:value="comment" /></label>
<label id="documentLabel" style="display: none;"><var:string label:value="Document:"
/><span class="content"
><a href="#" id="documentHref"><!-- space --></a
}
}
else
- log ("ajax problem 1");
+ log ("ajax problem 1: status = " + http.status);
}
function onContactFoldersContextMenu(event) {
document.deletePersonalABAjaxRequest = null;
}
else
- log ("ajax problem");
+ log ("ajax problem 5: " + http.status);
}
function configureDragHandles() {
LABEL#commentArea
{ height: 15em; }
+LABEL#commentArea textarea
+{ padding: 0;
+ margin: 0;
+ width: 380px;
+ height: 15em; }
+
SPAN.checkBoxList#participantsCB
{ height: 7em; }
initializeDocumentHref();
initializePrivacyMenu();
var list = $("calendarList");
- Event.observe(list, "change",
+ Event.observe(list, "mousedown",
onChangeCalendar.bindAsEventListener(list),
false);
if (document.createEvent) {
- var onSelectionChangeEvent = document.createEvent("Event");
- onSelectionChangeEvent.initEvent("change", false, false);
+ var onSelectionChangeEvent;
+ if (isSafari())
+ onSelectionChangeEvent = document.createEvent("UIEvents");
+ else
+ onSelectionChangeEvent = document.createEvent("Events");
+ onSelectionChangeEvent.initEvent("mousedown", false, false);
list.dispatchEvent(onSelectionChangeEvent);
}
else {
- list.fireEvent("onchange"); // IE
+ list.fireEvent("onmousedown"); // IE
}
var menuItems = $("itemPrivacyList").childNodesWithTag("li");
LABEL#commentArea
{ height: 15em; }
+LABEL#commentArea textarea
+{ padding: 0;
+ margin: 0;
+ width: 380px;
+ height: 15em; }
+
SPAN.checkBoxList#participantsCB
{ height: 7em; }