Changeset 4981 for branches/2.2


Ignore:
Timestamp:
08/23/11 16:44:39 (13 years ago)
Author:
alexandrecorreia
Message:

Ticket #2199 - Corrigido bug da mensagem carregando no FileManager?

Location:
branches/2.2/filemanager/js
Files:
2 edited

Legend:

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

    r4915 r4981  
    2121DragArea.prototype.dragObj = function(e) 
    2222{ 
    23         var _event  = is_ie ? window.event : e; 
     23        var _event  = is_ie ? window.event : e; 
    2424        var _target = is_ie ? _event.srcElement : _event.target; 
    2525 
     
    4040                sign.style.position = 'absolute'; 
    4141        } 
    42         else{ 
     42        else 
     43        { 
    4344                this.operation = ""; 
    4445                var sign = document.getElementById('dragSign'); 
     
    4647                        return; 
    4748                sign.parentNode.removeChild(sign); 
    48                 if(_target.tagName == 'SPAN'){ 
    49                         var filesUrl = toolbar.getCheckedFiles(); 
    50                         var path = _target.id.replace(/main$/g,'').substr(1); 
    51                         if (filesUrl.length > 1 && path.length > 1) 
    52                                 move_to(path,filesUrl); 
     49                 
     50                try 
     51                { 
     52                        if(_target.tagName == 'SPAN') 
     53                        { 
     54                                var filesUrl = toolbar.getCheckedFiles(); 
     55                                var path = _target.id.replace(/main$/g,'').substr(1); 
     56                                 
     57                                if (filesUrl.length > 1 && path.length > 1) 
     58                                        move_to(path,filesUrl); 
     59                        } 
     60                         
     61                } 
     62                catch(e) 
     63                { 
     64                         
    5365                } 
    5466        } 
  • branches/2.2/filemanager/js/draw_api.js

    r4915 r4981  
    407407} 
    408408folderList.prototype.updateQuota = function(quotaSize,usedSpace){ 
    409         if (parseInt(quotaSize) != 0){ 
     409        if ( parseInt(quotaSize) != 0 ) 
     410        { 
    410411                var contentQuota = document.getElementById('content_quota'); 
    411                 if (contentQuota != null) 
    412                         contentQuota.innerHTML = '<table width="102" cellspacing="0" cellpadding="0" border="0" id="table_quota"><tbody><tr><td width="102" nowrap="true" height="15" background="./phpgwapi/templates/default/images/dsunused.gif"><table cellspacing="0" cellpadding="0" border="0" style="width: '+parseInt((usedSpace/quotaSize)*100)+'%;"><tbody><tr><td height="15" class="dsused"/></tr></tbody></table></td><td nowrap="true" align="center"><span class="boxHeaderText">'+parseInt(usedSpace/quotaSize*100)+'% ('+borkb(usedSpace)+'/'+borkb(quotaSize)+')</span></td></tr></tbody></table></td></tr></table>'; 
     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                } 
    413424        } 
    414425} 
     
    526537 
    527538} 
    528 toolbar.prototype.getCheckedFiles = function () { 
     539 
     540toolbar.prototype.getCheckedFiles = function() 
     541{ 
    529542        filesUrl = ""; 
    530543        var one_checked = false; 
    531         files=document.getElementsByName('fileman'); 
     544        var files = document.getElementsByName('fileman'); 
    532545        var j=0; 
     546         
    533547        for (i = 0; i <  files.length; i++) 
    534                 if (files[i].checked){ 
     548        {        
     549                if (files[i].checked) 
     550                { 
    535551                        one_checked = true; 
    536552                        filesUrl += "&fileman["+j+"]="+base64_encode(files[i].value); 
    537553                        j++; 
    538554                } 
     555        } 
     556         
    539557        if (!one_checked) 
    540558        { 
     
    542560                return; 
    543561        } 
     562         
    544563        return filesUrl; 
    545564} 
     
    776795{ 
    777796        clearTimeout(menuTimeout); 
    778         switch(type){ 
    779                 case 'preview': 
    780                         var url = './index.php?menuaction=filemanager.vfs_functions.summary&file='+base64_encode(name)+"&path="+base64_encode(currentPath); 
    781                         var htmlData = '<img src=\"'+url+'\">'; 
    782                         menuTimeout = setTimeout("draw_window_card(\'"+htmlData+"\')",500); 
    783                         break; 
    784                 case 'user': 
    785                         var url = './index.php?menuaction=filemanager.user.card&lid='+base64_encode(name); 
    786                         menuTimeout = setTimeout("cExecute_('"+url+"',draw_window_card)",500); 
    787                         break; 
    788                 default: 
    789                         break; 
     797         
     798        if( type == "preview" ) 
     799        { 
     800                var url = './index.php?menuaction=filemanager.vfs_functions.summary&file='+base64_encode(name)+"&path="+base64_encode(currentPath); 
     801                var htmlData = '<img src=\"'+url+'\">'; 
     802                menuTimeout = setTimeout( "draw_window_card(\'"+htmlData+"\')", 300 ); 
     803        } 
     804         
     805        if( type == "user") 
     806        { 
     807                var url = './index.php?menuaction=filemanager.user.card&lid='+base64_encode(name); 
     808                menuTimeout = setTimeout("cExecute_('"+url+"',draw_window_card)", 300 ); 
    790809        } 
    791810 
     
    912931        } 
    913932        menu.innerHTML = content; 
    914  
    915933        menu.style.visibility = 'visible'; 
    916         clearTimeout(menuTimeout); 
    917         menuTimeout = setTimeout("hide_card()",4000); 
     934         
     935        if( menuTimeout ) 
     936                clearTimeout(menuTimeout); 
     937        menuTimeout = setTimeout("hide_card()",1000); 
    918938} 
    919939function hide_card() 
Note: See TracChangeset for help on using the changeset viewer.