Modify

Opened 2 years ago

Closed 2 years ago

#10148 closed defect (fixed)

offset between left and right part of chart table in Internet Explorer

Reported by: falkb Owned by: ChrisNelson
Priority: normal Component: TracJsGanttPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.12

Description

The tickets bars are more above than their description. See the screenshot. Seen with IE 9, Firefox 13 has no problems. Seems it's reasoned by different table cell or font heights, though I don't know where to fix it.

Attachments (1)

rowheightbug.PNG (12.9 KB) - added by falkb 2 years ago.

Download all attachments as: .zip

Change History (6)

Changed 2 years ago by falkb

comment:1 Changed 2 years ago by falkb


comment:2 Changed 2 years ago by falkb

  • Summary changed from left and right part of chart table use different row heights in IE to offset between left and right part of chart table in Internet Explorer

comment:3 Changed 2 years ago by falkb

This one should help:

  • tracjsganttplugin/0.11/tracjsgantt/htdocs/jsgantt.js

     
    11841184     } 
    11851185      
    11861186     if (vFormatArr.join().indexOf("quarter")!=-1) {  
    1187          if (vFormat=='quarter') vLeftTable += '<INPUT TYPE=RADIO NAME="radFormat_'+vGanttVar+'" VALUE="quarter" checked>Quarter'; 
    1188          else                vLeftTable += '<INPUT TYPE=RADIO NAME="radFormat_'+vGanttVar+'" onclick=JSGantt.changeFormat("quarter",'+vGanttVar+') VALUE="quarter">Quarter'; 
     1187         if (vFormat=='quarter') vLeftTable += '<INPUT TYPE=RADIO NAME="radFormat_'+vGanttVar+'" VALUE="quarter" checked>Qtr.'; 
     1188         else                vLeftTable += '<INPUT TYPE=RADIO NAME="radFormat_'+vGanttVar+'" onclick=JSGantt.changeFormat("quarter",'+vGanttVar+') VALUE="quarter">Qtr.'; 
    11891189     } 
    11901190             
    11911191//            vLeftTable += '<INPUT TYPE=RADIO NAME="other" VALUE="other" style="display:none"> .'; 
     
    12011201         if(vShowRes ==1) vLeftTable += '  <TD style="BORDER-TOP: #efefef 1px solid; FONT-SIZE: 12px; BORDER-LEFT: #efefef 1px solid; WIDTH: 60px; HEIGHT: 20px" align=center nowrap>Resource</TD>' ; 
    12021202         if(vShowDur ==1) vLeftTable += '  <TD style="BORDER-TOP: #efefef 1px solid; FONT-SIZE: 12px; BORDER-LEFT: #efefef 1px solid; WIDTH: 60px; HEIGHT: 20px" align=center nowrap>Duration</TD>' ; 
    12031203         if(vShowComp==1) vLeftTable += '  <TD style="BORDER-TOP: #efefef 1px solid; FONT-SIZE: 12px; BORDER-LEFT: #efefef 1px solid; WIDTH: 60px; HEIGHT: 20px" align=center nowrap>% Comp.</TD>' ; 
    1204          if(vShowStartDate==1) vLeftTable += '  <TD style="BORDER-TOP: #efefef 1px solid; FONT-SIZE: 12px; BORDER-LEFT: #efefef 1px solid; WIDTH: 60px; HEIGHT: 20px" align=center nowrap>Start Date</TD>' ; 
     1204         if(vShowStartDate==1) vLeftTable += '  <TD style="BORDER-TOP: #efefef 1px solid; FONT-SIZE: 12px; BORDER-LEFT: #efefef 1px solid; WIDTH: 65px; HEIGHT: 20px" align=center nowrap>Start Date</TD>' ; 
    12051205         if(vShowEndDate==1) vLeftTable += '  <TD style="BORDER-TOP: #efefef 1px solid; FONT-SIZE: 12px; BORDER-LEFT: #efefef 1px solid; WIDTH: 60px; HEIGHT: 20px" align=center nowrap>End Date</TD>' ; 
    12061206  
    12071207         vLeftTable += '</TR>'; 
     
    12741274            // Draw the Chart Rows 
    12751275            vRightTable =  
    12761276            '<DIV class=scroll2 id=rightside_'+pGanttVar+'>' + 
    1277             '<TABLE style="width: ' + vChartWidth + 'px;" cellSpacing=0 cellPadding=0 border=0>' + 
    1278             '<TBODY><TR style="HEIGHT: 18px">'; 
     1277            '<TABLE style="width: ' + vChartWidth + 'px;" cellSpacing=0 cellPadding=0 border=0>'; 
     1278            if (JSGantt.isIE()) { // IE; 
     1279                vRightTable += '<TBODY><TR style="HEIGHT: 25px">'; 
     1280            } else { 
     1281                vRightTable += '<TBODY><TR style="HEIGHT: 18px">'; 
     1282            } 
    12791283 
    12801284            vTmpDate.setFullYear(vMinDate.getFullYear(), vMinDate.getMonth(), vMinDate.getDate()); 
    12811285            vTmpDate.setHours(0); 

Abbreviation "Qtr." is because of a bad line break because the words are too long in IE.

P.S.: Note, there are also these ones adressing the problem:
http://code.google.com/p/jsgantt/issues/detail?id=61&sort=type
http://code.google.com/p/jsgantt/issues/detail?id=54&sort=type

comment:4 Changed 2 years ago by ChrisNelson

(In [11743]) Better table alignment in IE. Refs #10148.

Thanks to falkb for the patch!

This looks OK to me on Firefox and Chromium so I guess it doesn't break
anything. I don't have a good way to test IE.

comment:5 Changed 2 years ago by falkb

  • Resolution set to fixed
  • Status changed from new to closed

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.