Changeset 6474 for branches/2.3/expressoMail1_2/js/draw_api.js
- Timestamp:
- 06/13/12 09:30:36 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.3/expressoMail1_2/js/draw_api.js
r6064 r6474 3384 3384 div.innerHTML = '<span><font size="2" style="color:red"><strong>'+get_lang("Without Quota")+'</strong></font></span>'; 3385 3385 } 3386 else {3387 3386 else 3387 if(div) 3388 3388 div.innerHTML = ''; 3389 value = data['quota_percent']; 3389 3390 value = data['quota_percent']; 3390 3391 q_used = data['quota_used']; 3391 3392 table = document.getElementById("table_quota"); 3392 3393 if(table) 3393 3394 table.parentNode.removeChild(table); 3394 table = document.createElement("TABLE"); 3395 tbody = document.createElement("TBODY"); 3396 table.appendChild(tbody); 3397 table.id = "table_quota"; 3398 table.width="102"; 3399 table.border="0"; 3400 table.cellSpacing = 0; 3401 table.cellPadding = 0; 3402 3403 //tr1 = document.createElement("TR"); 3404 td11 = document.createElement("TD"); 3405 td11.align="center"; 3406 td11.setAttribute("noWrap","true"); 3407 td11.innerHTML += ' <span class="boxHeaderText">' + value+"% ("+borkb(q_used*1024)+"/"+borkb(q_limit*1024)+")</span>"; 3408 //tr1.appendChild(td11); 3409 3410 tr2 = document.createElement("TR"); 3411 td21 = document.createElement("TD"); 3412 td21.setAttribute("noWrap","true"); 3413 td21.height="15"; 3414 td22 = document.createElement("TD"); 3415 td21.setAttribute("background","../phpgwapi/templates/"+template+"/images/dsunused.gif"); 3416 table221 = document.createElement("TABLE"); 3417 tbody221 = document.createElement("TBODY"); 3418 table221.appendChild(tbody221); 3419 table221.style.width=value+"%"; 3420 td21.width="102"; 3421 table221.border="0"; 3422 table221.cellSpacing = 0; 3423 table221.cellPadding = 0; 3424 tr221 = document.createElement("TR"); 3425 td221 = document.createElement("TD"); 3426 td221.height="15"; 3427 if(value > 90) { 3428 if(value >= 100) 3429 write_msg(get_lang("Your Mailbox is 100% full! You must free more space or will not receive messages.")); 3430 else 3431 write_msg(get_lang("Warning: Your Mailbox is almost full!")); 3432 td221.setAttribute("background","templates/"+template+"/images/dsalert.gif"); 3433 } 3434 else if(value > 80) 3435 td221.setAttribute("background","templates/"+template+"/images/dswarn.gif"); 3436 else 3437 td221.className = 'dsused'; 3438 3439 td221.setAttribute("style","width: 100%"); 3440 3441 tr221.appendChild(td221); 3442 tbody221.appendChild(tr221); 3443 td21.appendChild(table221); 3444 tr2.appendChild(td21); 3445 tr2.appendChild(td11); 3446 3447 //tr2.appendChild(td1); 3448 3449 tbody.appendChild(tr2); //Desenho 3450 //tbody.appendChild(tr1); //Letras 3451 div.appendChild(table); 3452 } 3395 table = document.createElement("TABLE"); 3396 tbody = document.createElement("TBODY"); 3397 table.appendChild(tbody); 3398 table.id = "table_quota"; 3399 table.width="102"; 3400 table.border="0"; 3401 table.cellSpacing = 0; 3402 table.cellPadding = 0; 3403 tr2 = document.createElement("TR"); 3404 3405 if(data['quota_folder']){ 3406 td10 = document.createElement("TD"); 3407 td10.setAttribute("noWrap","true"); 3408 td10.innerHTML += '<span class="boxHeaderText"> Raiz </span>'; 3409 td11 = document.createElement("TD"); 3410 td11.setAttribute("noWrap","true"); 3411 td11.height="15"; 3412 td11.setAttribute("background","../phpgwapi/templates/"+template+"/images/dsunused.gif"); 3413 td11.width="102"; 3414 div11 = document.createElement("DIV"); 3415 div11.height="15"; 3416 if(value > 90) { 3417 if(value >= 100) 3418 write_msg(get_lang("Your Mailbox is 100% full! You must free more space or will not receive messages.")); 3419 else 3420 write_msg(get_lang("Warning: Your Mailbox is almost full!")); 3421 div11.setAttribute("background","templates/"+template+"/images/dsalert.gif"); 3422 } 3423 else if(value > 80) 3424 div11.setAttribute("background","templates/"+template+"/images/dswarn.gif"); 3425 else 3426 div11.className = 'dsused'; 3427 div11.setAttribute("style","width: 100%"); 3428 div11.className = 'dsused'; 3429 div11.style.width=value+"%"; 3430 div11.innerHTML += ' '; 3431 div11.innerHTML += value+"%"; 3432 td11.appendChild(div11); 3433 td11.style.textAlign = 'left'; 3434 td12 = document.createElement("TD"); 3435 td12.align="center"; 3436 td12.setAttribute("noWrap","true"); 3437 td12.innerHTML += ' <span class="boxHeaderText"> de ' + borkb(q_limit*1024)+"</span>"; 3438 tr2.appendChild(td10); 3439 tr2.appendChild(td11); 3440 tr2.appendChild(td12); 3441 //---------------- 3442 for(folder in data['quota_folder']){ 3443 folderName = "Arquivo Remoto"; 3444 qFolderUsed = data['quota_folder'][folder]['quota_used']; 3445 qFolderLimit = data['quota_folder'][folder]['quota_limit']; 3446 qfolderPercent = data['quota_folder'][folder]['quota_percent']; 3447 } 3448 3449 td20 = document.createElement("TD"); 3450 td20.setAttribute("noWrap","true"); 3451 td20.innerHTML += '<span class="boxHeaderText"> - '+folderName+" </span>"; 3452 3453 td21 = document.createElement("TD"); 3454 td21.setAttribute("noWrap","true"); 3455 td21.height="15"; 3456 td21.setAttribute("background","../phpgwapi/templates/"+template+"/images/dsunused.gif"); 3457 td21.width="102"; 3458 div21 = document.createElement("DIV"); 3459 div21.height="15"; 3460 if(qfolderPercent > 90) { 3461 if(qfolderPercent >= 100) 3462 write_msg(get_lang("Your Mailbox is 100% full! You must free more space or will not receive messages.")); 3463 else 3464 write_msg(get_lang("Warning: Your Mailbox is almost full!")); 3465 div21.setAttribute("background","templates/"+template+"/images/dsalert.gif"); 3466 } 3467 else if(qfolderPercent > 80) 3468 div21.setAttribute("background","templates/"+template+"/images/dswarn.gif"); 3469 else 3470 div21.className = 'dsused'; 3471 div21.setAttribute("style","width: 100%"); 3472 div21.className = 'dsused'; 3473 div21.style.width=qfolderPercent+"%"; 3474 div21.innerHTML += ' '; 3475 div21.innerHTML += qfolderPercent+"%"; 3476 td21.appendChild(div21); 3477 td21.style.textAlign = 'left'; 3478 3479 td22 = document.createElement("TD"); 3480 td22.align="center"; 3481 td22.setAttribute("noWrap","true"); 3482 td22.innerHTML += ' <span class="boxHeaderText"> de ' + borkb(qFolderLimit*1024)+"</span>"; 3483 3484 tr2.appendChild(td20); 3485 tr2.appendChild(td21); 3486 tr2.appendChild(td22); 3487 //---------------- 3488 3489 3490 }else{ 3491 //tr1 = document.createElement("TR"); 3492 td11 = document.createElement("TD"); 3493 td11.align="center"; 3494 td11.setAttribute("noWrap","true"); 3495 td11.innerHTML += ' <span class="boxHeaderText">' + value+"% ("+borkb(q_used*1024)+"/"+borkb(q_limit*1024)+")</span>"; 3496 //tr1.appendChild(td11); 3497 td21 = document.createElement("TD"); 3498 td21.setAttribute("noWrap","true"); 3499 td21.height="15"; 3500 //td22 = document.createElement("TD"); 3501 td21.setAttribute("background","../phpgwapi/templates/"+template+"/images/dsunused.gif"); 3502 table221 = document.createElement("TABLE"); 3503 tbody221 = document.createElement("TBODY"); 3504 table221.appendChild(tbody221); 3505 table221.style.width=value+"%"; 3506 td21.width="102"; 3507 table221.border="0"; 3508 table221.cellSpacing = 0; 3509 table221.cellPadding = 0; 3510 tr221 = document.createElement("TR"); 3511 td221 = document.createElement("TD"); 3512 td221.height="15"; 3513 if(value > 90) { 3514 if(value >= 100) 3515 write_msg(get_lang("Your Mailbox is 100% full! You must free more space or will not receive messages.")); 3516 else 3517 write_msg(get_lang("Warning: Your Mailbox is almost full!")); 3518 td221.setAttribute("background","templates/"+template+"/images/dsalert.gif"); 3519 } 3520 else if(value > 80) 3521 td221.setAttribute("background","templates/"+template+"/images/dswarn.gif"); 3522 else 3523 td221.className = 'dsused'; 3524 3525 td221.setAttribute("style","width: 100%"); 3526 3527 tr221.appendChild(td221); 3528 tbody221.appendChild(tr221); 3529 td21.appendChild(table221); 3530 tr2.appendChild(td21); 3531 tr2.appendChild(td11); 3532 //tr2.appendChild(td1); 3533 } 3534 tbody.appendChild(tr2); //Desenho 3535 //tbody.appendChild(tr1); //Letras 3536 div.appendChild(table); 3537 3453 3538 } 3454 3539
Note: See TracChangeset
for help on using the changeset viewer.