Monotone-Parent: ebea63a163ebf08fba3b02873febbe9dcaaaeb2c
Monotone-Revision: a486856eb1c20d59b444f05d1ce45177d7ccc66e Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2007-09-18T20:52:32 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
b9393f0dd6
commit
0c538f0fbc
|
@ -23,6 +23,7 @@
|
|||
#define UIXPAGEFRAME_H
|
||||
|
||||
#import <SOGoUI/UIxComponent.h>
|
||||
#import <NGObjWeb/WEClientCapabilities.h>
|
||||
|
||||
@interface WOComponent (PopupExtension)
|
||||
|
||||
|
@ -56,6 +57,10 @@
|
|||
- (void) setToolbar: (NSString *) newToolbar;
|
||||
- (NSString *) toolbar;
|
||||
|
||||
- (BOOL) isBrowserCompatible;
|
||||
- (BOOL) isIE7Compatible;
|
||||
- (BOOL) isMac;
|
||||
|
||||
@end
|
||||
|
||||
#endif /* UIXPAGEFRAME_H */
|
||||
|
|
|
@ -258,4 +258,44 @@
|
|||
return toolbar;
|
||||
}
|
||||
|
||||
/* browser/os identification */
|
||||
|
||||
- (BOOL) isCompatibleBrowser
|
||||
{
|
||||
WEClientCapabilities *cc;
|
||||
|
||||
cc = [[context request] clientCapabilities];
|
||||
|
||||
//NSLog(@"Browser = %@", [cc description]);
|
||||
//NSLog(@"User agent = %@", [cc userAgent]);
|
||||
//NSLog(@"Browser major version = %i", [cc majorVersion]);
|
||||
|
||||
return (
|
||||
([[cc userAgentType] isEqualToString: @"IE"] && [cc majorVersion] >= 7) ||
|
||||
([[cc userAgentType] isEqualToString: @"Mozilla"] && [cc majorVersion] >= 5) ||
|
||||
([[cc userAgentType] isEqualToString: @"Safari"] && [cc majorVersion] >= 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 */
|
||||
|
|
|
@ -7,10 +7,10 @@
|
|||
xmlns:const="http://www.skyrix.com/od/constant"
|
||||
xmlns:rsrc="OGo:url"
|
||||
xmlns:label="OGo:label"
|
||||
><var:string var:value="doctype" const:escapeHTML="NO" />
|
||||
><var:string var:value="doctype" const:escapeHTML="NO"/>
|
||||
<form id="connectForm" var:href="connectURL">
|
||||
<div id="loginScreen">
|
||||
<img rsrc:src="lori-login.jpg"/><br/><br/>
|
||||
<img id="splash" rsrc:src="lori-login.jpg"/><br/><br/>
|
||||
<label><var:string label:value="Login:"/><br/>
|
||||
<input class="textField" id="userName" name="userName"
|
||||
type="text" var:value="userName" /></label><br/>
|
||||
|
@ -21,6 +21,6 @@
|
|||
<input class="button" id="submit" name="submit" type="submit" label:value="Connect" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<img id="preparedAnimation" rsrc:src="busy.gif"/>
|
||||
</form
|
||||
><img id="preparedAnimation" rsrc:src="busy.gif"/>
|
||||
</var:component>
|
||||
|
|
|
@ -33,8 +33,9 @@
|
|||
/></var:if-ie>
|
||||
</head>
|
||||
|
||||
<body var:class="bodyClasses">
|
||||
<script type="text/javascript">
|
||||
<body var:class="bodyClasses"
|
||||
><var:if condition="isCompatibleBrowser"
|
||||
><script type="text/javascript">
|
||||
var ApplicationBaseURL = '<var:string value="applicationPath" />';
|
||||
var ResourcesURL = '/SOGo.woa/WebServerResources';
|
||||
<var:if condition="shortUserNameForDisplay" const:value="anonymous"
|
||||
|
@ -92,6 +93,23 @@
|
|||
<div class="pageContent"
|
||||
><var:component-content
|
||||
/></div>
|
||||
</var:if>
|
||||
<var:if condition="isCompatibleBrowser" const:negate="YES">
|
||||
<div id="loginScreen">
|
||||
<img id="splash" rsrc:src="lori-login.jpg"/><br/><br/>
|
||||
<p>SOGo requires a modern browser to work properly. We suggest to use the latest version of Firefox.</p>
|
||||
<p class="browser"><a href="http://www.getfirefox.com/"><img rsrc:src="browser_firefox.gif"/>Download Firefox</a></p>
|
||||
<var:if condition="isIE7Compatible">
|
||||
<p>Alternatively, you can also use the following compatible browsers:</p>
|
||||
<p class="browser"><a href="http://www.microsoft.com/ie/download/"><img rsrc:src="browser_ie.gif"/>Download Internet Explorer 7</a></p>
|
||||
<p class="browser"><a href="http://www.apple.com/safari/download/"><img rsrc:src="browser_safari.gif"/>Download Safari 3</a></p>
|
||||
</var:if>
|
||||
<var:if condition="isMac">
|
||||
<p>Alternatively, you can also use Safari.</p>
|
||||
<p><a href="http://www.apple.com/safari/download/"><img rsrc:src="browser_safari.gif"/>Download Safari 3</a></p>
|
||||
</var:if>
|
||||
</div>
|
||||
</var:if>
|
||||
<noscript>
|
||||
<div class="javascriptPopupBackground">
|
||||
</div>
|
||||
|
|
|
@ -22,7 +22,7 @@ DIV#loginScreen
|
|||
-moz-border-bottom-colors: #000 #9c9a94 transparent;
|
||||
}
|
||||
|
||||
DIV#loginScreen IMG
|
||||
IMG#splash
|
||||
{ border: 0px;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
|
@ -46,3 +46,15 @@ DIV#loginButton IMG#progressIndicator
|
|||
border: 0px none;
|
||||
margin-top: 5px;
|
||||
margin-left: 5px; }
|
||||
|
||||
P.browser
|
||||
{ background-color: #fff;
|
||||
border-top: 1px solid #888;
|
||||
border-left: 1px solid #888;
|
||||
border-right: 1px solid #eee;
|
||||
border-bottom: 1px solid #eee;
|
||||
line-height: 32px; }
|
||||
|
||||
P.browser img
|
||||
{ padding: 2px;
|
||||
vertical-align: middle; }
|
Loading…
Reference in New Issue