Changeset 1891


Ignore:
Timestamp:
12/23/09 15:58:29 (14 years ago)
Author:
amuller
Message:

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

Location:
sandbox/filemanager
Files:
3 edited

Legend:

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

    r1810 r1891  
    55                var $public_functions = array( 
    66                        'save_preferences' => True, 
    7                         'get_preferences' => True 
     7                        'get_preferences' => True, 
     8                        'card'  =>      True 
    89                ); 
    910 
     
    9899                } 
    99100 
     101                function card(){ 
     102                        $account_info = $GLOBALS['phpgw']->accounts->get_list('accounts',0,1,1,base64_decode($this->lid),1,'lid'); 
     103                        echo $account_info[0]['account_firstname'].' '.$account_info[0]['account_lastname']."<br>"; 
     104                        echo $account_info[0]['account_email']; 
     105                        /* 
     106                        // TODO: PHOTO, ONLY FOR FOOL LDAP 
     107                        if (isset($GLOBALS['phpgw_info']['server']['ldap_root_pw'])){ 
     108                        } 
     109                        */ 
     110                } 
    100111                function get_preferences(){ 
    101112                         echo(serialize($_SESSION['phpgw_info']['user']['preferences']['filemanager'])); 
  • sandbox/filemanager/js/drag_area.js

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

    r1889 r1891  
    251251                retBuff += fl.td+'<img src="'+(file.icon)+'">'; 
    252252                if((file.mime).toUpperCase().indexOf('IMAGE') == 0) 
    253                         var mousefunc = 'draw_card(\''+file.name+'\')' 
     253                        var mousefunc = 'draw_card(\'preview\',\''+file.name+'\')' 
    254254                else 
    255                         var mousefunc = 'hide_preview()'; 
     255                        var mousefunc = 'hide_card(\'preview\')'; 
    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>'; 
     
    287287                        retBuff += fl.td+dtString+'</td>'; 
    288288                } 
    289                 if (preferences.owner =='1') retBuff += fl.td+file.owner+'</td>'; 
    290                 if (preferences.createdby_id =='1') retBuff += fl.td+file.creatdby+'</td>'; 
    291                 if (preferences.modifiedby_id =='1') retBuff += fl.td+file.modifdby+'</td>'; 
     289                if (preferences.owner =='1'){ 
     290                        retBuff += fl.td; 
     291                        retBuff += '<div onmouseover="draw_card(\'user\',\''+file.owner+'\')">'+file.owner+'</div></td>'; 
     292                } 
     293                if (preferences.createdby_id =='1'){ 
     294                        retBuff += fl.td; 
     295                        retBuff += '<div onmouseover="draw_card(\'user\',\''+file.creatdby+'\')">'+file.creatdby+'</div></td>'; 
     296                } 
     297                if (preferences.modifiedby_id =='1'){ 
     298                        retBuff += fl.td; 
     299                        retBuff += '<div onmouseover="draw_card(\'user\',\''+file.modifdby+'\')">'+file.modifdby+'</div></td>'; 
     300                } 
    292301                if (preferences.comment =='1') retBuff += fl.td+'<input id="'+file.name+'" class="inputComment" onkeydown="enterComments(event,this)" onclick="presetComments(this)" onblur="setComments(this)" value="'+(file.comm==null?'':file.comm)+'" alt="'+get_lang('Click to change comments')+'" title="'+get_lang('Click to change comments')+'"></input></td>'; 
    293302                if (preferences.version =='1') retBuff += fl.td+'<span onclick="loadHistory(\''+file.name+'\')">'+file.vers+'</span></td>'; 
     
    585594} 
    586595 
    587 function draw_card(filename){ 
    588         draw_window_card('preview','./index.php?menuaction=filemanager.vfs_functions.summary&file='+base64_encode(filename)+"&path="+base64_encode(currentPath)); 
     596function draw_card(type,name){ 
     597        switch(type){ 
     598                case 'preview': 
     599                        draw_window_card(type,'./index.php?menuaction=filemanager.vfs_functions.summary&file='+base64_encode(name)+"&path="+base64_encode(currentPath)); 
     600                        break; 
     601                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); 
     604                        break; 
     605                default: 
     606                        break; 
     607        } 
    589608} 
    590609function editFolders(operation){ 
     
    620639} 
    621640 
    622 function draw_window_card(id,url){ 
     641function draw_window_card(id,content){ 
    623642        var menu = document.getElementById('menu_newFile'+id); 
    624643        if (menu == null){ 
     
    629648                menu.style.top = (DocY+20)+"px"; 
    630649                menu.width = "100%"; 
    631                 menu.innerHTML = '<img src="'+url+'">'; 
    632                 menu.onmouseout = function () { menuTimeout = setTimeout("hide_preview()",50);} 
     650                menu.onmouseout = function () { menuTimeout = setTimeout("hide_card(\'"+id+"\')",50);} 
    633651                menu.onmouseover = function () { clearTimeout(menuTimeout); }; 
    634652                menu.style.zIndex='1'; 
     
    639657                menu.style.left = DocX; 
    640658                menu.style.top = (DocY+20)+"px"; 
    641                 menu.innerHTML = '<img src="'+url+'">'; 
    642         } 
     659        } 
     660        if (id == 'preview') 
     661                menu.innerHTML = '<img src="'+content+'">'; 
     662        else 
     663                menu.innerHTML = content; 
     664 
    643665        menu.style.visibility = 'visible'; 
    644666        clearTimeout(menuTimeout); 
    645         menuTimeout = setTimeout("hide_preview()",4000); 
    646 } 
    647 function hide_preview(){ 
    648         var e=document.getElementById('menu_newFilepreview'); 
     667        menuTimeout = setTimeout("hide_card(\'"+id+"\')",4000); 
     668} 
     669function hide_card(id){ 
     670        var e=document.getElementById('menu_newFile'+id); 
    649671        if (e!=null) 
    650672                e.style.visibility = 'hidden'; 
Note: See TracChangeset for help on using the changeset viewer.