mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-10 07:48:52 +00:00
merge of '3a5f7ecea6abc6df1d89a08f33863028e17c287c'
and 'c8a36e926bc75ffc1d4206737365b76d6621e3ab' Monotone-Parent: 3a5f7ecea6abc6df1d89a08f33863028e17c287c Monotone-Parent: c8a36e926bc75ffc1d4206737365b76d6621e3ab Monotone-Revision: ebe63ce53628359dd83606f2bb756f112a053f66 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-02-11T02:48:41 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
14
ChangeLog
14
ChangeLog
@@ -46,6 +46,20 @@
|
||||
* UI/Scheduler/UIxAppointmentActions.[hm]: new module implementing
|
||||
a WODirectAction class for ajax calls for appointments.
|
||||
|
||||
2010-02-08 Francis Lachapelle <flachapelle@inverse.ca>
|
||||
|
||||
* UI/Contacts/UIxContactFoldersView.m (-verticalDragHandleStyle):
|
||||
new method (was missing), borrowed from UIxCalMainView.m.
|
||||
(-horizontalDragHandleStyle): idem.
|
||||
(contactsListContentStyle): idem.
|
||||
|
||||
* UI/WebServerResources/ContactsUI.js (-onAddressBookRemove):
|
||||
avoid selecting the personal addressbook prior to obtaining the
|
||||
user's answer.
|
||||
|
||||
* UI/MailerUI/UIxMailListView.m (-messageSize): improved
|
||||
formatting of message size.
|
||||
|
||||
2010-02-03 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* UI/MainUI/SOGoRootPage.m (-_standardDefaultAction): add an
|
||||
|
||||
1
NEWS
1
NEWS
@@ -1,6 +1,7 @@
|
||||
1.2-2010XXXX (1.2.X)
|
||||
--------------------
|
||||
- added CAS authentication support
|
||||
- improved display of message size in webmail
|
||||
|
||||
1.2-20100125 (1.2.0)
|
||||
--------------------
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
NSString *selectorComponentClass;
|
||||
NSMutableDictionary *moduleSettings;
|
||||
id currentFolder;
|
||||
BOOL contextIsSetup;
|
||||
}
|
||||
|
||||
- (NSArray *) contactFolders;
|
||||
|
||||
@@ -53,22 +53,34 @@
|
||||
|
||||
@implementation UIxContactFoldersView
|
||||
|
||||
- (id) init
|
||||
{
|
||||
if ((self = [super init]))
|
||||
contextIsSetup = NO;
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void) _setupContext
|
||||
{
|
||||
SOGoUser *activeUser;
|
||||
NSString *module;
|
||||
SOGoContactFolders *clientObject;
|
||||
|
||||
activeUser = [context activeUser];
|
||||
clientObject = [self clientObject];
|
||||
|
||||
module = [clientObject nameInContainer];
|
||||
|
||||
us = [activeUser userSettings];
|
||||
moduleSettings = [us objectForKey: module];
|
||||
if (!moduleSettings)
|
||||
moduleSettings = [NSMutableDictionary dictionary];
|
||||
[us setObject: moduleSettings forKey: module];
|
||||
if (!contextIsSetup)
|
||||
{
|
||||
activeUser = [context activeUser];
|
||||
clientObject = [self clientObject];
|
||||
|
||||
module = [clientObject nameInContainer];
|
||||
|
||||
us = [activeUser userSettings];
|
||||
moduleSettings = [us objectForKey: module];
|
||||
if (!moduleSettings)
|
||||
moduleSettings = [NSMutableDictionary dictionary];
|
||||
[us setObject: moduleSettings forKey: module];
|
||||
contextIsSetup = YES;
|
||||
}
|
||||
}
|
||||
|
||||
- (id <WOActionResults>) mailerContactsAction
|
||||
@@ -411,6 +423,36 @@
|
||||
return ([currentFolder isKindOfClass: [SOGoContactSourceFolder class]]? @"remote" : @"local");
|
||||
}
|
||||
|
||||
- (NSString *) verticalDragHandleStyle
|
||||
{
|
||||
NSString *vertical;
|
||||
|
||||
[self _setupContext];
|
||||
vertical = [moduleSettings objectForKey: @"DragHandleVertical"];
|
||||
|
||||
return ((vertical && [vertical intValue] > 0) ? (id)[vertical stringByAppendingFormat: @"px"] : nil);
|
||||
}
|
||||
|
||||
- (NSString *) horizontalDragHandleStyle
|
||||
{
|
||||
NSString *horizontal;
|
||||
|
||||
[self _setupContext];
|
||||
horizontal = [moduleSettings objectForKey: @"DragHandleHorizontal"];
|
||||
|
||||
return ((horizontal && [horizontal intValue] > 0) ? (id)[horizontal stringByAppendingFormat: @"px"] : nil);
|
||||
}
|
||||
|
||||
- (NSString *) contactsListContentStyle
|
||||
{
|
||||
NSString *height;
|
||||
|
||||
[self _setupContext];
|
||||
height = [moduleSettings objectForKey: @"DragHandleVertical"];
|
||||
|
||||
return ((height && [height intValue] > 0) ? [NSString stringWithFormat: @"%ipx", ([height intValue] - 27)] : nil);
|
||||
}
|
||||
|
||||
- (WOResponse *) saveDragHandleStateAction
|
||||
{
|
||||
WORequest *request;
|
||||
|
||||
@@ -119,9 +119,13 @@
|
||||
int size;
|
||||
|
||||
size = [[message valueForKey: @"size"] intValue];
|
||||
|
||||
rc = [NSString stringWithFormat: @"%dK", size/1024];
|
||||
|
||||
if (size > 1024*1024)
|
||||
rc = [NSString stringWithFormat: @"%.1f MB", (float) size/1024/1024];
|
||||
else if (size > 1024*100)
|
||||
rc = [NSString stringWithFormat: @"%d KB", size/1024];
|
||||
else
|
||||
rc = [NSString stringWithFormat: @"%.1f KB", (float) size/1024];
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
@@ -680,7 +680,9 @@ function onAddressBookAdd(event) {
|
||||
|
||||
function onFolderUnsubscribeCB(folderId) {
|
||||
var node = $(folderId);
|
||||
node.deselect();
|
||||
node.parentNode.removeChild(node);
|
||||
|
||||
var personal = $("/personal");
|
||||
personal.selectElement();
|
||||
onFolderSelectionChange();
|
||||
@@ -740,7 +742,6 @@ function onAddressBookRemove(event) {
|
||||
var nodes = selector.getSelectedNodes();
|
||||
if (nodes.length > 0) {
|
||||
var node = $(nodes[0]);
|
||||
node.deselect();
|
||||
var owner = node.getAttribute("owner");
|
||||
if (owner == "nobody") {
|
||||
var label = getLabel("You cannot remove nor unsubscribe from a public addressbook.");
|
||||
@@ -750,9 +751,6 @@ function onAddressBookRemove(event) {
|
||||
var folderIdElements = node.getAttribute("id").split(":");
|
||||
var abId = folderIdElements[0].substr(1);
|
||||
deletePersonalAddressBook(abId);
|
||||
var personal = $("/personal");
|
||||
personal.selectElement();
|
||||
onFolderSelectionChange();
|
||||
}
|
||||
else {
|
||||
var folderId = node.getAttribute("id");
|
||||
@@ -796,12 +794,16 @@ function deletePersonalAddressBookCallback(http) {
|
||||
while (!done && i < children.length) {
|
||||
var currentFolderId = children[i].getAttribute("id").substr(1);
|
||||
if (currentFolderId == http.callbackData) {
|
||||
children[i].deselect();
|
||||
ul.removeChild(children[i]);
|
||||
done = true;
|
||||
}
|
||||
else
|
||||
i++;
|
||||
}
|
||||
var personal = $("/personal");
|
||||
personal.selectElement();
|
||||
onFolderSelectionChange();
|
||||
}
|
||||
document.deletePersonalABAjaxRequest = null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user