Ignore:
Timestamp:
08/16/12 17:21:30 (12 years ago)
Author:
gustavo
Message:

Ticket #2911 - Melhoria na disposição e exibição das abas

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sandbox/newExpressoMail/expressoMail1_2/js/common_functions.js

    r6997 r7043  
    11// BEGIN: FUNCTION RESIZE WINDOW 
     2var numBox = 0; 
     3 
    24if (!expresso_offline) { 
    35        var _showBar = showBar; 
     
    3739function resizeWindow(){ 
    3840 
    39         var divScrollMain = Element("divScrollMain_"+numBox); 
     41        if(!is_ie){ 
     42                var divScrollMain = Element("divScrollMain_"+numBox); 
     43        }else{ 
     44                var divScrollMain = Element("divScrollMain_"+0); 
     45        } 
    4046        var table_message = Element("table_message"); 
    4147        var content_folders = Element("content_folders"); 
     
    6470                for(var i = 1; BordersArray.length > 1 && i < BordersArray.length;i++) { 
    6571                        var div_scroll = Element("div_message_scroll_"+BordersArray[i].sequence); 
    66                         var div = Element("content_id_"+BordersArray[i].sequence); 
     72                        var div = Element("ptabs_"+BordersArray[i].sequence); 
    6773 
    6874                        if(div){ 
     
    7783        } 
    7884 
    79         if(content_folders){ 
    80                 var search_div = Element("search_div"); 
    81                 var contentFoldersY = findPosY(content_folders); 
    82                 content_folders.style.height = (clientHeight - (contentFoldersY + (contentFoldersY > findPosY(search_div) ? 0 : (search_div.clientHeight ? search_div.clientHeight : search_div.offsetHeight) + 5))) + "px"; 
    83         } 
    8485        //redim_borders(count_borders()); 
    8586        resizeMailList(); 
    8687} 
    8788// END: FUNCTION RESIZE WINDOW 
     89 
     90function resizeMailList() { 
     91        if (document.getElementById("table_message_header_box_"+numBox)==null) 
     92                return false; 
     93        var innerWidth = (window.innerWidth?window.innerWidth:document.body.clientWidth); 
     94        var scrollWidth = (innerWidth - 20 - getColumnPosition(Element("exmail_main_body"),"BODY")[0]); 
     95        document.getElementById("table_message_header_box_"+numBox).style.width = (scrollWidth-2)+'px'; 
     96        if (document.getElementById("table_resultsearch_"+numBox)==null) 
     97                document.getElementById("table_box").style.width = scrollWidth+'px'; 
     98        else 
     99                document.getElementById("table_resultsearch_"+numBox).style.width = scrollWidth+'px'; 
     100        syncColumns(); 
     101        //Alinhamento das colunas data e tamanho na pesquisa 
     102        if ( numBox > 0){ 
     103                if (is_mozilla && !is_webkit){ 
     104                        $('#table_message_header_box_'+numBox).attr('style','width:99.5%'); 
     105                        $('#colgroup_head_'+numBox).find('col').each(function(index,value){ 
     106                                 $(this).attr('width',colSizes[1][index]); 
     107                        }); 
     108                        $('#colgroup_main_'+numBox).find('col').each(function(index,value){ 
     109                                 $(this).attr('width',colSizes[1][index]); 
     110                        });      
     111                }        
     112                else if (is_webkit){ 
     113                        $('#table_message_header_box_'+numBox).removeAttr('style'); 
     114                        $('#table_message_header_box_'+numBox).css('table-layout','auto'); 
     115                } 
     116                else{ 
     117                        $('#table_message_header_box_'+numBox).css('table-layout','auto'); 
     118                } 
     119                $('#table_message_header_box_'+numBox).find('td').each(function(index,value){ 
     120                     $(this).width(colSizes[1][index]); 
     121                }); 
     122                $('#divScrollMain_'+numBox).find('tr:first').find('td').each(function(index,value){ 
     123                     $(this).width(colSizes[1][index]); 
     124                });                      
     125        } 
     126        $('#table_resultsearch_'+numBox).removeAttr('style'); 
     127} 
    88128 
    89129var _beforeunload_ = window.onbeforeunload; 
Note: See TracChangeset for help on using the changeset viewer.