Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Break gantt layout when distance between StartDate and EndDate very large ( >4,5 years) #111

Open
GoogleCodeExporter opened this issue May 22, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link


What steps will reproduce the problem?

- This occurs on a GanttChart of SharePoint. The cause is gantt drew a large 
number of <td> tag at the header.

- This is only occurs on IE8/9 , IE7/FireFox/Scrome is ok all.

Code Segment : 
while(Date.parse(vTmpDate) <= Date.parse(vMaxDate))
{
   if(vFormat == 'day' )
   {
       if( JSGantt.formatDateStr(vCurrDate,'mm/dd/yyyy')    ==JSGantt.formatDateStr(vTmpDate,'mm/dd/yyyy')) 
       {
           vWeekdayColor  = "ccccff";
           vWeekendColor  = "9999ff";
           vWeekdayGColor  = "bbbbff";
           vWeekendGColor = "8888ff";
       } 
       else 
       {
           vWeekdayColor = "ffffff";
           vWeekendColor = "cfcfcf";
           vWeekdayGColor = "f3f3f3";
           vWeekendGColor = "c3c3c3";
       }

       if(vTmpDate.getDay() % 6 == 0) 
       {
           vDateRowStr  += '<td class="ms-vb gheadwkend"  style="BORDER-TOP: #efefef 1px solid; HEIGHT: 19px; BORDER-LEFT: #efefef 1px solid;" bgcolor=#' + vWeekendColor + ' align=center><div style="width: '+vColWidth+'px">' + vTmpDate.getDate() + '</div></td>';
                  vItemRowStr  += '<td class="ms-vb gheadwkend" style="BORDER-TOP: #efefef 1px solid; BORDER-LEFT: #efefef 1px solid; cursor: default;"  bgcolor=#' + vWeekendColor + ' align=center><div style="width: '+vColWidth+'px">&nbsp</div></td>';
       }
       else 
       {
           vDateRowStr += '<td class="ms-vb ghead" style="BORDER-TOP: #efefef 1px solid; HEIGHT: 19px; BORDER-LEFT: #efefef 1px solid;"  bgcolor=#' + vWeekdayColor + ' align=center><div style="width: '+vColWidth+'px">' + vTmpDate.getDate() + '</div></td>';
           if( JSGantt.formatDateStr(vCurrDate,'mm/dd/yyyy') == JSGantt.formatDateStr(vTmpDate,'mm/dd/yyyy')) 
               vItemRowStr += '<td class="ms-vb ghead" style="BORDER-TOP: #efefef 1px solid; BORDER-LEFT: #efefef 1px solid; cursor: default;"  bgcolor=#' + vWeekdayColor + ' align=center><div style="width: '+vColWidth+'px">&nbsp&nbsp</div></td>';
           else
               vItemRowStr += '<td class="ms-vb ghead" style="BORDER-TOP: #efefef 1px solid; BORDER-LEFT: #efefef 1px solid; cursor: default;"  align=center><div style="width: '+vColWidth+'px">&nbsp&nbsp</div></td>';
       }
       vTmpDate.setDate(vTmpDate.getDate() + 1);

    }
}   

What is the expected output? What do you see instead?

Don't break layout.

Please provide any additional information below.

Great Job with the rest.Thanks

Original issue reported on code.google.com by [email protected] on 20 Mar 2012 at 8:26

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant