diff --git a/ChangeLog b/ChangeLog index 0e7d46d36..00213d828 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2008-10-23 Wolfgang Sourdeau + * UI/MailerUI/UIxMailMainFrame.m ([-quotaSupport]): removed + useless method. + * SoObjects/SOGo/NSArray+Utilities.m ([NSArray -objectsForKey:keynotFoundMarker:marker]): added a "notFoundMarker:" parameter to the "objectsForKey:" method. When diff --git a/UI/MailerUI/UIxMailMainFrame.m b/UI/MailerUI/UIxMailMainFrame.m index 423d5d692..43c39e447 100644 --- a/UI/MailerUI/UIxMailMainFrame.m +++ b/UI/MailerUI/UIxMailMainFrame.m @@ -97,29 +97,6 @@ return [defaultColumnsOrder jsonRepresentation]; } -- (NSString *) quotaSupport -{ - NSEnumerator *accountNames; - NSMutableArray *quotas; - NSString *currentAccount; - SOGoMailAccounts *co; - BOOL supportsQuota; - - co = [self clientObject]; - accountNames = [[co toManyRelationshipKeys] objectEnumerator]; - - quotas = [NSMutableArray array]; - while ((currentAccount = [accountNames nextObject])) - { - supportsQuota = [[co lookupName: currentAccount - inContext: context - acquire: NO] supportsQuotas]; - [quotas addObject: [NSNumber numberWithInt: supportsQuota]]; - } - - return [quotas jsonRepresentation]; -} - - (NSString *) pageFormURL { NSString *u; diff --git a/UI/WebServerResources/MailerUI.js b/UI/WebServerResources/MailerUI.js index 19de02eb3..497637a77 100644 --- a/UI/WebServerResources/MailerUI.js +++ b/UI/WebServerResources/MailerUI.js @@ -1543,9 +1543,11 @@ function updateMailboxTreeInPage() { inboxFound = true; } } - if (Mailer.quotas) { + if (Mailer.quotas && parseInt(Mailer.quotas.maxQuota) > 0) { // Build quota indicator, show values in MB - var percents = (Math.round(Mailer.quotas.usedSpace * 10000 / Mailer.quotas.maxQuota) / 100); + 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(percents,