Monotone-Parent: 0ed0ef307cb74b67ba17424e0e8a0e04a8364e9f
Monotone-Revision: eeaa9b56be0dd1eff991c0e1fe8ba2884de77fe0 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-10-18T20:08:35 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
parent
aa0f8d2c4a
commit
6d93652dea
|
@ -5,6 +5,12 @@
|
||||||
product-specific translation dictionary as a JSON hash.
|
product-specific translation dictionary as a JSON hash.
|
||||||
([UIxPageFrame -commonLocalizableStrings]): same as above but for
|
([UIxPageFrame -commonLocalizableStrings]): same as above but for
|
||||||
the "Common" framework.
|
the "Common" framework.
|
||||||
|
([UIxPageFrame -setJsFiles:newJSFiles]): new setter that enables
|
||||||
|
the requestor components to require additional Javascript files.
|
||||||
|
This is useful now that all the scripts are loaded at the end of
|
||||||
|
the HTML code.
|
||||||
|
([UIxPageFrame -additionalJSFiles]): new getter related to the
|
||||||
|
above.
|
||||||
|
|
||||||
2007-10-17 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
2007-10-17 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,9 @@
|
||||||
#import <SOGoUI/UIxComponent.h>
|
#import <SOGoUI/UIxComponent.h>
|
||||||
#import <NGObjWeb/WEClientCapabilities.h>
|
#import <NGObjWeb/WEClientCapabilities.h>
|
||||||
|
|
||||||
|
@class NSString;
|
||||||
|
@class NSMutableArray;
|
||||||
|
|
||||||
@interface WOComponent (PopupExtension)
|
@interface WOComponent (PopupExtension)
|
||||||
|
|
||||||
- (BOOL) isPopup;
|
- (BOOL) isPopup;
|
||||||
|
@ -37,6 +40,7 @@
|
||||||
NSString *toolbar;
|
NSString *toolbar;
|
||||||
id item;
|
id item;
|
||||||
BOOL isPopup;
|
BOOL isPopup;
|
||||||
|
NSMutableArray *additionalJSFiles;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSString *) commonLocalizableStrings;
|
- (NSString *) commonLocalizableStrings;
|
||||||
|
@ -47,6 +51,8 @@
|
||||||
- (BOOL) hasPageSpecificJavaScript;
|
- (BOOL) hasPageSpecificJavaScript;
|
||||||
- (BOOL) hasProductSpecificJavaScript;
|
- (BOOL) hasProductSpecificJavaScript;
|
||||||
|
|
||||||
|
- (NSArray *) additionalJSFiles;
|
||||||
|
|
||||||
- (NSString *) pageCSSURL;
|
- (NSString *) pageCSSURL;
|
||||||
- (NSString *) productCSSURL;
|
- (NSString *) productCSSURL;
|
||||||
- (BOOL) hasPageSpecificCSS;
|
- (BOOL) hasPageSpecificCSS;
|
||||||
|
|
|
@ -38,7 +38,10 @@
|
||||||
{
|
{
|
||||||
if ((self = [super init]))
|
if ((self = [super init]))
|
||||||
{
|
{
|
||||||
|
item = nil;
|
||||||
|
title = nil;
|
||||||
toolbar = nil;
|
toolbar = nil;
|
||||||
|
additionalJSFiles = nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
|
@ -48,8 +51,8 @@
|
||||||
{
|
{
|
||||||
[item release];
|
[item release];
|
||||||
[title release];
|
[title release];
|
||||||
if (toolbar)
|
|
||||||
[toolbar release];
|
[toolbar release];
|
||||||
|
[additionalJSFiles release];
|
||||||
[super dealloc];
|
[super dealloc];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,7 +60,7 @@
|
||||||
|
|
||||||
- (void) setTitle: (NSString *) _value
|
- (void) setTitle: (NSString *) _value
|
||||||
{
|
{
|
||||||
ASSIGNCOPY(title, _value);
|
ASSIGN (title, _value);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSString *) title
|
- (NSString *) title
|
||||||
|
@ -170,8 +173,8 @@
|
||||||
|
|
||||||
- (NSString *) _stringsForFramework: (NSString *) framework
|
- (NSString *) _stringsForFramework: (NSString *) framework
|
||||||
{
|
{
|
||||||
NSDictionary *table;
|
|
||||||
NSString *language, *frameworkName;
|
NSString *language, *frameworkName;
|
||||||
|
id table;
|
||||||
|
|
||||||
frameworkName = [NSString stringWithFormat: @"%@.SOGo",
|
frameworkName = [NSString stringWithFormat: @"%@.SOGo",
|
||||||
(framework ? framework : [self frameworkName])];
|
(framework ? framework : [self frameworkName])];
|
||||||
|
@ -180,10 +183,9 @@
|
||||||
= [[self resourceManager] stringTableWithName: @"Localizable"
|
= [[self resourceManager] stringTableWithName: @"Localizable"
|
||||||
inFramework: frameworkName
|
inFramework: frameworkName
|
||||||
languages: [NSArray arrayWithObject: language]];
|
languages: [NSArray arrayWithObject: language]];
|
||||||
/* table is not really an NSDict44ionary but a hackish variation thereof */
|
|
||||||
table = [NSDictionary dictionaryWithDictionary: table];
|
|
||||||
|
|
||||||
return [table jsonRepresentation];
|
/* table is not really an NSDictionary but a hackish variation thereof */
|
||||||
|
return [[NSDictionary dictionaryWithDictionary: table] jsonRepresentation];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSString *) commonLocalizableStrings
|
- (NSString *) commonLocalizableStrings
|
||||||
|
@ -236,6 +238,28 @@
|
||||||
return ([[self productJavaScriptURL] length] > 0);
|
return ([[self productJavaScriptURL] length] > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void) setJsFiles: (NSString *) newJSFiles
|
||||||
|
{
|
||||||
|
NSEnumerator *jsFiles;
|
||||||
|
NSString *currentFile, *filename;
|
||||||
|
|
||||||
|
[additionalJSFiles release];
|
||||||
|
additionalJSFiles = [NSMutableArray new];
|
||||||
|
|
||||||
|
jsFiles = [[newJSFiles componentsSeparatedByString: @","] objectEnumerator];
|
||||||
|
while ((currentFile = [jsFiles nextObject]))
|
||||||
|
{
|
||||||
|
filename = [self urlForResourceFilename:
|
||||||
|
[currentFile stringByTrimmingSpaces]];
|
||||||
|
[additionalJSFiles addObject: filename];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- (NSArray *) additionalJSFiles
|
||||||
|
{
|
||||||
|
return additionalJSFiles;
|
||||||
|
}
|
||||||
|
|
||||||
- (NSString *) pageCSSURL
|
- (NSString *) pageCSSURL
|
||||||
{
|
{
|
||||||
WOComponent *page;
|
WOComponent *page;
|
||||||
|
|
Loading…
Reference in a new issue