Monotone-Parent: 006ff807d8307c52defea735313008dfe94862db

Monotone-Revision: da8c27f53557345f2f6856fdca0d8fabd1d3bdef

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2008-08-20T03:21:33
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Wolfgang Sourdeau 2008-08-20 03:21:33 +00:00
parent 92a24808bd
commit 342662549e
20 changed files with 142 additions and 308 deletions

View File

@ -1,5 +1,9 @@
2008-08-19 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* UI/MainUI/SOGoBrowsersPanel.[hm]: new template class that helps
displaying a choice of browsers compatible with SOGo. The code was
extracted from UIxPageFrame.
* UI/Scheduler/UIxAppointmentEditor.m ([UIxAppointmentEditor
-viewAction]): apply the user's timezone to the startdate before
formatting it.

View File

@ -27,11 +27,6 @@
"Sorry, the user rights can not be configured for that object." = "Sorry, the user rights can not be configured for that object.";
"browserNotCompatible" = "We've detected that your browser version is currently not supported on this site. Our recommendation is to use Firefox. Click on the link bellow to download the most current version of this browser.";
"alternativeBrowsers" = "Alternatively, you can also use the following compatible browsers";
"alternativeBrowserSafari" = "Alternatively, you can also use Safari.";
"Download" = "Download";
/* generic.js */
"Unable to subscribe to that folder!"
= "Unable to subscribe to that folder!";

View File

@ -28,11 +28,6 @@
"Sorry, the user rights can not be configured for that object." = "Sorry, the user rights can not be configured for that object.";
"browserNotCompatible" = "La version de votre navigateur Web n'est présentement pas supportée par ce site. Nous recommandons d'utiliser Firefox. Vous trouverez un lien vers la plus récente version de ce navigateur ci-dessous:";
"alternativeBrowsers" = "Comme alternative, vous pouvez aussi utiliser les navigateurs suivants:";
"alternativeBrowserSafari" = "Comme alternative, vous pouvez aussi utiliser Safari.";
"Download" = "Télécharger";
/* generic.js */
"Unable to subscribe to that folder!" = "Impossible de s'abonner à ce dossier.";
"You cannot subscribe to a folder that you own!" = "Impossible de vous abonner à un dossier qui vous appartient.";

View File

@ -16,7 +16,6 @@ CommonUI_OBJC_FILES += \
UIxObjectActions.m \
UIxFolderActions.m \
UIxParentFolderActions.m \
UIxElemBuilder.m \
UIxUserRightsEditor.m \
\
UIxToolbar.m \

View File

@ -26,10 +26,6 @@
"Publish the Free/Busy information" = "Pubblica le informazioni sullo stato (libero/impegnato)";
"Default Roles" = "Permessi predefiniti";
"Sorry, the user rights can not be configured for that object." = "Non è possibile configurare i permessi per questo oggetto.";
"browserNotCompatible" = "La versione del browser utilizzato non è supportata. Raccomandiamo l'utilizzo di Firefox. Clicca sul link per scaricarne l'ultima versione disponibile.";
"alternativeBrowsers" = "Alternativamente, puoi utilizzare questi browser compatibili";
"alternativeBrowserSafari" = "Alternativamente, puoi utilizzare Safari.";
"Download" = "Scarica";
/* generic.js */
"Unable to subscribe to that folder!" = "Impossibile sottoscrivere la cartella!";

View File

@ -30,11 +30,6 @@
"Sorry, the user rights can not be configured for that object." = "Sorry, the user rights can not be configured for that object.";
"browserNotCompatible" = "Hemos detectado que este sistema no soporta su versión del navegador. Recomendamos usar Firefox. Haga clic en el siguiente enlace para descargar la versión más reciente de este navegador.";
"alternativeBrowsers" = "Alternativamente, también puede usar uno se los siguientes navegadores compatibles: ";
"alternativeBrowserSafari" = "Alternativamente, puede usar Safari.";
"Download" = "Descarga";
/* generic.js */
"Unable to subscribe to that folder!"
= "No es posible suscribirse a esta carpeta.";

View File

@ -1,86 +0,0 @@
/*
Copyright (C) 2000-2004 SKYRIX Software AG
This file is part of OpenGroupware.org.
OGo is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
OGo is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public
License along with OGo; see the file COPYING. If not, write to the
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
// $Id: UIxElemBuilder.m 30 2004-06-11 12:07:09Z znek $
#include <NGObjWeb/WOxElemBuilder.h>
/*
This builder builds various elements from the UI-X product.
All tags are mapped into the <uix:> namespace (XMLNS_OD_BIND).
<var:tabview .../> maps to UIxTabView
<var:tab .../> maps to UIxTabItem
*/
@interface UIxElemBuilder : WOxTagClassElemBuilder
{
}
@end
#include <SaxObjC/XMLNamespaces.h>
#include "common.h"
#define XMLNS_UIX @"OGo:uix"
@implementation UIxElemBuilder
- (Class)classForElement:(id<DOMElement>)_element {
NSString *tagName;
unsigned tl;
unichar c1;
if (![[_element namespaceURI] isEqualToString:XMLNS_UIX])
return Nil;
tagName = [_element tagName];
if ((tl = [tagName length]) < 2)
return Nil;
c1 = [tagName characterAtIndex:0];
switch (c1) {
case 't': { /* starting with 't' */
unichar c2;
c2 = [tagName characterAtIndex:1];
if (tl == 3 && c2 == 'a') {
if ([tagName characterAtIndex:2] == 'b')
return NSClassFromString(@"UIxTabItem");
}
if (tl > 5) {
if (c2 == 'a') {
if ([tagName isEqualToString:@"tabview"])
return NSClassFromString(@"UIxTabView");
}
}
break;
}
}
return Nil;
}
@end /* UIxElemBuilder */

View File

@ -68,8 +68,6 @@
- (BOOL) isSuperUser;
- (BOOL) isCompatibleBrowser;
- (BOOL) isIE7Compatible;
- (BOOL) isMac;
@end

View File

@ -19,15 +19,14 @@
02111-1307, USA.
*/
#import "common.h"
#import <NGObjWeb/SoComponent.h>
#import <NGObjWeb/WOComponent.h>
#import <Foundation/NSEnumerator.h>
#import <Foundation/NSString.h>
#import <NGObjWeb/WOResourceManager.h>
#import <SoObjects/SOGo/SOGoUser.h>
#import <SoObjects/SOGo/NSDictionary+Utilities.h>
#import <SOGoUI/UIxComponent.h>
#import <Main/build.h>
#import "UIxPageFrame.h"
@ -396,7 +395,7 @@
cc = [[context request] clientCapabilities];
//NSLog(@"Browser = %@", [cc description]);
NSLog(@"User agent = %@", [cc userAgent]);
// NSLog(@"User agent = %@", [cc userAgent]);
//NSLog(@"Browser major version = %i", [cc majorVersion]);
return (([[cc userAgentType] isEqualToString: @"IE"]
@ -409,24 +408,4 @@
);
}
- (BOOL) isIE7Compatible
{
WEClientCapabilities *cc;
cc = [[context request] clientCapabilities];
return ([cc isWindowsBrowser] &&
([[cc userAgent] rangeOfString: @"NT 5.1"].location != NSNotFound ||
[[cc userAgent] rangeOfString: @"NT 6"].location != NSNotFound));
}
- (BOOL) isMac
{
WEClientCapabilities *cc;
cc = [[context request] clientCapabilities];
return [cc isMacBrowser];
}
@end /* UIxPageFrame */

View File

@ -1,153 +0,0 @@
/*
Copyright (C) 2004 SKYRIX Software AG
This file is part of OpenGroupware.org.
OGo is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
OGo is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public
License along with OGo; see the file COPYING. If not, write to the
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
#import <Foundation/NSDictionary.h>
#import <Foundation/NSEnumerator.h>
#import <NGObjWeb/WOAssociation.h>
#import <NGObjWeb/WOContext+SoObjects.h>
#import <NGObjWeb/WODynamicElement.h>
#import <NGObjWeb/WORequest.h>
#import <NGObjWeb/WOResponse.h>
#import <NGObjWeb/WOResourceManager.h>
#import <NGObjWeb/WOSession.h>
#import <NGExtensions/NSObject+Logs.h>
@interface WOContext(WOExtensionsPrivate)
- (void)addActiveFormElement:(WOElement *)_element;
@end
static inline id WOExtGetProperty(NSDictionary *_set, NSString *_name) {
id propValue = [_set objectForKey:_name];
if (propValue) {
propValue = [propValue retain];
[(NSMutableDictionary *)_set removeObjectForKey:_name];
}
return propValue;
}
static inline NSString *WEUriOfResource(NSString *_name, WOContext *_ctx) {
NSArray *languages;
WOResourceManager *resourceManager;
NSString *uri;
if (_name == nil)
return nil;
languages = [_ctx hasSession]
? [[_ctx session] languages]
: [[_ctx request] browserLanguages];
resourceManager = [[_ctx application] resourceManager];
uri = [resourceManager urlForResourceNamed:_name
inFramework:nil
languages:languages
request:[_ctx request]];
if ([uri rangeOfString:@"/missingresource?"].length > 0)
uri = nil;
return uri;
}
static inline void WEAppendFont(WOResponse *_resp,
NSString *_color,
NSString *_face,
NSString *_size)
{
[_resp appendContentString:@"<font"];
if (_color) {
[_resp appendContentString:@" color=\""];
[_resp appendContentHTMLAttributeValue:_color];
[_resp appendContentCharacter:'"'];
}
if (_face) {
[_resp appendContentString:@" face=\""];
[_resp appendContentHTMLAttributeValue:_face];
[_resp appendContentCharacter:'"'];
}
if (_size) {
[_resp appendContentString:@" size=\""];
[_resp appendContentHTMLAttributeValue:_size];
[_resp appendContentCharacter:'"'];
}
[_resp appendContentCharacter:'>'];
}
static inline void WEAppendTD(WOResponse *_resp,
NSString *_align,
NSString *_valign,
NSString *_bgColor)
{
[_resp appendContentString:@"<td"];
if (_bgColor) {
[_resp appendContentString:@" bgcolor=\""];
[_resp appendContentHTMLAttributeValue:_bgColor];
[_resp appendContentCharacter:'"'];
}
if (_align) {
[_resp appendContentString:@" align=\""];
[_resp appendContentHTMLAttributeValue:_align];
[_resp appendContentCharacter:'"'];
}
if (_valign) {
[_resp appendContentString:@" valign=\""];
[_resp appendContentHTMLAttributeValue:_valign];
[_resp appendContentCharacter:'"'];
}
[_resp appendContentCharacter:'>'];
}
static inline WOElement *WECreateElement(NSString *_className,
NSString *_name,
NSDictionary *_config,
WOElement *_template)
{
Class c;
WOElement *result = nil;
NSMutableDictionary *config = nil;
if ((c = NSClassFromString(_className)) == Nil) {
NSLog(@"%s: missing '%@' class", __PRETTY_FUNCTION__, _className);
return nil;
}
config = [NSMutableDictionary dictionaryWithCapacity:4];
{
NSEnumerator *keyEnum;
id key;
keyEnum = [_config keyEnumerator];
while ((key = [keyEnum nextObject])) {
WOAssociation *a;
a = [WOAssociation associationWithValue:[_config objectForKey:key]];
[config setObject:a forKey:key];
}
}
result = [[c alloc] initWithName:_name
associations:config
template:_template];
return [result autorelease];
}
#define OWGetProperty WOExtGetProperty

View File

@ -7,4 +7,9 @@
"Connect" = "Connect";
"Wrong username or password." = "Wrong username or password.";
"Wrong username or password." = "Wrong username or password.";
"browserNotCompatible" = "We've detected that your browser version is currently not supported on this site. Our recommendation is to use Firefox. Click on the link bellow to download the most current version of this browser.";
"alternativeBrowsers" = "Alternatively, you can also use the following compatible browsers";
"alternativeBrowserSafari" = "Alternatively, you can also use Safari.";
"Download" = "Download";

View File

@ -7,4 +7,9 @@
"Connect" = "Connexion";
"Wrong username or password." = "Mauvais nom d'utilisateur ou mot de passe.";
"Wrong username or password." = "Mauvais nom d'utilisateur ou mot de passe.";
"browserNotCompatible" = "La version de votre navigateur Web n'est présentement pas supportée par ce site. Nous recommandons d'utiliser Firefox. Vous trouverez un lien vers la plus récente version de ce navigateur ci-dessous:";
"alternativeBrowsers" = "Comme alternative, vous pouvez aussi utiliser les navigateurs suivants:";
"alternativeBrowserSafari" = "Comme alternative, vous pouvez aussi utiliser Safari.";
"Download" = "Télécharger";

View File

@ -11,7 +11,8 @@ MainUI_LANGUAGES = Dutch English French German Italian Spanish
MainUI_OBJC_FILES += \
MainUIProduct.m \
SOGoRootPage.m \
SOGoUserHomePage.m
SOGoUserHomePage.m \
SOGoBrowsersPanel.m \
# SOGoGroupPage.m \
# SOGoGroupsPage.m \

View File

@ -8,3 +8,8 @@
"Connect" = "Entra";
"Wrong username or password." = "Username o password non corretti.";
"browserNotCompatible" = "La versione del browser utilizzato non è supportata. Raccomandiamo l'utilizzo di Firefox. Clicca sul link per scaricarne l'ultima versione disponibile.";
"alternativeBrowsers" = "Alternativamente, puoi utilizzare questi browser compatibili";
"alternativeBrowserSafari" = "Alternativamente, puoi utilizzare Safari.";
"Download" = "Scarica";

View File

@ -0,0 +1,30 @@
/* SOGoBrowsersPanel.h - this file is part of SOGo
*
* Copyright (C) 2008 Inverse
*
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#import <SOGoUI/UIxComponent.h>
@interface SOGoBrowsersPanel : UIxComponent
- (BOOL) isIE7Compatible;
- (BOOL) isMac;
@end

View File

@ -0,0 +1,51 @@
/* SOGoBrowsersPanel.m - this file is part of SOGo
*
* Copyright (C) 2008 Inverse
*
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#import <NGObjWeb/WEClientCapabilities.h>
#import <NGObjWeb/WOContext.h>
#import <NGObjWeb/WORequest.h>
#import "SOGoBrowsersPanel.h"
@implementation SOGoBrowsersPanel
- (BOOL) isIE7Compatible
{
WEClientCapabilities *cc;
cc = [[context request] clientCapabilities];
return ([cc isWindowsBrowser] &&
([[cc userAgent] rangeOfString: @"NT 5.1"].location != NSNotFound ||
[[cc userAgent] rangeOfString: @"NT 6"].location != NSNotFound));
}
- (BOOL) isMac
{
WEClientCapabilities *cc;
cc = [[context request] clientCapabilities];
return [cc isMacBrowser];
}
@end

View File

@ -11,3 +11,8 @@
"Connect" = "Conectar";
"Wrong username or password." = "Nombre de usuario o contraseña incorrectos.";
"browserNotCompatible" = "Hemos detectado que este sistema no soporta su versión del navegador. Recomendamos usar Firefox. Haga clic en el siguiente enlace para descargar la versión más reciente de este navegador.";
"alternativeBrowsers" = "Alternativamente, también puede usar uno se los siguientes navegadores compatibles: ";
"alternativeBrowserSafari" = "Alternativamente, puede usar Safari.";
"Download" = "Descarga";

View File

@ -0,0 +1,24 @@
<?xml version="1.0" standalone="yes"?>
<!DOCTYPE container>
<container
xmlns="http://www.w3.org/1999/xhtml"
xmlns:xml="http://www.w3.org/XML/1998/namespace"
xmlns:var="http://www.skyrix.com/od/binding"
xmlns:const="http://www.skyrix.com/od/constant"
xmlns:rsrc="OGo:url"
xmlns:label="OGo:label">
<div id="loginScreen">
<img const:alt="*" id="splash" rsrc:src="lori-login.jpg"/><br/><br/>
<p><var:string label:value="browserNotCompatible"/></p>
<p class="browser"><a href="http://www.getfirefox.com/"><img const:alt="*" rsrc:src="browser_firefox.gif"/><var:string label:value="Download"/> Firefox</a></p>
<var:if condition="isIE7Compatible">
<p><var:string label:value="alternativeBrowsers"/></p>
<p class="browser"><a href="http://www.microsoft.com/ie/download/"><img const:alt="*" rsrc:src="browser_ie.gif"/><var:string label:value="Download"/> Internet Explorer 7</a></p>
<p class="browser"><a href="http://www.apple.com/safari/download/"><img const:alt="*" rsrc:src="browser_safari.gif"/><var:string label:value="Download"/> Safari 3</a></p>
</var:if>
<var:if condition="isMac">
<p><var:string label:value="alternativeBrowserSafari"/></p>
<p class="browser"><a href="http://www.apple.com/safari/download/"><img const:alt="*" rsrc:src="browser_safari.gif"/><var:string label:value="Download"/> Safari 3</a></p>
</var:if>
</div>
</container>

View File

@ -141,22 +141,9 @@
</var:foreach>
<script type="text/javascript">FastInit.addOnLoad(onFinalLoadHandler);</script>
</var:if>
<var:if condition="isCompatibleBrowser" const:negate="YES">
<div id="loginScreen">
<img const:alt="*" id="splash" rsrc:src="lori-login.jpg"/><br/><br/>
<p><var:string label:value="browserNotCompatible"/></p>
<p class="browser"><a href="http://www.getfirefox.com/"><img const:alt="*" rsrc:src="browser_firefox.gif"/><var:string label:value="Download"/> Firefox</a></p>
<var:if condition="isIE7Compatible">
<p><var:string label:value="alternativeBrowsers"/></p>
<p class="browser"><a href="http://www.microsoft.com/ie/download/"><img const:alt="*" rsrc:src="browser_ie.gif"/><var:string label:value="Download"/> Internet Explorer 7</a></p>
<p class="browser"><a href="http://www.apple.com/safari/download/"><img const:alt="*" rsrc:src="browser_safari.gif"/><var:string label:value="Download"/> Safari 3</a></p>
</var:if>
<var:if condition="isMac">
<p><var:string label:value="alternativeBrowserSafari"/></p>
<p class="browser"><a href="http://www.apple.com/safari/download/"><img const:alt="*" rsrc:src="browser_safari.gif"/><var:string label:value="Download"/> Safari 3</a></p>
</var:if>
</div>
</var:if>
<var:if condition="isCompatibleBrowser" const:negate="YES"
><var:component className="SOGoBrowsersPanel"
/></var:if>
<noscript>
<div class="javascriptPopupBackground">
</div>

View File

@ -61,5 +61,4 @@ P.browser
line-height: 32px; }
P.browser img
{ padding: 2px;
vertical-align: middle; }
{ padding: 2px; }