merge of 'b5081fb240f719d3a1ce2583dff3738a9ceb9d93'
and 'f3553f7157471c92e062fbcc05707ec8f12c2df5' Monotone-Parent: b5081fb240f719d3a1ce2583dff3738a9ceb9d93 Monotone-Parent: f3553f7157471c92e062fbcc05707ec8f12c2df5 Monotone-Revision: a91fdc0311ce32c507f4f0c447904b80ca61e876 Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2008-09-29T14:36:59 Monotone-Branch: ca.inverse.sogo
@@ -650,7 +650,7 @@ DIV.quota DIV.level
|
||||
background-position: 25% 0;
|
||||
border-left: 1px solid #999;
|
||||
border-right: 1px solid #999;
|
||||
height: 20px; }
|
||||
/*height: 20px;*/ }
|
||||
DIV.quota DIV.marks DIV
|
||||
{ float: left;
|
||||
margin: 0;
|
||||
@@ -658,11 +658,11 @@ DIV.quota DIV.marks DIV
|
||||
width: 25%;
|
||||
border: 0;
|
||||
border-right: 1px solid #999;
|
||||
height: 5px; }
|
||||
height: 3px; }
|
||||
DIV.quota DIV.level DIV.value
|
||||
{ background-repeat: repeat-x;
|
||||
border-left: 1px solid transparent;
|
||||
height: 15px;
|
||||
height: 9px;
|
||||
margin: 0;
|
||||
position: relative; }
|
||||
DIV.quota DIV.level DIV.value.ok
|
||||
@@ -670,7 +670,15 @@ DIV.quota DIV.level DIV.value.ok
|
||||
DIV.quota DIV.level DIV.value.warn
|
||||
{ background-image: url(quota-level-warn.png); }
|
||||
DIV.quota DIV.level DIV.value.alert
|
||||
{ background-image: url(quota-level-alert.png); }
|
||||
{ background-image: url(quota-level-alert.png); }
|
||||
DIV.quota DIV.level P
|
||||
{ margin: 0;
|
||||
padding: 0;
|
||||
clear: both;
|
||||
color: #555;
|
||||
font-size: 1em;
|
||||
text-align: center;
|
||||
}
|
||||
DIV#quotaDialog
|
||||
{ background-image: url("dialog-left.png");
|
||||
background-repeat: no-repeat;
|
||||
|
||||
@@ -1373,39 +1373,29 @@ function updateMailboxTreeInPage() {
|
||||
}
|
||||
}
|
||||
if (Mailer.quotas) {
|
||||
// Build quota indicator
|
||||
// Build quota indicator, show values in MB
|
||||
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(Mailer.quotas.usedSpace, Mailer.quotas.maxQuota, percents);
|
||||
var text = format.formatted(percents,
|
||||
Math.round(Mailer.quotas.maxQuota/10.24)/100);
|
||||
var quotaDiv = new Element('div', { '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' });
|
||||
var textP = new Element('p').update(text);
|
||||
marksDiv.appendChild(new Element('div'));
|
||||
marksDiv.appendChild(new Element('div'));
|
||||
marksDiv.appendChild(new Element('div'));
|
||||
levelDiv.appendChild(valueDiv);
|
||||
levelDiv.appendChild(marksDiv);
|
||||
levelDiv.appendChild(textP);
|
||||
quotaDiv.appendChild(levelDiv);
|
||||
|
||||
treeContent.insertBefore(quotaDiv, tree);
|
||||
quotaDiv.observe("mouseover", onViewQuota);
|
||||
quotaDiv.observe("mouseout", function(event) { $("quotaDialog").hide(); });
|
||||
}
|
||||
}
|
||||
|
||||
function onViewQuota(event) {
|
||||
var div = $("quotaDialog");
|
||||
if (div.visible()) return;
|
||||
var position = this.cumulativeOffset();
|
||||
position[0] += this.getWidth();
|
||||
div.down("p").update(this.readAttribute("info"));
|
||||
div.setStyle({ left: position[0] + "px",
|
||||
top: position[1] + "px" });
|
||||
div.show();
|
||||
}
|
||||
|
||||
function mailboxMenuNode(type, name) {
|
||||
var newNode = document.createElement("li");
|
||||
var icon = MailerUIdTreeExtension.folderIcons[type];
|
||||
|
||||
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 3.9 KiB |