See ChangeLog.

Monotone-Parent: dd1c46e2753c2224bf847ca7bf850d63b8f97372
Monotone-Revision: bc1249b3296aa7dc189df755998b9d703fefd954

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2010-06-30T18:37:12
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Francis Lachapelle
2010-06-30 18:37:12 +00:00
parent e8ecf7e53b
commit 75931380bf
7 changed files with 49 additions and 11 deletions
+8
View File
@@ -1,3 +1,11 @@
2010-06-30 Francis Lachapelle <flachapelle@inverse.ca>
* UI/MailerUI/UIxMailEditor.m (-localeCode): new method that
returns the language two-letter code. Used to set the language in
the CKEditor instance in JavaScript.
* UI/PreferencesUI/UIxPreferences.m (-localeCode): idem.
2010-06-30 Ludovic Marcotte <lmarcotte@inverse.ca>
* When displaying cards, we now make sure that
+18 -1
View File
@@ -1,6 +1,6 @@
/*
Copyright (C) 2004-2005 SKYRIX Software AG
Copyright (C) 2008-2009 Inverse inc.
Copyright (C) 2008-2010 Inverse inc.
This file is part of SOGo.
@@ -32,6 +32,7 @@
form data */
#import <NGObjWeb/WORequest.h>
#undef COMPILING_NGOBJWEB
#import <NGObjWeb/WOApplication.h>
#import <NGObjWeb/WOResponse.h>
#import <NGExtensions/NSNull+misc.h>
#import <NGExtensions/NSObject+Logs.h>
@@ -44,6 +45,7 @@
#import <NGMime/NGMimeMultipartBody.h>
#import <NGMime/NGMimeType.h>
#import <SOGo/SOGoUserDefaults.h>
#import <SoObjects/Mailer/SOGoDraftObject.h>
#import <SoObjects/Mailer/SOGoMailFolder.h>
#import <SoObjects/Mailer/SOGoMailAccount.h>
@@ -53,6 +55,8 @@
#import <SoObjects/SOGo/NSDictionary+Utilities.h>
#import <SOGoUI/UIxComponent.h>
#import "../../Main/SOGo.h"
/*
UIxMailEditor
@@ -171,6 +175,19 @@ static NSArray *infoKeys = nil;
return ([to count] > 0 ? @"true" : @"false");
}
- (NSString *) localeCode
{
SOGoUserDefaults *ud;
NSDictionary *locale;
ud = [[context activeUser] userDefaults];
locale = [[WOApplication application]
localeForLanguageNamed: [ud language]];
// WARNING : NSLocaleCode is not defined in <Foundation/NSUserDefaults.h>
return [locale objectForKey: @"NSLocaleCode"];
}
- (void) setFrom: (NSString *) newFrom
{
ASSIGN (from, newFrom);
+7 -1
View File
@@ -1,6 +1,6 @@
/* UIxPreferences.m - this file is part of SOGo
*
* Copyright (C) 2007-2009 Inverse inc.
* Copyright (C) 2007-2010 Inverse inc.
*
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
*
@@ -993,6 +993,12 @@
userCanChangePassword];
}
- (NSString *) localeCode
{
// WARNING : NSLocaleCode is not defined in <Foundation/NSUserDefaults.h>
return [locale objectForKey: @"NSLocaleCode"];
}
- (NSArray *) languageCategories
{
NSArray *categoryLabels;
+1
View File
@@ -15,6 +15,7 @@
var mailIsReply = <var:string value="isMailReply"/>;
var sourceUID = <var:string value="sourceUID"/>;
var sourceFolder = '<var:string value="sourceFolder" const:escapeHTML="NO"/>';
var localeCode = '<var:string value="localeCode"/>';
</script>
<div class="popupMenu" id="contactsMenu">
<ul><!-- space --></ul>
@@ -12,6 +12,9 @@
const:popup="YES"
const:jsFiles="PasswordPolicy.js,ckeditor/ckeditor.js"
>
<script type="text/javascript">
var localeCode = '<var:string value="localeCode"/>';
</script>
<form id="mainForm" var:href="ownPath">
<div class="tabsContainer" id="preferencesTabs">
<ul>
+3 -1
View File
@@ -369,7 +369,9 @@ function initMailEditor() {
'JustifyLeft','JustifyCenter','JustifyRight',
'JustifyBlock','Font','FontSize','-','TextColor',
'BGColor']
]
],
language : localeCode,
scayt_sLang : localeCode
}
);
if (focusField == textarea)
+9 -8
View File
@@ -557,14 +557,15 @@ function onComposeMessagesTypeChange(event) {
if (!CKEDITOR.instances["signature"]) {
CKEDITOR.replace('signature',
{
height: "290px",
toolbar :
[['Bold', 'Italic', '-', 'Link',
'Font','FontSize','-','TextColor',
'BGColor']
]
}
);
height: "290px",
toolbar : [['Bold', 'Italic', '-', 'Link',
'Font','FontSize','-','TextColor',
'BGColor']
],
language : localeCode,
scayt_sLang : localeCode
}
);
}
}
}