NEWS
Monotone-Parent: c465e35fc5f42324c08780dae83f7d225dca6e6a Monotone-Revision: b3afbde30d88c6ea366307b2bb45202fe90bd36f Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2008-09-26T21:08:26 Monotone-Branch: ca.inverse.sogomaint-2.0.2
5
NEWS
|
@ -1,3 +1,8 @@
|
|||
1.0-2008XXYY (1.0)
|
||||
------------------
|
||||
- added quota indicator in web mail module
|
||||
- improved drag handles behavior
|
||||
|
||||
1.0-20080826 (1.0 rc8)
|
||||
----------------------
|
||||
- fixed a bug that would prevent deleted event and tasks from being removed from the events and tasks list
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#import <Foundation/NSDictionary.h>
|
||||
#import <Foundation/NSEnumerator.h>
|
||||
#import <Foundation/NSString.h>
|
||||
#import <Foundation/NSUserDefaults.h>
|
||||
|
||||
#import <NGObjWeb/NSException+HTTP.h>
|
||||
#import <NGObjWeb/WOApplication.h>
|
||||
|
@ -187,8 +188,10 @@
|
|||
NSEnumerator *oldRecords;
|
||||
NSDictionary *oldRecord;
|
||||
NSMutableDictionary *newRecord;
|
||||
NSString *data;
|
||||
NSString *data, *contactInfo;
|
||||
NSUserDefaults *ud;
|
||||
|
||||
ud = [NSUserDefaults standardUserDefaults];
|
||||
newRecords = [[NSMutableArray alloc] initWithCapacity: [records count]];
|
||||
[newRecords autorelease];
|
||||
|
||||
|
@ -237,6 +240,13 @@
|
|||
data = @"";
|
||||
[newRecord setObject: data forKey: @"phone"];
|
||||
|
||||
contactInfo = [ud stringForKey: @"SOGoLDAPContactInfoAttribute"];
|
||||
if ([contactInfo length] > 0) {
|
||||
data = [oldRecord objectForKey: contactInfo];
|
||||
if ([data length] > 0)
|
||||
[newRecord setObject: data forKey: @"contactInfo"];
|
||||
}
|
||||
|
||||
[newRecords addObject: newRecord];
|
||||
oldRecord = [oldRecords nextObject];
|
||||
}
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#import <Foundation/NSArray.h>
|
||||
#import <Foundation/NSDictionary.h>
|
||||
#import <Foundation/NSString.h>
|
||||
#import <Foundation/NSUserDefaults.h>
|
||||
|
||||
#import <EOControl/EOControl.h>
|
||||
#import <NGLdap/NGLdapConnection.h>
|
||||
|
@ -394,8 +395,12 @@ static int sizeLimit;
|
|||
|
||||
- (NSArray *) _searchAttributes
|
||||
{
|
||||
NSUserDefaults *ud;
|
||||
NSString *contactInfo;
|
||||
|
||||
if (!searchAttributes)
|
||||
{
|
||||
ud = [NSUserDefaults standardUserDefaults];
|
||||
searchAttributes = [NSMutableArray new];
|
||||
if (CNField)
|
||||
[searchAttributes addObject: CNField];
|
||||
|
@ -404,6 +409,12 @@ static int sizeLimit;
|
|||
[searchAttributes addObjectsFromArray: mailFields];
|
||||
[searchAttributes addObjectsFromArray: [self _contraintsFields]];
|
||||
[searchAttributes addObjectsFromArray: commonSearchFields];
|
||||
|
||||
// Add SOGoLDAPContactInfoAttribute from user defaults
|
||||
contactInfo = [ud stringForKey: @"SOGoLDAPContactInfoAttribute"];
|
||||
if ([contactInfo length] > 0 &&
|
||||
![searchAttributes containsObject: contactInfo])
|
||||
[searchAttributes addObject: contactInfo];
|
||||
}
|
||||
|
||||
return searchAttributes;
|
||||
|
|
|
@ -203,7 +203,7 @@
|
|||
"Operation failed" = "Operatie mislukt.";
|
||||
|
||||
"Quota" = "Quota";
|
||||
"quotasFormat" = "%{0} van %{1} KB gebruikt (%{2}%)";
|
||||
"quotasFormat" = "%{0}% van %{1} MB gebruikt";
|
||||
|
||||
"Please select a message." = "Selecteer een bericht.";
|
||||
"Please select a message to print." = "Selecteer een bericht om af te drukken.";
|
||||
|
|
|
@ -218,8 +218,8 @@
|
|||
= "Do you really want to move this folder into the trash ?";
|
||||
"Operation failed" = "Operation failed";
|
||||
|
||||
"Quota" = "Quota";
|
||||
"quotasFormat" = "%{0} used on %{1} Kb (%{2}%)";
|
||||
"Quota" = "Quota:";
|
||||
"quotasFormat" = "%{0}% used on %{1} MB";
|
||||
|
||||
"Please select a message." = "Please select a message.";
|
||||
"Please select a message to print." = "Please select a message to print.";
|
||||
|
|
|
@ -220,7 +220,7 @@
|
|||
"Operation failed" = "L'opération a échoué.";
|
||||
|
||||
"Quota" = "Quota";
|
||||
"quotasFormat" = "%{0} Ko utilisés sur %{1} (%{2}%)";
|
||||
"quotasFormat" = "%{0}% utilisé sur %{1} MO";
|
||||
|
||||
"Please select a message." = "Veuillez sélectionner un message.";
|
||||
"Please select a message to print." = "Veuillez sélectionner un message à imprimer.";
|
||||
|
|
|
@ -203,7 +203,7 @@
|
|||
"Operation failed" = "L'opération a échoué.";
|
||||
|
||||
"Quota" = "Quota";
|
||||
"quotasFormat" = "%{0} von %{1} KB verwendet (%{2}%)";
|
||||
"quotasFormat" = "%{0}% von %{1} MB verwendet";
|
||||
|
||||
"Please select a message." = "Sie müssen eine Nachricht auswählen.";
|
||||
"Please select a message to print." = "Sie müssen eine Nachricht zum Drucken auswählen.";
|
||||
|
|
|
@ -226,7 +226,7 @@
|
|||
"Operation failed" = "Operazione non riuscita";
|
||||
|
||||
"Quota" = "Spazio usato";
|
||||
"quotasFormat" = "%{0} su %{1} Kb (%{2}%)";
|
||||
"quotasFormat" = "%{0}% usato su %{1} MB";
|
||||
|
||||
"Please select a message." = "Per favore seleziona un messaggio.";
|
||||
"Please select a message to print." = "Per favore seleziona un messaggio da stampare.";
|
||||
|
|
|
@ -222,7 +222,7 @@
|
|||
"Operation failed" = "Operación fallida";
|
||||
|
||||
"Quota" = "Quotas";
|
||||
"quotasFormat" = "%{0} de %{1} Kb usados (%{2}%)";
|
||||
"quotasFormat" = "%{0}% de %{1} MB usados";
|
||||
|
||||
"Please select a message." = "Seleccione un mensaje primero.";
|
||||
"Please select a message to print." = "Seleccione el mensaje que desea imprimir.";
|
||||
|
|
|
@ -134,7 +134,7 @@
|
|||
NSString *inboxName;
|
||||
NSUserDefaults *ud;
|
||||
WOResponse *response;
|
||||
int quota;
|
||||
float quota;
|
||||
|
||||
ud = [NSUserDefaults standardUserDefaults];
|
||||
co = [self clientObject];
|
||||
|
@ -143,18 +143,21 @@
|
|||
folders = [self _jsonFolders: rawFolders];
|
||||
|
||||
// Retrieve INBOX quota
|
||||
quota = [ud integerForKey: @"SOGoSoftQuota"];
|
||||
quota = [ud floatForKey: @"SOGoSoftQuotaRatio"];
|
||||
inbox = [co inboxFolderInContext: context];
|
||||
inboxName = [NSString stringWithFormat: @"/%@", [inbox relativeImap4Name]];
|
||||
client = [[inbox imap4Connection] client];
|
||||
infos = [[client getQuotaRoot: [inbox relativeImap4Name]] objectForKey: @"quotas"];
|
||||
inboxQuota = [infos objectForKey: inboxName];
|
||||
if (quota > 0 && inboxQuota != nil)
|
||||
// A soft quota is imposed for all users
|
||||
inboxQuota = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
[NSNumber numberWithInt: quota], @"maxQuota",
|
||||
[inboxQuota objectForKey: @"usedSpace"], @"usedSpace",
|
||||
nil];
|
||||
if (quota != 0 && inboxQuota != nil)
|
||||
{
|
||||
// A soft quota ration is imposed for all users
|
||||
quota = quota * [(NSNumber*)[inboxQuota objectForKey: @"maxQuota"] intValue];
|
||||
inboxQuota = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
[NSNumber numberWithFloat: (long)(quota+0.5)], @"maxQuota",
|
||||
[inboxQuota objectForKey: @"usedSpace"], @"usedSpace",
|
||||
nil];
|
||||
}
|
||||
data = [NSDictionary dictionaryWithObjectsAndKeys: folders, @"mailboxes",
|
||||
inboxQuota, @"quotas",
|
||||
nil];
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
*/
|
||||
|
||||
#import <Foundation/NSEnumerator.h>
|
||||
#import <Foundation/NSUserDefaults.h>
|
||||
#import <Foundation/NSValue.h>
|
||||
|
||||
#import <NGCards/NGVCard.h>
|
||||
|
@ -150,8 +149,8 @@
|
|||
- (id <WOActionResults>) composeAction
|
||||
{
|
||||
id <SOGoContactObject> contact;
|
||||
NSArray *accounts, *contactsId;
|
||||
NSString *firstAccount, *newLocation, *parameters, *folderId, *uid, *email, *n;
|
||||
NSArray *accounts, *contactsId, *n;
|
||||
NSString *firstAccount, *newLocation, *parameters, *folderId, *uid, *email;
|
||||
NSMutableString *fn;
|
||||
NSEnumerator *uids;
|
||||
NSMutableArray *addresses;
|
||||
|
|
|
@ -191,13 +191,6 @@
|
|||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="quotaDialog" style="display: none;">
|
||||
<div>
|
||||
<h1><var:string label:value="Quota"/></h1>
|
||||
<p><!-- space --></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="leftPanel">
|
||||
<div class="titlediv"><var:string label:value="Folders" /></div>
|
||||
<div id="folderTreeContent"><!-- space --></div>
|
||||
|
|
|
@ -650,7 +650,7 @@ DIV.quota DIV.level
|
|||
background-position: 25% 0;
|
||||
border-left: 1px solid #999;
|
||||
border-right: 1px solid #999;
|
||||
height: 20px; }
|
||||
/*height: 20px;*/ }
|
||||
DIV.quota DIV.marks DIV
|
||||
{ float: left;
|
||||
margin: 0;
|
||||
|
@ -658,11 +658,11 @@ DIV.quota DIV.marks DIV
|
|||
width: 25%;
|
||||
border: 0;
|
||||
border-right: 1px solid #999;
|
||||
height: 5px; }
|
||||
height: 3px; }
|
||||
DIV.quota DIV.level DIV.value
|
||||
{ background-repeat: repeat-x;
|
||||
border-left: 1px solid transparent;
|
||||
height: 15px;
|
||||
height: 9px;
|
||||
margin: 0;
|
||||
position: relative; }
|
||||
DIV.quota DIV.level DIV.value.ok
|
||||
|
@ -671,6 +671,14 @@ DIV.quota DIV.level DIV.value.warn
|
|||
{ background-image: url(quota-level-warn.png); }
|
||||
DIV.quota DIV.level DIV.value.alert
|
||||
{ background-image: url(quota-level-alert.png); }
|
||||
DIV.quota DIV.level P
|
||||
{ margin: 0;
|
||||
padding: 0;
|
||||
clear: both;
|
||||
color: #555;
|
||||
font-size: 1em;
|
||||
text-align: center;
|
||||
}
|
||||
DIV#quotaDialog
|
||||
{ background-image: url("dialog-left.png");
|
||||
background-repeat: no-repeat;
|
||||
|
|
|
@ -1373,39 +1373,29 @@ function updateMailboxTreeInPage() {
|
|||
}
|
||||
}
|
||||
if (Mailer.quotas) {
|
||||
// Build quota indicator
|
||||
// Build quota indicator, show values in MB
|
||||
var percents = (Math.round(Mailer.quotas.usedSpace * 10000 / Mailer.quotas.maxQuota) / 100);
|
||||
var level = (percents > 85)? "alert" : (percents > 70)? "warn" : "ok";
|
||||
var format = labels["quotasFormat"];
|
||||
var text = format.formatted(Mailer.quotas.usedSpace, Mailer.quotas.maxQuota, percents);
|
||||
var text = format.formatted(percents,
|
||||
Math.round(Mailer.quotas.maxQuota/10.24)/100);
|
||||
var quotaDiv = new Element('div', { 'class': 'quota', 'info': text });
|
||||
var levelDiv = new Element('div', { 'class': 'level' });
|
||||
var valueDiv = new Element('div', { 'class': 'value ' + level, 'style': 'width: ' + ((percents > 100)?100:percents) + '%' });
|
||||
var marksDiv = new Element('div', { 'class': 'marks' });
|
||||
var textP = new Element('p').update(text);
|
||||
marksDiv.appendChild(new Element('div'));
|
||||
marksDiv.appendChild(new Element('div'));
|
||||
marksDiv.appendChild(new Element('div'));
|
||||
levelDiv.appendChild(valueDiv);
|
||||
levelDiv.appendChild(marksDiv);
|
||||
levelDiv.appendChild(textP);
|
||||
quotaDiv.appendChild(levelDiv);
|
||||
|
||||
treeContent.insertBefore(quotaDiv, tree);
|
||||
quotaDiv.observe("mouseover", onViewQuota);
|
||||
quotaDiv.observe("mouseout", function(event) { $("quotaDialog").hide(); });
|
||||
}
|
||||
}
|
||||
|
||||
function onViewQuota(event) {
|
||||
var div = $("quotaDialog");
|
||||
if (div.visible()) return;
|
||||
var position = this.cumulativeOffset();
|
||||
position[0] += this.getWidth();
|
||||
div.down("p").update(this.readAttribute("info"));
|
||||
div.setStyle({ left: position[0] + "px",
|
||||
top: position[1] + "px" });
|
||||
div.show();
|
||||
}
|
||||
|
||||
function mailboxMenuNode(type, name) {
|
||||
var newNode = document.createElement("li");
|
||||
var icon = MailerUIdTreeExtension.folderIcons[type];
|
||||
|
|
|
@ -437,6 +437,12 @@ function performSearchCallback(http) {
|
|||
list.appendChild(node);
|
||||
node.uid = contact["c_uid"];
|
||||
node.appendChild(document.createTextNode(completeEmail));
|
||||
log($H(contact).inspect() + "");
|
||||
if (contact["contactInfo"]) {
|
||||
var info = new Element('span').update(contact['contactInfo']);
|
||||
node.appendChild(info);
|
||||
log ("info = " + contact['contactInfo']);
|
||||
}
|
||||
$(node).observe("mousedown", onAddressResultClick);
|
||||
}
|
||||
|
||||
|
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 3.9 KiB |