Changeset 1893


Ignore:
Timestamp:
12/24/09 08:37:09 (14 years ago)
Author:
amuller
Message:

Ticket #597 - Melhoria do FM. melhorias na interface, Cartao do usuario

Location:
sandbox/filemanager
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • sandbox/filemanager/inc/class.user.inc.php

    r1892 r1893  
    100100 
    101101                function card(){ 
     102                        header('Content-Type: text/html'); 
     103                        $expires = 60*60*24*10; /* 10 days */ 
     104                        header("Cache-Control: maxage=".$expires); 
     105                        header("Pragma: public"); 
     106                        header("Expires: ".gmdate('D, d M Y H:i:s', time()+$expires)); 
    102107                        $account_info = $GLOBALS['phpgw']->accounts->get_list('accounts',0,1,1,base64_decode($this->lid),1,'exact'); 
    103108                        echo $account_info[0]['account_firstname'].' '.$account_info[0]['account_lastname']."<br>"; 
    104                         echo $account_info[0]['account_email']; 
     109                        echo '<a target="_blank" href="../expressoMail1_2/index.php?to=' 
     110                                .$account_info[0]['account_email'].'">'.$account_info[0]['account_email']; 
    105111                        /* 
    106112                        // TODO: PHOTO, ONLY FOR FOOL LDAP 
  • sandbox/filemanager/inc/class.vfs_functions.inc.php

    r1889 r1893  
    221221                function summary() 
    222222                { 
     223                        header('Content-Type: text/html'); 
     224                        $expires = 60*60*24*15; 
     225                        header("Cache-Control: maxage=".$expires); 
     226                        header("Pragma: public"); 
     227                        header("Expires: ".gmdate('D, d M Y H:i:s', time()+$expires)); 
     228                        echo '<img src="data:image/gif;base64,'; 
    223229                        if($this->file) 
    224230                        {        
    225                                 header('Content-Type: image/gif'); 
    226                                 $expires = 60*60*24*15; /* 15 days */ 
    227                                 header("Cache-Control: maxage=".$expires); 
    228                                 header("Pragma: public"); 
    229                                 header("Expires: ".gmdate('D, d M Y H:i:s', time()+$expires)); 
    230231                                $content = $this->bo->vfs->summary(array('path' => $this->path, 
    231232                                        'string' => $this->file 
    232233                                )); 
    233                                 if (strlen($content) > 0) 
    234                                         echo $content; 
    235                                 else 
     234                                if (strlen($content) < 1) 
    236235                                { 
    237236                                        $filename = './filemanager/templates/default/images/error.gif'; 
    238237                                        $handle = fopen($filename,'rb'); 
    239                                         echo fread($handle,filesize($filename)); 
     238                                        $content = fread($handle,filesize($filename)); 
    240239                                        fclose($handle); 
    241240                                } 
    242  
    243                                 $GLOBALS['phpgw']->common->phpgw_exit(); 
    244                         } 
     241                                echo base64_encode($content); 
     242                        } 
     243                        echo '">'; 
     244                        $GLOBALS['phpgw']->common->phpgw_exit(); 
    245245                } 
    246246         
  • sandbox/filemanager/js/drag_area.js

    r1891 r1893  
    1111 
    1212document.onmousemove = function(event) { _dragArea.moveWindow(event); } 
    13 document.onmousedown = function(event) {_dragArea.pressed = 1; hide_card('preview');}; 
     13document.onmousedown = function(event) {_dragArea.pressed = 1; hide_card();}; 
    1414document.onmouseup = function(event) { _dragArea.pressed = 0 }; 
    1515 
  • sandbox/filemanager/js/draw_api.js

    r1891 r1893  
    253253                        var mousefunc = 'draw_card(\'preview\',\''+file.name+'\')' 
    254254                else 
    255                         var mousefunc = 'hide_card(\'preview\')'; 
     255                        var mousefunc = 'hide_card()'; 
    256256                retBuff += '<a onmouseover="'+mousefunc+'" id="name_'+file.name+'" href="./index.php?menuaction=filemanager.uifilemanager.view&file='+base64_encode(file.name)+'&path='+base64_encode(currentPath)+'" target="_blank">'+file.name+'</a>&nbsp;</td>'; 
    257257                if (preferences.mime_type =='1') retBuff += fl.td+file.mime+'</td>'; 
     
    595595 
    596596function draw_card(type,name){ 
     597        clearTimeout(menuTimeout); 
    597598        switch(type){ 
    598599                case 'preview': 
    599                         draw_window_card(type,'./index.php?menuaction=filemanager.vfs_functions.summary&file='+base64_encode(name)+"&path="+base64_encode(currentPath)); 
     600                        var url = './index.php?menuaction=filemanager.vfs_functions.summary&file='+base64_encode(name)+"&path="+base64_encode(currentPath); 
    600601                        break; 
    601602                case 'user': 
    602                         var hand = function (data) { draw_window_card('user',data); } 
    603                         cExecute('./index.php?menuaction=filemanager.user.card&lid='+base64_encode(name),hand); 
     603                        var url = './index.php?menuaction=filemanager.user.card&lid='+base64_encode(name); 
    604604                        break; 
    605605                default: 
    606606                        break; 
    607607        } 
     608        menuTimeou = setTimeout("cExecute('"+url+"',draw_window_card)",500); 
    608609} 
    609610function editFolders(operation){ 
     
    639640} 
    640641 
    641 function draw_window_card(id,content){ 
    642         var menu = document.getElementById('menu_newFile'+id); 
     642function draw_window_card(content){ 
     643        var menu = document.getElementById('menu_newFile'); 
    643644        if (menu == null){ 
    644645                menu = document.createElement('DIV'); 
    645646                menu.className = 'menubox'; 
    646                 menu.id = "menu_newFile"+id; 
     647                menu.id = "menu_newFile"; 
    647648                menu.style.left = DocX; 
    648649                menu.style.top = (DocY+20)+"px"; 
    649650                menu.width = "100%"; 
    650                 menu.onmouseout = function () { menuTimeout = setTimeout("hide_card(\'"+id+"\')",50);} 
     651                menu.onmouseout = function () { menuTimeout = setTimeout("hide_card()",50);} 
    651652                menu.onmouseover = function () { clearTimeout(menuTimeout); }; 
    652653                menu.style.zIndex='1'; 
     
    658659                menu.style.top = (DocY+20)+"px"; 
    659660        } 
    660         if (id == 'preview') 
    661                 menu.innerHTML = '<img src="'+content+'">'; 
    662         else 
    663                 menu.innerHTML = content; 
     661        menu.innerHTML = content; 
    664662 
    665663        menu.style.visibility = 'visible'; 
    666664        clearTimeout(menuTimeout); 
    667         menuTimeout = setTimeout("hide_card(\'"+id+"\')",4000); 
    668 } 
    669 function hide_card(id){ 
    670         var e=document.getElementById('menu_newFile'+id); 
     665        menuTimeout = setTimeout("hide_card()",4000); 
     666} 
     667function hide_card(){ 
     668        var e=document.getElementById('menu_newFile'); 
    671669        if (e!=null) 
    672670                e.style.visibility = 'hidden'; 
Note: See TracChangeset for help on using the changeset viewer.