]> err.no Git - scalable-opengroupware.org/commitdiff
git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1112 d1b88da0-ebda-0310...
authorwolfgang <wolfgang@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Fri, 20 Jul 2007 20:34:34 +0000 (20:34 +0000)
committerwolfgang <wolfgang@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Fri, 20 Jul 2007 20:34:34 +0000 (20:34 +0000)
13 files changed:
ChangeLog
SOPE/NGCards/Version
Scripts/sogo-init.d-redhat
Scripts/sogod-redhat
SoObjects/Contacts/SOGoContactLDAPFolder.h
SoObjects/Contacts/SOGoContactLDAPFolder.m
UI/Contacts/UIxContactsListView.h
UI/Contacts/UIxContactsListView.m
UI/Templates/SchedulerUI/UIxComponentEditor.wox
UI/WebServerResources/ContactsUI.js
UI/WebServerResources/UIxAppointmentEditor.css
UI/WebServerResources/UIxComponentEditor.js
UI/WebServerResources/UIxTaskEditor.css

index cfc4cf35c1df426ac0d47a2b90c7e3b461fe105c..b0c5f04e1e81978db009c0ea2a260cb8d02a9ce9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+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
index dbc6c2d3ca52d71ac25eb9ecd2adf90adaceae53..d025418058366ae6a3b00654120f34289dfa99ff 100644 (file)
@@ -1,7 +1,7 @@
 # version file
 
 MAJOR_VERSION=4
-MINOR_VERSION=5
+MINOR_VERSION=7
 SUBMINOR_VERSION:=76
 
 # v4.5.40 requires NGExtensions v4.5.145
index 3c04063d9ac79c6aa9da742859acb9aa813083d3..ad94d06bf8fcdefd9a983c4fe48cf8fc7c857c05 100755 (executable)
@@ -1,10 +1,21 @@
-#!/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
 
@@ -14,35 +25,36 @@ if [ -f /etc/sysconfig/sogo ]; then
     . /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
index 99584cece982288647537ee99c86a5da70967b52..03cb492ab64b5b4de513f0bbca3da86712b62432 100755 (executable)
@@ -2,8 +2,7 @@
 
 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
index da09d3821571de652c566d80b50057e7a401c0c6..ad1ceb89cbe0c83eb9983751d4271e67da959b1e 100644 (file)
@@ -34,6 +34,7 @@
   NSString *displayName;
   LDAPSource *ldapSource;
   NSMutableDictionary *entries;
+  BOOL ignoreSoObjectHunger;
 }
 
 - (id <SOGoContactFolder>) initWithName: (NSString *) newName
index 391336392366a2eb4b39c0c79fd72852f53ad330..60e4ee98834fcd76543b42ddb9344d33ec00a53a 100644 (file)
@@ -73,6 +73,7 @@
       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
index ed952fffa23906ec12b2041ce7cf8a68816aa077..7043067463deb52b3697829987feb25e5a53a665 100644 (file)
@@ -33,6 +33,7 @@
 {
   NSDictionary *currentContact;
   NSString *selectorComponentClass;
+  NSArray *contactInfos;
 }
 
 @end
index a68239d21c89eb730d0d4215af6e63a6f2e1ca22..4803bba0ea6a575763ff184382da80d55ec2df57 100644 (file)
@@ -26,8 +26,6 @@
 #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 */
index 2cee81ffd3e0da855b3d67cecf132725a0fb7846..d9638d34041169a3198218fc7695e6696ed28514 100644 (file)
@@ -52,7 +52,7 @@
       <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
index 4cae52a46a65ac89ce5a457c05887dffc97f19b3..90dce72298ec830081b19928b159c757d6037547 100644 (file)
@@ -133,7 +133,7 @@ function contactsListCallback(http) {
     }
   }
   else
-    log ("ajax problem 1");
+    log ("ajax problem 1: status = " + http.status);
 }
 
 function onContactFoldersContextMenu(event) {
@@ -593,7 +593,7 @@ function deletePersonalAddressBookCallback(http) {
      document.deletePersonalABAjaxRequest = null;
   }
   else
-     log ("ajax problem");
+     log ("ajax problem 5: " + http.status);
 }
 
 function configureDragHandles() {
index 383f1ef6ee9014c06ef21c1615d02fb4e5b8b16e..c52611a32c832536e2f679c871a5b9e94d31e90d 100644 (file)
@@ -62,6 +62,12 @@ LABEL, SPAN.checkBoxList
 LABEL#commentArea
 { height: 15em; }
 
+LABEL#commentArea textarea
+{ padding: 0;
+  margin: 0;
+  width: 380px;
+  height: 15em; }
+
 SPAN.checkBoxList#participantsCB
 { height: 7em; }
 
index ab6d81ab4506def17732950698a57ddb4167e211..9b2d5dc28cd774ff2f05284c66d62b3bef133032 100644 (file)
@@ -153,16 +153,20 @@ function onComponentEditorLoad(event) {
    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");
index 579f492c5c7b11bbc801477da39599d29b3a419e..4e32017281721274ff7fb599ec2e81b5e9b714a1 100644 (file)
@@ -34,6 +34,12 @@ LABEL, SPAN.checkBoxList
 LABEL#commentArea
 { height: 15em; }
 
+LABEL#commentArea textarea
+{ padding: 0;
+  margin: 0;
+  width: 380px;
+  height: 15em; }
+
 SPAN.checkBoxList#participantsCB
 { height: 7em; }