diff --git a/UI/Common/UIxPageFrame.h b/UI/Common/UIxPageFrame.h index 94fe9816f..7fe7837ae 100644 --- a/UI/Common/UIxPageFrame.h +++ b/UI/Common/UIxPageFrame.h @@ -23,6 +23,7 @@ #define UIXPAGEFRAME_H #import +#import @interface WOComponent (PopupExtension) @@ -56,6 +57,10 @@ - (void) setToolbar: (NSString *) newToolbar; - (NSString *) toolbar; +- (BOOL) isBrowserCompatible; +- (BOOL) isIE7Compatible; +- (BOOL) isMac; + @end #endif /* UIXPAGEFRAME_H */ diff --git a/UI/Common/UIxPageFrame.m b/UI/Common/UIxPageFrame.m index 267a653d8..4f631eeeb 100644 --- a/UI/Common/UIxPageFrame.m +++ b/UI/Common/UIxPageFrame.m @@ -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 */ diff --git a/UI/Templates/MainUI/SOGoRootPage.wox b/UI/Templates/MainUI/SOGoRootPage.wox index 0fa3da10e..af0bc6bc4 100644 --- a/UI/Templates/MainUI/SOGoRootPage.wox +++ b/UI/Templates/MainUI/SOGoRootPage.wox @@ -7,10 +7,10 @@ xmlns:const="http://www.skyrix.com/od/constant" xmlns:rsrc="OGo:url" xmlns:label="OGo:label" - > + >
-

+


@@ -21,6 +21,6 @@
-
- + diff --git a/UI/Templates/UIxPageFrame.wox b/UI/Templates/UIxPageFrame.wox index ff1588e05..8cc188326 100644 --- a/UI/Templates/UIxPageFrame.wox +++ b/UI/Templates/UIxPageFrame.wox @@ -33,8 +33,9 @@ /> - -