From 45142b099d5451e0a9457051ab48dd3c67deeeec Mon Sep 17 00:00:00 2001 From: wolfgang Date: Wed, 31 Oct 2007 17:17:26 +0000 Subject: [PATCH] git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1209 d1b88da0-ebda-0310-925b-ed51d893ca5b --- Scripts/sogo-init.d-redhat | 12 ++--- Scripts/sogod-0.9-redhat | 11 ++++- UI/MailPartViewers/UIxMailPartTextViewer.m | 2 - UI/WebServerResources/generic.js | 54 ++++++---------------- 4 files changed, 29 insertions(+), 50 deletions(-) diff --git a/Scripts/sogo-init.d-redhat b/Scripts/sogo-init.d-redhat index def0f10d..63cd8e1c 100755 --- a/Scripts/sogo-init.d-redhat +++ b/Scripts/sogo-init.d-redhat @@ -41,7 +41,7 @@ then . /usr/GNUstep/System/Library/Makefiles/GNUstep.sh fi -REAL_DAEMON=$GNUSTEP_SYSTEM_ROOT/Tools/sogod-0.9 +REAL_DAEMON=sogod-0.9 DAEMON=/usr/sbin/sogod NAME=sogo DESC="Scalable OpenGroupware.Org (Inverse edition)" @@ -76,18 +76,16 @@ fi case "$1" in start) - echo -n $"Starting $DESC: " + echo $"Starting $DESC: " for ((a=1; a <= PREFORK ; a++)) do - daemon su - sogo -c "$DAEMON $a" + daemon --user=sogo $DAEMON $a + echo "$DAEMON $a" done -# daemon --user sogo --pidfile $PIDFILE $DAEMON - echo "$NAME." ;; stop) echo -n $"Stopping $DESC: " - killproc `basename $REAL_DAEMON` && rm -f ${PIDFILE}* -# killproc -p $PIDFILE $REAL_DAEMON && rm -f $PIDFILE + killproc $REAL_DAEMON && rm -f ${PIDFILE}* echo "$NAME." ;; restart|force-reload) diff --git a/Scripts/sogod-0.9-redhat b/Scripts/sogod-0.9-redhat index afd934be..43357c3d 100755 --- a/Scripts/sogod-0.9-redhat +++ b/Scripts/sogod-0.9-redhat @@ -25,6 +25,15 @@ PIDFILE=/var/run/sogo/sogod.$1 . /usr/GNUstep/System/Library/Makefiles/GNUstep.sh +if [ -f $GNUSTEP_USER_ROOT/Tools/sogod-0.9 ]; then + sogod="$GNUSTEP_USER_ROOT/Tools/sogod-0.9" +elif [ -f $GNUSTEP_LOCAL_ROOT/Tools/sogod-0.9 ]; then + sogod="$GNUSTEP_LOCAL_ROOT/Tools/sogod-0.9" +else + echo "Can't find sogod-0.9" + exit 1 +fi + echo $$ > $PIDFILE startport=`defaults read sogod-0.9 WOPort` @@ -36,4 +45,4 @@ else fi let "port=$startport + $1 - 1" -exec $GNUSTEP_LOCAL_ROOT/Tools/sogod-0.9 -WOPort $port >& /var/log/sogo/sogod-$port.log +exec $sogod -WOPort $port >& /var/log/sogo/sogod-$port.log & diff --git a/UI/MailPartViewers/UIxMailPartTextViewer.m b/UI/MailPartViewers/UIxMailPartTextViewer.m index 450c1421..22d41a38 100644 --- a/UI/MailPartViewers/UIxMailPartTextViewer.m +++ b/UI/MailPartViewers/UIxMailPartTextViewer.m @@ -44,8 +44,6 @@ content = [NSMutableString string]; superContent = [[super flatContentAsString] stringByEscapingHTMLString]; [content appendString: [superContent stringByDetectingURLs]]; - [content replaceString: @"\r\n" withString: @"
"]; - [content replaceString: @"\n" withString: @"
"]; return content; } diff --git a/UI/WebServerResources/generic.js b/UI/WebServerResources/generic.js index 5e7ffcea..5498edf5 100644 --- a/UI/WebServerResources/generic.js +++ b/UI/WebServerResources/generic.js @@ -445,44 +445,6 @@ function generateQueryString(queryDict) { return s; } -function getQueryParaArray(s) { - if (s.charAt(0) == "?") s = s.substr(1, s.length - 1); - return s.split("&"); -} - -function getQueryParaValue(s, name) { - var t; - - t = getQueryParaArray(s); - for (var i = 0; i < t.length; i++) { - var s = t[i]; - - if (s.indexOf(name) != 0) - continue; - - s = s.substr(name.length, s.length - name.length); - return decodeURIComponent(s); - } - return null; -} - -/* opener callback */ - -function triggerOpenerCallback() { - /* this code has some issue if the folder has no proper trailing slash! */ - if (window.opener && !window.opener.closed) { - var t, cburl; - - t = getQueryParaValue(window.location.search, "openerurl="); - cburl = window.opener.location.href; - if (cburl[cburl.length - 1] != "/") { - cburl = cburl.substr(0, cburl.lastIndexOf("/") + 1); - } - cburl = cburl + t; - window.opener.location.href = cburl; - } -} - /* selection mechanism */ function deselectAll(parent) { @@ -584,8 +546,20 @@ function popupMenu(event, menuId, target) { hideMenu(document.currentPopupMenu); var popup = $(menuId); - var menuTop = Event.pointerY(event); - var menuLeft = Event.pointerX(event); + + var deltaX = 0; + var deltaY = 0; + + var pageContent = $("pageContent"); + if (popup.parentNode.tagName != "BODY") { + var offset = pageContent.cascadeLeftOffset(); + deltaX = -($(popup.parentNode).cascadeLeftOffset() - offset); + offset = pageContent.cascadeTopOffset(); + deltaY = -($(popup.parentNode).cascadeTopOffset() - offset); + } + + var menuTop = Event.pointerY(event) + deltaY; + var menuLeft = Event.pointerX(event) + deltaX; var heightDiff = (window.height() - (menuTop + popup.offsetHeight)); if (heightDiff < 0) -- 2.39.5