mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-12 15:27:12 +00:00
merge of '7b8ed9c4b20f7511d8c8423f497d9006d548729d'
and 'c188de330d668938c84bba685aabd793abbfbe6a' Monotone-Parent: 7b8ed9c4b20f7511d8c8423f497d9006d548729d Monotone-Parent: c188de330d668938c84bba685aabd793abbfbe6a Monotone-Revision: ad935d05acb272f749720110ffa0a03bb52d220d Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2008-10-20T15:24:51 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
commit
01550ab6bb
6 files changed
+34
-2
No files matched your search
@@ -1,3 +1,9 @@
|
||||
2008-10-17 Francis Lachapelle <flachapelle@inverse.ca>
|
||||
|
||||
* UI/Common/UIxPageFrame.m ([NSString userLanguage]): returns the
|
||||
user's language. Used to make this information available through
|
||||
JavaScript.
|
||||
|
||||
2008-10-16 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* SoObjects/SOGo/SOGoObject.m ([SOGoObject -davURL])
|
||||
|
||||
@@ -67,6 +67,8 @@
|
||||
|
||||
- (BOOL) isSuperUser;
|
||||
|
||||
- (NSString *) userLanguage;
|
||||
|
||||
- (BOOL) isCompatibleBrowser;
|
||||
|
||||
@end
|
||||
|
||||
@@ -386,6 +386,17 @@
|
||||
return [user canAccessModule: @"Mail"];
|
||||
}
|
||||
|
||||
- (NSString *) userLanguage
|
||||
{
|
||||
NSString *language;
|
||||
|
||||
language = [[context activeUser] language];
|
||||
if (!language)
|
||||
language = [SOGoUser language];
|
||||
|
||||
return language;
|
||||
}
|
||||
|
||||
/* browser/os identification */
|
||||
|
||||
- (BOOL) isCompatibleBrowser
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
#import <SoObjects/SOGo/SOGoPermissions.h>
|
||||
#import <SoObjects/SOGo/SOGoUser.h>
|
||||
#import <SoObjects/SOGo/NSArray+Utilities.h>
|
||||
#import <SoObjects/SOGo/NSDictionary+Utilities.h>
|
||||
#import <SoObjects/SOGo/NSString+Utilities.h>
|
||||
#import <SoObjects/Contacts/SOGoContactFolders.h>
|
||||
#import <SoObjects/Contacts/SOGoContactFolder.h>
|
||||
@@ -192,6 +193,7 @@ withSearchOn: (NSString *) contact
|
||||
NSString *searchText, *mail;
|
||||
NSDictionary *contact, *data;
|
||||
NSArray *folders, *contacts, *descriptors, *sortedContacts;
|
||||
NSMutableArray *sortedFolders;
|
||||
NSMutableDictionary *uniqueContacts;
|
||||
unsigned int i, j;
|
||||
NSSortDescriptor *displayNameDescriptor;
|
||||
@@ -201,10 +203,20 @@ withSearchOn: (NSString *) contact
|
||||
{
|
||||
//NSLog(@"Search all contacts: %@", searchText);
|
||||
folders = [[self clientObject] subFolders];
|
||||
sortedFolders = [NSMutableArray arrayWithCapacity: [folders count]];
|
||||
uniqueContacts = [NSMutableDictionary dictionary];
|
||||
/* We first search in LDAP folders (in case of duplicated entries in GCS folders) */
|
||||
for (i = 0; i < [folders count]; i++)
|
||||
{
|
||||
folder = [folders objectAtIndex: i];
|
||||
if ([folder isKindOfClass: [SOGoContactLDAPFolder class]])
|
||||
[sortedFolders insertObject: folder atIndex: 0];
|
||||
else
|
||||
[sortedFolders addObject: folder];
|
||||
}
|
||||
for (i = 0; i < [sortedFolders count]; i++)
|
||||
{
|
||||
folder = [sortedFolders objectAtIndex: i];
|
||||
//NSLog(@" Address book: %@ (%@)", [folder displayName], [folder class]);
|
||||
contacts = [folder lookupContactsWithFilter: searchText
|
||||
sortBy: @"displayName"
|
||||
|
||||
@@ -109,7 +109,8 @@
|
||||
<var:if condition="shortUserNameForDisplay" const:value="anonymous"
|
||||
const:negate="YES"
|
||||
>var UserFolderURL = '<var:string value="userFolderPath" />';
|
||||
var UserLogin = '<var:string value="shortUserNameForDisplay" />';</var:if>
|
||||
var UserLogin = '<var:string value="shortUserNameForDisplay" />';
|
||||
var UserLanguage = '<var:string value="userLanguage" />';</var:if>
|
||||
<var:string value="commonLocalizableStrings" const:escapeHTML="NO"/>
|
||||
<var:string value="productLocalizableStrings" const:escapeHTML="NO"/>
|
||||
</script>
|
||||
|
||||
@@ -849,7 +849,7 @@ function loadMessage(idx) {
|
||||
|
||||
var cachedMessage = getCachedMessage(idx);
|
||||
var row = $("row_" + idx);
|
||||
var seenStateChanged = row.hasClassName('mailer_unreadmail');
|
||||
var seenStateChanged = row && row.hasClassName('mailer_unreadmail');
|
||||
if (cachedMessage == null) {
|
||||
var url = (ApplicationBaseURL + encodeURI(Mailer.currentMailbox) + "/"
|
||||
+ idx + "/view?noframe=1");
|
||||
|
||||
Reference in new issue
Block a user