Ignore:
Timestamp:
04/19/11 18:43:27 (13 years ago)
Author:
rafaelraymundo
Message:

Ticket #1718 - bug no redimensionamento das colunas - revisto limite mínimo do tamanho da coluna

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.0.1/expressoMail1_2/js/draw_api.js

    r4072 r4080  
    638638var cellResized = false; 
    639639var maxWidth=0; 
    640 var tblWidth=0; 
     640var minWidth=0; 
    641641var bodyWidth=0; 
    642642var cssForResizing=false; 
     
    688688                var cellIndex = objCell.cellIndex; 
    689689                var adjIndex = adjCell.cellIndex; 
    690                 var cellWidth = (ev.clientX-parseInt(getColumnPosition(objCell, ev))); 
     690                var cellOffset = parseInt(getColumnPosition(objCell, ev)); 
     691                var cellWidth = (ev.clientX-cellOffset); 
    691692 
    692693                var tbl = getMessagesTable(objCell); 
     
    694695                var tblType = ( (tbl.id=="table_box") ? 0 : 1); 
    695696 
    696                 if (cellWidth < 10) cellWidth = 10; 
     697                if (cellWidth < minWidth) 
     698                        cellWidth = minWidth; 
    697699                var adjWidth = maxWidth - cellWidth; 
    698                 if (adjWidth < 10) { 
    699                         cellWidth = (cellWidth+adjWidth)-10; 
    700                         adjWidth = 10; 
     700                if (adjWidth < minWidth) { 
     701                        cellWidth = (cellWidth+adjWidth)-minWidth; 
     702                        adjWidth = minWidth; 
    701703                } 
    702704 
     
    704706                colSizes[tblType][cellIndex] = (colSizes[tblType][cellIndex]=="*" ? "*" : getPct(cellWidth)); 
    705707 
    706                 document.getElementById("table_message_ruler").style.left = ev.clientX; 
     708                document.getElementById("table_message_ruler").style.left = cellOffset+cellWidth; 
    707709        } 
    708710        ev.returnValue = false; 
     
    760762                objCell.onclick = ""; 
    761763                maxWidth = objCell.offsetWidth+adjCell.offsetWidth; 
    762                 if (tblWidth==0) { 
    763                         tblWidth = tbl.offsetWidth; 
    764764                        bodyWidth = msgTable.offsetWidth; 
    765                 } 
     765                minWidth = Math.round(bodyWidth/80); 
    766766                document.getElementById("table_message_ruler").style.display = "block"; 
    767767                document.getElementById("table_message_ruler").style.left = ev.clientX; 
     
    857857                        trM[r].cells[c].setAttribute("width",colSizes[tbl][c]); 
    858858                        if (is_mozilla && !is_webkit) { 
    859                                 if (r==0) { 
    860                                     document.getElementById("colgroup_head_"+numBox).childNodes[c].setAttribute("width",colSizes[tbl][c]); 
    861                                         tbH.rows[0].cells[c].innerHTML = tbH.rows[0].cells[c].innerHTML; // stupid FF fix to refresh column content 
    862                         } 
    863                                 trM[r].cells[c].innerHTML = trM[r].cells[c].innerHTML; // stupid FF fix to refresh column content 
    864                         } 
    865                         else if(r==0) { 
     859                                document.getElementById("colgroup_head_"+numBox).childNodes[c].setAttribute("width",colSizes[tbl][c]); 
     860                                trM[r].cells[c].innerHTML = trM[r].cells[c].innerHTML; 
     861                        } 
     862                        else { 
    866863                                tbH.rows[0].cells[c].setAttribute("width",trM[r].cells[c].offsetWidth); 
    867864                        } 
Note: See TracChangeset for help on using the changeset viewer.