diff --git a/ChangeLog b/ChangeLog index e03ad66ed..bd51f049d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-09-21 Wolfgang Sourdeau + + * 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 * UI/Scheduler/UIxCalMainActions.m (displayNameForUrl:): The calendar's diff --git a/UI/WebServerResources/MailerUI.js b/UI/WebServerResources/MailerUI.js index 9bedb27c4..d566d05d7 100644 --- a/UI/WebServerResources/MailerUI.js +++ b/UI/WebServerResources/MailerUI.js @@ -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); } }