From 4c6ce949d6b4cc98483ff28d1afc83da686e6365 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Thu, 23 Oct 2008 15:45:41 +0000 Subject: [PATCH] Monotone-Parent: 7e63e5fdd760a91e91ec6f1759064a5e5c2f267f Monotone-Revision: 3ad8d11f70ec6e6370751cd72269263405a290a1 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-10-23T15:45:41 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 3 +++ UI/MailerUI/UIxMailMainFrame.m | 23 ----------------------- UI/WebServerResources/MailerUI.js | 6 ++++-- 3 files changed, 7 insertions(+), 25 deletions(-) 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,