Monotone-Parent: 86a302b3685ff6f8b576f5b9763985c5e8ec17fb

Monotone-Revision: 58575b53d5a371c107121b592dfc764b7917d986

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2009-09-21T16:17:02
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Wolfgang Sourdeau 2009-09-21 16:17:02 +00:00
parent d498788827
commit 416b520fdf
2 changed files with 13 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2009-09-21 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* UI/WebServerResources/MailerUI.js (updateMailboxTreeInPage):
we assign the "quotaIndicator" to the quota DIV and when replacing
it, we ensure the DIV doesn't already exists.
2009-09-21 Cyril Robert <crobert@inverse.ca>
* UI/Scheduler/UIxCalMainActions.m (displayNameForUrl:): The calendar's

View File

@ -1656,6 +1656,10 @@ function updateMailboxTreeInPage() {
}
}
if (Mailer.quotas && parseInt(Mailer.quotas.maxQuota) > 0) {
var quotaDiv = $("quotaIndicator");
if (quotaDiv) {
treeContent.removeChild(quotaDiv);
}
// Build quota indicator, show values in MB
var percents = (Math.round(Mailer.quotas.usedSpace * 10000
/ Mailer.quotas.maxQuota)
@ -1664,7 +1668,9 @@ function updateMailboxTreeInPage() {
var format = getLabel("quotasFormat");
var text = format.formatted(percents,
Math.round(Mailer.quotas.maxQuota/10.24)/100);
var quotaDiv = new Element('div', { 'class': 'quota', 'info': text });
quotaDiv = new Element('div', { 'id': 'quotaIndicator',
'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' });
@ -1676,7 +1682,6 @@ function updateMailboxTreeInPage() {
levelDiv.insert(marksDiv);
levelDiv.insert(textP);
quotaDiv.insert(levelDiv);
treeContent.insertBefore(quotaDiv, tree);
}
}