Changeset 4080 for branches/2.2.0.1/expressoMail1_2/js/draw_api.js
- Timestamp:
- 04/19/11 18:43:27 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.0.1/expressoMail1_2/js/draw_api.js
r4072 r4080 638 638 var cellResized = false; 639 639 var maxWidth=0; 640 var tblWidth=0;640 var minWidth=0; 641 641 var bodyWidth=0; 642 642 var cssForResizing=false; … … 688 688 var cellIndex = objCell.cellIndex; 689 689 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); 691 692 692 693 var tbl = getMessagesTable(objCell); … … 694 695 var tblType = ( (tbl.id=="table_box") ? 0 : 1); 695 696 696 if (cellWidth < 10) cellWidth = 10; 697 if (cellWidth < minWidth) 698 cellWidth = minWidth; 697 699 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; 701 703 } 702 704 … … 704 706 colSizes[tblType][cellIndex] = (colSizes[tblType][cellIndex]=="*" ? "*" : getPct(cellWidth)); 705 707 706 document.getElementById("table_message_ruler").style.left = ev.clientX;708 document.getElementById("table_message_ruler").style.left = cellOffset+cellWidth; 707 709 } 708 710 ev.returnValue = false; … … 760 762 objCell.onclick = ""; 761 763 maxWidth = objCell.offsetWidth+adjCell.offsetWidth; 762 if (tblWidth==0) {763 tblWidth = tbl.offsetWidth;764 764 bodyWidth = msgTable.offsetWidth; 765 }765 minWidth = Math.round(bodyWidth/80); 766 766 document.getElementById("table_message_ruler").style.display = "block"; 767 767 document.getElementById("table_message_ruler").style.left = ev.clientX; … … 857 857 trM[r].cells[c].setAttribute("width",colSizes[tbl][c]); 858 858 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 { 866 863 tbH.rows[0].cells[c].setAttribute("width",trM[r].cells[c].offsetWidth); 867 864 }
Note: See TracChangeset
for help on using the changeset viewer.