Changeset 5066 for branches/2.2


Ignore:
Timestamp:
09/06/11 16:43:25 (13 years ago)
Author:
alexandrecorreia
Message:

Ticket #2263 - Corrigido total usado dentro do filemanager (não estava contabilizando corretamente)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/filemanager/js/draw_api.js

    r4981 r5066  
    1  
     1         
    22var offset; 
    33var showHidden  = null; 
     
    356356        var midnight = Date.parse(now.toDateString()); 
    357357        var dtString = ""; 
    358         if (preferences.created =='1') { 
    359                 var created = new Date(); 
    360                 created.setTime(file.created*1000); 
    361                 if (created.getTime() > midnight) 
    362                         if (created.getMinutes() < 10 ) 
    363                                 dtString = created.getHours()+":0"+created.getMinutes(); 
    364                         else 
    365                                 dtString = created.getHours()+":"+created.getMinutes(); 
    366                 else { 
    367                         dtString = (created.getDate() < 10) ? "0"+created.getDate()+"/" : created.getDate()+"/"; 
    368                         dtString += (created.getMonth() < 9) ? "0" : ""; 
    369                         dtString += (created.getMonth()+1)+"/"+created.getFullYear(); 
    370                 } 
    371                 retBuff += fl.td+dtString+'</td>'; 
    372         } 
    373         if (preferences.modified =='1'){ 
    374                 var modified = new Date(); 
    375                 modified.setTime(file.modified*1000); 
    376                 if (file.modified != "") 
    377                         if (modified.getTime() > midnight) 
    378                                 if (modified.getMinutes() < 10) 
    379                                         dtString = modified.getHours()+":0"+modified.getMinutes(); 
    380                                 else 
    381                                         dtString = modified.getHours()+":"+modified.getMinutes(); 
    382                         else { 
    383                                 dtString = (modified.getDate() < 10) ? "0"+modified.getDate()+"/" : modified.getDate()+"/"; 
    384                                 dtString += (modified.getMonth() < 9) ? "0" : ""; 
    385                                 dtString += (modified.getMonth()+1)+"/"+modified.getFullYear(); 
    386                         } 
    387                 else 
    388                         dtString = ""; 
    389                 retBuff += fl.td+dtString+'</td>'; 
     358         
     359        if (preferences.created =='1') 
     360        { 
     361                retBuff += fl.td+file.created+'</td>'; 
     362        } 
     363         
     364        if ( preferences.modified =='1' ) 
     365        { 
     366                retBuff += fl.td+file.modified+'</td>'; 
    390367        } 
    391368        if (preferences.owner =='1'){ 
     
    406383        return retBuff; 
    407384} 
    408 folderList.prototype.updateQuota = function(quotaSize,usedSpace){ 
    409         if ( parseInt(quotaSize) != 0 ) 
    410         { 
    411                 var contentQuota = document.getElementById('content_quota'); 
    412                  
    413                 if ( contentQuota != null ) 
    414                 { 
    415                         contentQuota.innerHTML = '<table width="102" cellspacing="0" cellpadding="0" border="0" id="table_quota">' + 
    416                                                                          '<tbody><tr>' + 
    417                                                                          '<td width="102" nowrap="true" height="15" background="./phpgwapi/templates/default/images/dsunused.gif">' + 
    418                                                                          '<table cellspacing="0" cellpadding="0" border="0" style="width: '+parseInt((usedSpace/quotaSize)*100)+'%;">' + 
    419                                                                          '<tbody><tr><td height="15" class="dsused"/></tr></tbody></table>'+ 
    420                                                                          '</td><td nowrap="true" align="center"><span class="boxHeaderText">&nbsp;&nbsp;'+ 
    421                                                                          parseInt(usedSpace/quotaSize*100)+'% ('+borkb(usedSpace)+'/'+borkb(quotaSize)+')</span>'+ 
    422                                                                          '</td></tr></tbody></table></td></tr></table>'; 
    423                 } 
     385folderList.prototype.updateQuota = function(quotaSize,usedSpace) 
     386{ 
     387        var contentQuota = document.getElementById('content_quota'); 
     388         
     389        if ( contentQuota != null ) 
     390        { 
     391                contentQuota.innerHTML = '<table width="102" cellspacing="0" cellpadding="0" border="0" id="table_quota">' + 
     392                                                                 '<tbody><tr>' + 
     393                                                                 '<td width="102" nowrap="true" height="15" background="phpgwapi/templates/default/images/dsunused.gif">' + 
     394                                                                 '<table cellspacing="0" cellpadding="0" border="0" style="width: '+parseInt((usedSpace/quotaSize)*100)+'%;">' + 
     395                                                                 '<tbody><tr><td height="15" class="dsused"/></tr></tbody></table>'+ 
     396                                                                 '</td><td nowrap="true" align="center"><span class="boxHeaderText">&nbsp;&nbsp;'+ 
     397                                                                 parseInt(usedSpace/quotaSize*100)+'% ('+borkb(usedSpace)+'/'+borkb(quotaSize)+')</span>'+ 
     398                                                                 '</td></tr></tbody></table></td></tr></table>'; 
    424399        } 
    425400} 
Note: See TracChangeset for help on using the changeset viewer.