Monotone-Parent: f8b29d68c36441f92d7ffe8056a95fd25a2fd409
Monotone-Revision: 60b451d63d7516a7e662359127f629d2c70e3f25 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-10-18T14:44:58 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
4e7ed2dab8
commit
67f33463b1
|
@ -1,3 +1,11 @@
|
||||||
|
2007-10-18 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||||
|
|
||||||
|
* UI/Common/UIxPageFrame.m ([UIxPageFrame
|
||||||
|
-productLocalizableStrings]): new method that returns the
|
||||||
|
product-specific translation dictionary as a JSON hash.
|
||||||
|
([UIxPageFrame -commonLocalizableStrings]): same as above but for
|
||||||
|
the "Common" framework.
|
||||||
|
|
||||||
2007-10-17 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
2007-10-17 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||||
|
|
||||||
* UI/MailerUI/UIxMailActions.m ([UIxMailActions -copyAction]):
|
* UI/MailerUI/UIxMailActions.m ([UIxMailActions -copyAction]):
|
||||||
|
|
|
@ -39,6 +39,9 @@
|
||||||
BOOL isPopup;
|
BOOL isPopup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (NSString *) commonLocalizableStrings;
|
||||||
|
- (NSString *) productLocalizableStrings;
|
||||||
|
|
||||||
- (NSString *) pageJavaScriptURL;
|
- (NSString *) pageJavaScriptURL;
|
||||||
- (NSString *) productJavaScriptURL;
|
- (NSString *) productJavaScriptURL;
|
||||||
- (BOOL) hasPageSpecificJavaScript;
|
- (BOOL) hasPageSpecificJavaScript;
|
||||||
|
@ -49,8 +52,6 @@
|
||||||
- (BOOL) hasPageSpecificCSS;
|
- (BOOL) hasPageSpecificCSS;
|
||||||
- (BOOL) hasProductSpecificCSS;
|
- (BOOL) hasProductSpecificCSS;
|
||||||
|
|
||||||
- (NSString *) productFrameworkName;
|
|
||||||
|
|
||||||
- (void) setPopup: (BOOL) popup;
|
- (void) setPopup: (BOOL) popup;
|
||||||
- (BOOL) isPopup;
|
- (BOOL) isPopup;
|
||||||
|
|
||||||
|
|
|
@ -23,8 +23,10 @@
|
||||||
#import <NGObjWeb/SoComponent.h>
|
#import <NGObjWeb/SoComponent.h>
|
||||||
#import <NGObjWeb/WOComponent.h>
|
#import <NGObjWeb/WOComponent.h>
|
||||||
|
|
||||||
|
#import <SoObjects/SOGo/SOGoUser.h>
|
||||||
|
#import <SoObjects/SOGo/NSDictionary+Utilities.h>
|
||||||
|
|
||||||
#import <SOGoUI/UIxComponent.h>
|
#import <SOGoUI/UIxComponent.h>
|
||||||
#import <SOGo/SOGoUser.h>
|
|
||||||
|
|
||||||
#import <Main/build.h>
|
#import <Main/build.h>
|
||||||
|
|
||||||
|
@ -166,6 +168,40 @@
|
||||||
|
|
||||||
/* page based JavaScript */
|
/* page based JavaScript */
|
||||||
|
|
||||||
|
- (NSString *) _stringsForFramework: (NSString *) framework
|
||||||
|
{
|
||||||
|
NSDictionary *table;
|
||||||
|
NSString *language, *frameworkName;
|
||||||
|
|
||||||
|
frameworkName = [NSString stringWithFormat: @"%@.SOGo",
|
||||||
|
(framework ? framework : [self frameworkName])];
|
||||||
|
language = [[context activeUser] language];
|
||||||
|
table
|
||||||
|
= [[self resourceManager] stringTableWithName: @"Localizable"
|
||||||
|
inFramework: frameworkName
|
||||||
|
languages: [NSArray arrayWithObject: language]];
|
||||||
|
/* table is not really an NSDict44ionary but a hackish variation thereof */
|
||||||
|
table = [NSDictionary dictionaryWithDictionary: table];
|
||||||
|
|
||||||
|
return [table jsonRepresentation];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (NSString *) commonLocalizableStrings
|
||||||
|
{
|
||||||
|
return [NSString stringWithFormat: @"var clabels = %@;",
|
||||||
|
[self _stringsForFramework: nil]];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (NSString *) productLocalizableStrings
|
||||||
|
{
|
||||||
|
NSString *frameworkName;
|
||||||
|
|
||||||
|
frameworkName = [[context page] frameworkName];
|
||||||
|
|
||||||
|
return [NSString stringWithFormat: @"var labels = %@;",
|
||||||
|
[self _stringsForFramework: frameworkName]];
|
||||||
|
}
|
||||||
|
|
||||||
- (NSString *) pageJavaScriptURL
|
- (NSString *) pageJavaScriptURL
|
||||||
{
|
{
|
||||||
WOComponent *page;
|
WOComponent *page;
|
||||||
|
@ -190,15 +226,6 @@
|
||||||
return [self urlForResourceFilename: fwJSFilename];
|
return [self urlForResourceFilename: fwJSFilename];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSString *) productFrameworkName
|
|
||||||
{
|
|
||||||
WOComponent *page;
|
|
||||||
|
|
||||||
page = [context page];
|
|
||||||
|
|
||||||
return [NSString stringWithFormat: @"%@.SOGo", [page frameworkName]];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (BOOL) hasPageSpecificJavaScript
|
- (BOOL) hasPageSpecificJavaScript
|
||||||
{
|
{
|
||||||
return ([[self pageJavaScriptURL] length] > 0);
|
return ([[self pageJavaScriptURL] length] > 0);
|
||||||
|
@ -300,5 +327,4 @@
|
||||||
return [cc isMacBrowser];
|
return [cc isMacBrowser];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@end /* UIxPageFrame */
|
@end /* UIxPageFrame */
|
||||||
|
|
|
@ -42,6 +42,8 @@
|
||||||
const:negate="YES"
|
const:negate="YES"
|
||||||
>var UserFolderURL = '<var:string value="userFolderPath" />';
|
>var UserFolderURL = '<var:string value="userFolderPath" />';
|
||||||
var UserLogin = '<var:string value="shortUserNameForDisplay" />';</var:if>
|
var UserLogin = '<var:string value="shortUserNameForDisplay" />';</var:if>
|
||||||
|
<var:string value="commonLocalizableStrings" const:escapeHTML="NO"/>
|
||||||
|
<var:string value="productLocalizableStrings" const:escapeHTML="NO"/>
|
||||||
</script>
|
</script>
|
||||||
<script type="text/javascript" rsrc:src="events.js"><!-- space required --></script>
|
<script type="text/javascript" rsrc:src="events.js"><!-- space required --></script>
|
||||||
<script type="text/javascript" rsrc:src="prototype.js"><!-- space required --></script>
|
<script type="text/javascript" rsrc:src="prototype.js"><!-- space required --></script>
|
||||||
|
@ -55,15 +57,11 @@
|
||||||
<script type="text/javascript" rsrc:src="generic.js"><!-- space required --></script>
|
<script type="text/javascript" rsrc:src="generic.js"><!-- space required --></script>
|
||||||
<script type="text/javascript" rsrc:src="SOGoDragAndDrop.js"><!-- space required --></script>
|
<script type="text/javascript" rsrc:src="SOGoDragAndDrop.js"><!-- space required --></script>
|
||||||
<script type="text/javascript" rsrc:src="SOGoDragHandles.js"><!-- space required --></script>
|
<script type="text/javascript" rsrc:src="SOGoDragHandles.js"><!-- space required --></script>
|
||||||
|
|
||||||
<var:if condition="hasProductSpecificJavaScript"><script type="text/javascript"
|
<var:if condition="hasProductSpecificJavaScript"><script type="text/javascript"
|
||||||
var:src="productJavaScriptURL"><!-- space required --></script></var:if>
|
var:src="productJavaScriptURL"><!-- space required --></script></var:if>
|
||||||
<var:if condition="hasPageSpecificJavaScript"><script type="text/javascript"
|
<var:if condition="hasPageSpecificJavaScript"><script type="text/javascript"
|
||||||
var:src="pageJavaScriptURL"><!-- space required --></script></var:if>
|
var:src="pageJavaScriptURL"><!-- space required --></script></var:if>
|
||||||
<var:js-stringtable
|
|
||||||
var:framework="productFrameworkName"
|
|
||||||
const:identifier="labels" />
|
|
||||||
<var:js-stringtable
|
|
||||||
const:identifier="clabels" />
|
|
||||||
<var:if condition="shortUserNameForDisplay" const:value="anonymous"
|
<var:if condition="shortUserNameForDisplay" const:value="anonymous"
|
||||||
const:negate="YES"
|
const:negate="YES"
|
||||||
><var:if condition="shortUserNameForDisplay" const:value="wrongusernamepassword"
|
><var:if condition="shortUserNameForDisplay" const:value="wrongusernamepassword"
|
||||||
|
|
|
@ -301,7 +301,7 @@ function onMenuWriteToContact(event) {
|
||||||
var emailCell = contactRow.down('td', 1);
|
var emailCell = contactRow.down('td', 1);
|
||||||
|
|
||||||
if (!emailCell.firstChild) { // .nodeValue is the contact email address
|
if (!emailCell.firstChild) { // .nodeValue is the contact email address
|
||||||
window.alert(labels["The selected contact has no email address."].decodeEntities());
|
window.alert(labels["The selected contact has no email address."]);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -343,7 +343,7 @@ function onToolbarWriteToSelectedContacts(event) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rowsWithEmail == 0) {
|
if (rowsWithEmail == 0) {
|
||||||
window.alert(labels["The selected contact has no email address."].decodeEntities());
|
window.alert(labels["The selected contact has no email address."]);
|
||||||
}
|
}
|
||||||
else if (document.body.hasClassName("popup"))
|
else if (document.body.hasClassName("popup"))
|
||||||
window.close();
|
window.close();
|
||||||
|
|
|
@ -999,7 +999,7 @@ function folderSubscriptionCallback(http) {
|
||||||
http.callbackData["method"](http.callbackData["data"]);
|
http.callbackData["method"](http.callbackData["data"]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
window.alert(clabels["Unable to subscribe to that folder!"].decodeEntities());
|
window.alert(clabels["Unable to subscribe to that folder!"]);
|
||||||
document.subscriptionAjaxRequest = null;
|
document.subscriptionAjaxRequest = null;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1025,7 +1025,7 @@ function subscribeToFolder(refreshCallback, refreshCallbackData) {
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
refreshCallbackData["window"].alert(clabels["You cannot subscribe to a folder that you own!"]
|
refreshCallbackData["window"].alert(clabels["You cannot subscribe to a folder that you own!"]
|
||||||
.decodeEntities());
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function folderUnsubscriptionCallback(http) {
|
function folderUnsubscriptionCallback(http) {
|
||||||
|
@ -1035,7 +1035,7 @@ function folderUnsubscriptionCallback(http) {
|
||||||
http.callbackData["method"](http.callbackData["data"]);
|
http.callbackData["method"](http.callbackData["data"]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
window.alert(clabels["Unable to unsubscribe from that folder!"].decodeEntities());
|
window.alert(clabels["Unable to unsubscribe from that folder!"]);
|
||||||
document.unsubscriptionAjaxRequest = null;
|
document.unsubscriptionAjaxRequest = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1061,7 +1061,7 @@ function unsubscribeFromFolder(folder, refreshCallback, refreshCallbackData) {
|
||||||
rfCbData);
|
rfCbData);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
window.alert(clabels["You cannot unsubscribe from a folder that you own!"].decodeEntities());
|
window.alert(clabels["You cannot unsubscribe from a folder that you own!"]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1337,25 +1337,12 @@ function onLoadHandler(event) {
|
||||||
initTabs();
|
initTabs();
|
||||||
configureDragHandles();
|
configureDragHandles();
|
||||||
configureLinkBanner();
|
configureLinkBanner();
|
||||||
translateLabels();
|
|
||||||
var progressImage = $("progressIndicator");
|
var progressImage = $("progressIndicator");
|
||||||
if (progressImage)
|
if (progressImage)
|
||||||
progressImage.parentNode.removeChild(progressImage);
|
progressImage.parentNode.removeChild(progressImage);
|
||||||
Event.observe(document.body, "contextmenu", onBodyClickContextMenu);
|
Event.observe(document.body, "contextmenu", onBodyClickContextMenu);
|
||||||
}
|
}
|
||||||
|
|
||||||
function translateLabels() {
|
|
||||||
if (typeof labels != "undefined") {
|
|
||||||
for (var key in labels)
|
|
||||||
labels[key] = labels[key].decodeEntities();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (typeof clabels != "undefined") {
|
|
||||||
for (var key in clabels)
|
|
||||||
clabels[key] = clabels[key].decodeEntities();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function onBodyClickContextMenu(event) {
|
function onBodyClickContextMenu(event) {
|
||||||
preventDefault(event);
|
preventDefault(event);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue