mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-20 10:55:25 +00:00
Monotone-Parent: 7e63e5fdd760a91e91ec6f1759064a5e5c2f267f
Monotone-Revision: 3ad8d11f70ec6e6370751cd72269263405a290a1 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-10-23T15:45:41 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
2008-10-23 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* 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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user