45d44 < var sd=false; 48d46 < var atc=[new Date(), '', '', '', '', '', new Date()]; 60d57 < var lastdate=new Date(); 65d61 < var tlthreeurls=document.URL.replace('/GanttChart/', '/AnnotatedTimelineChart/').replace('gantt_chart.php','annotatedtimeline_chart.php').split('&data='); 68d63 < var tlthreeurl=tlthreeurls[0]; 97c92 < } else if (snum.length >= 1 && snum.replace('-','').replace('.','') != '' && snum.indexOf('--') == -1 && snum.indexOf('..') == -1) { --- > } else if (snum.length >= 1 && snum.replace('-','').replace('.','') != '') { 118,119d112 < //http://localhost:8888/gantt_chart.php?title=Research&onclick=y&options=456&desc=Research&onclick=y&options=456 < //&data=[~taskid1~,~ergerg~,newDate%282015,10,20%29,newDate%282015,10,21%29,null,0.0,~~],[~taskid2~,~rwgerg~,null,newDate%282015,10,22%29,86400000,0.0,~~],[~taskid3%22,%22erverv%22,null,newDate%282015,10,23%29,86400000,0.0,%22%22] 124,125c117 < < var vls=hbits[1].replace(']]);',',').replace(']',',').split(','); --- > var vls=hbits[1].replace(']',',').split(','); 127,130d118 < //alert(0); < atc[1]=viad; // taskid < atc[2]=vls[0].replace('"','').replace('"',''); // task description < //alert(1); 132,144d119 < //alert(12); < sd=true; < atc[6]=new Date(eval(vls[ioff + 0].replace('new Date(','')), eval(vls[ioff + 1]), eval(vls[ioff + 2].replace(')',''))); // start date < //alert(2); < atc[3]=vls[ioff + 6].replace('"','').replace('"',''); // duration < atc[4]=vls[ioff + 7].replace('"','').replace('"',''); // percent complete < atc[5]=vls[ioff + 8].replace('"','').replace('"','').replace(/~/g,''); // dependencies < atc[0]=new Date(eval(vls[ioff + 3].replace('new Date(','')), eval(vls[ioff + 4]), eval(vls[ioff + 5].replace(')',''))); // end date < if (eval(vls[ioff + 6].replace('"','').replace('"','').replace('null','0')) == 0) { < atc[3] = Math.floor(( atc[0] - atc[6] ) / 86400000 ); < } else if (eval(vls[ioff + 6].replace('"','').replace('"','').replace('null','0')) >= 100000) { < atc[3] = Math.floor(( atc[0] - atc[6] ) / 86400000 ); < } 153d127 < sd=false; 156,182d129 < //alert(vls[ioff + 3 - 2].replace('new Date(','') + ' ... ' + vls[ioff + 5 - 2].replace(')','') + ' +++ ' + vls[ioff + 4 - 2]); < //alert(vls[ioff + 3 - 2].replace('new Date(','') + ' ... ' + vls[ioff + 5 - 2].replace(')','') + ' +++ ' + vls[ioff + 4 - 2]); < atc[0]=new Date(eval(vls[ioff + 3 - 2].replace('new Date(','')), eval(vls[ioff + 4 - 2]), eval(vls[ioff + 5 - 2].replace(')',''))); < //alert(22); < if (eval(('' + vls[ioff + 4]).replace('"','').replace('"','').replace('null','0')) >= 100000) { < vls[ioff + 4]=eval(('' + vls[ioff + 4]).replace('"','').replace('"','').replace('null','0') / 86400000 ); < } < atc[3]=('' + vls[ioff + 4]).replace('"','').replace('"',''); // duration < //alert(222); < atc[4]=vls[ioff + 5].replace('"','').replace('"',''); // percent complete < //alert(322); < atc[5]=vls[ioff + 6].replace('"','').replace('"','').replace(/~/g,''); // dependencies < //alert(422); < atc[6]=new Date(); // start date < //alert(eval(vls[ioff + 4].replace('"','').replace('"','').replace('null','0'))); < if (eval(('' + vls[ioff + 4]).replace('"','').replace('"','').replace('null','0')) >= 100000) { < atc[6].setDate(atc[0].getDate() - eval(('' + vls[ioff + 4]).replace('"','').replace('"','').replace('null','0') / 86400000)); < } else { < atc[6].setDate(atc[0].getDate() - eval(('' + vls[ioff + 4]).replace('"','').replace('"','').replace('null','0'))); < } < //alert(atc[0].toLocaleString()); < //alert(atc[6].toLocaleString()); < if (eval(('' + vls[ioff + 4]).replace('"','').replace('"','').replace('null','0')) == 0) { < atc[3] = Math.floor(( atc[0] - atc[6] ) / 86400000 ); < } else if (eval(('' + vls[ioff + 4]).replace('"','').replace('"','').replace('null','0')) >= 100000) { < atc[3] = Math.floor(( atc[0] - atc[6] ) / 86400000 ); < } 318d264 < if (tlurl.indexOf('data=') != -1) avblurb+='Show the Current Calendar Representation on Top of This Gantt Chart=C ' + String.fromCharCode(10); 321,324c267 < if (tltwourl.indexOf('data=') != -1) avblurb+='Show the Current Annotated Timeline Representation on Top of This Gantt Chart=Y ' + String.fromCharCode(10); < avblurb+='Add to a Annotated Timeline=F[' + atc[2] + '] (anything after F overrides Annotated Timeline label of ' + atc[2] + ')' + String.fromCharCode(10); < avblurb+='Add to a Annotated Timeline Representation and Show in New Window=X[' + mainname.replace('/','') + '] (as above)' + String.fromCharCode(10); < if (tlthreeurl.indexOf('data=') != -1) avblurb+='Show the Current Annotated Timeline Representation on Top of This Gantt Chart=Z ' + String.fromCharCode(10); --- > if (tlurl.indexOf('data=') != -1) avblurb+='Show the Current Calendar Representation on Top of This Gantt Chart=C ' + String.fromCharCode(10); 327,332c270 < //ans=prompt('Regarding ' + colparts[0] + ' (' + thisval + mainname + ') you clicked date range ' + nxd + ' to ' + thisdate[1] + ' ' + avblurb, paramdata); < if (sd == false) { < ans=prompt('Regarding ' + colparts[0] + ' (' + thisval + mainname + ') you clicked end date ' + thisdate[1] + ' ' + avblurb, paramdata); < } else { < ans=prompt('Regarding ' + colparts[0] + ' (' + thisval + mainname + ') you clicked date ' + thisdate[0] + ' to ' + thisdate[1] + ' ' + avblurb, paramdata); < } --- > ans=prompt('Regarding ' + colparts[0] + ' (' + thisval + mainname + ') you clicked' + (' date range of ' + thisdate[0] + ' to ').replace(' date range of NaN to ',' date range to ') + thisdate[1] + avblurb, paramdata); 376,406d313 < } else if (ans.substring(0,1).toLowerCase() == 'f' || ans.substring(0,1).toLowerCase() == 'x') { < < if (eval(ans.length) > 1) { < //pstr=ans.substring(1); < if (ans.substring(1,2) == '[') atc[2]=ans.substring(1); < } < if (eval(('' + atc[3]).replace('null','0')) >= 100000) { < atc[3]=eval(('' + atc[3]).replace('null','0')) / 86400000; < } < if (tlthreeurl.indexOf('data=') == -1) { < tlthreeurl=tlthreeurl.replace('&desc=','&olddesc=') + '&desc1=' + encodeURIComponent('Duration'); < tlthreeurl+='&title1=' + encodeURIComponent('Task ID'); < tlthreeurl+='&text1=' + encodeURIComponent('Task Description'); < tlthreeurl+='&desc2=' + encodeURIComponent('Percent Complete'); < tlthreeurl+='&title2=' + encodeURIComponent('Dependencies'); < tlthreeurl+='&text2=' + encodeURIComponent('Start Date'); < tlthreeurl+='&data=[newDate(' + eval(1900 + atc[6].getYear()) + ',' + eval(0 + atc[6].getMonth()) + ',' + atc[6].getDate() + '),' + encodeURIComponent(('' + atc[3]).replace('null','0')) + ',~' + encodeURIComponent(atc[1]) + '~,~' + encodeURIComponent(atc[2]) + '~,' + encodeURIComponent(('' + atc[4]).replace('null','0')) + ',~' + encodeURIComponent(('' + atc[5]).replace('null','')) + '~,~' + encodeURIComponent('End Date is ' + atc[0].toLocaleString()) + '~],'; < lastdate=atc[0]; < } else { < tlthreeurl+=','; < if (eval(1900 + atc[6].getYear()) > eval(1900 + lastdate.getYear())) { < tlthreeurl+='[newDate(' + eval(1900 + atc[6].getYear()) + ',' + eval(0 + atc[6].getMonth()) + ',' + atc[6].getDate() + '),' + encodeURIComponent(('' + atc[3]).replace('null','0')) + ',~' + encodeURIComponent(atc[1]) + '~,~' + encodeURIComponent(atc[2]) + '~,' + encodeURIComponent(('' + atc[4]).replace('null','0')) + ',~' + encodeURIComponent(('' + atc[5]).replace('null','')) + '~,~' + encodeURIComponent('End Date is ' + atc[0].toLocaleString()) + '~],'; < } else if (eval(0 + atc[6].getMonth()) > eval(0 + lastdate.getMonth()) && eval(1900 + atc[6].getYear()) == eval(1900 + lastdate.getYear())) { < tlthreeurl+='[newDate(' + eval(1900 + atc[6].getYear()) + ',' + eval(0 + atc[6].getMonth()) + ',' + atc[6].getDate() + '),' + encodeURIComponent(('' + atc[3]).replace('null','0')) + ',~' + encodeURIComponent(atc[1]) + '~,~' + encodeURIComponent(atc[2]) + '~,' + encodeURIComponent(('' + atc[4]).replace('null','0')) + ',~' + encodeURIComponent(('' + atc[5]).replace('null','')) + '~,~' + encodeURIComponent('End Date is ' + atc[0].toLocaleString()) + '~],'; < } else if (eval(atc[6].getDate()) >= eval(lastdate.getDate()) && eval(0 + atc[6].getMonth()) == eval(0 + lastdate.getMonth()) && eval(1900 + atc[6].getYear()) == eval(1900 + lastdate.getYear())) { < tlthreeurl+='[newDate(' + eval(1900 + atc[6].getYear()) + ',' + eval(0 + atc[6].getMonth()) + ',' + atc[6].getDate() + '),' + encodeURIComponent(('' + atc[3]).replace('null','0')) + ',~' + encodeURIComponent(atc[1]) + '~,~' + encodeURIComponent(atc[2]) + '~,' + encodeURIComponent(('' + atc[4]).replace('null','0')) + ',~' + encodeURIComponent(('' + atc[5]).replace('null','')) + '~,~' + encodeURIComponent('End Date is ' + atc[0].toLocaleString()) + '~],'; < } < lastdate=atc[0]; < } < tlthreeurl+='[' + cdsnum[1] + ',' + encodeURIComponent('-' + ('' + atc[3]).replace('null','0').replace('-','')) + ',~' + encodeURIComponent(atc[1]) + '~,~' + encodeURIComponent(atc[2]) + '~,' + encodeURIComponent(('' + atc[4]).replace('null','0')) + ',~' + encodeURIComponent(('' + atc[5]).replace('null','')) + '~,~' + encodeURIComponent('Start Date is ' + atc[6].toLocaleString()) + '~]'; < if (ans.substring(0,1).toLowerCase() == 'x') window.open(iftoobig('',tlthreeurl), '_blank', 'top=100,left=100,width=500,height=500'); 450,453d356 < } else if (ans.substring(0,1).toLowerCase() == 'y') { < location.href=iftoobig('',tltwourl); < } else if (ans.substring(0,1).toLowerCase() == 'z') { < location.href=iftoobig('',tlthreeurl); 535,536d437 < //alert(73111 + ' ... ' + str); < if (tlurl.indexOf('data=') != -1) avblurb+='Show the Current Calendar Representation on Top of This Gantt Chart=C ' + String.fromCharCode(10); 539,542c440 < if (tltwourl.indexOf('data=') != -1) avblurb+='Show the Current Annotated Timeline Representation on Top of This Gantt Chart=Y ' + String.fromCharCode(10); < avblurb+='Add to a Annotated Timeline=F[' + atc[2] + '] (anything after F overrides Annotated Timeline label of ' + atc[2] + ')' + String.fromCharCode(10); < avblurb+='Add to a Annotated Timeline Representation and Show in New Window=X[' + mainname.replace('/','') + '] (as above)' + String.fromCharCode(10); < if (tlthreeurl.indexOf('data=') != -1) avblurb+='Show the Current Annotated Timeline Representation on Top of This Gantt Chart=Z ' + String.fromCharCode(10); --- > if (tlurl.indexOf('data=') != -1) avblurb+='Show the Current Calendar Representation on Top of This Gantt Chart=C ' + String.fromCharCode(10); 545,549c443 < if (sd == false) { < ans=prompt('Regarding ' + colparts[0] + ' (' + thisval + mainname + ') you clicked end date ' + thisdate[1] + ' ' + avblurb, paramdata); < } else { < ans=prompt('Regarding ' + colparts[0] + ' (' + thisval + mainname + ') you clicked date ' + thisdate[0] + ' to ' + thisdate[1] + ' ' + avblurb, paramdata); < } --- > ans=prompt('Regarding ' + colparts[0] + ' (' + thisval + mainname + ') you clicked' + (' date range of ' + thisdate[0] + ' to ').replace(' date range of NaN to ',' date range to ') + thisdate[1] + avblurb, paramdata); 591,620d484 < } else if (ans.substring(0,1).toLowerCase() == 'f' || ans.substring(0,1).toLowerCase() == 'x') { < if (eval(ans.length) > 1) { < //pstr=ans.substring(1); < if (ans.substring(1,2) == '[') atc[2]=ans.substring(1); < } < if (eval(('' + atc[3]).replace('null','0')) >= 100000) { < atc[3]=eval(('' + atc[3]).replace('null','0')) / 86400000; < } < if (tlthreeurl.indexOf('data=') == -1) { < tlthreeurl=tlthreeurl.replace('&desc=','&olddesc=') + '&desc1=' + encodeURIComponent('Duration'); < tlthreeurl+='&title1=' + encodeURIComponent('Task ID'); < tlthreeurl+='&text1=' + encodeURIComponent('Task Description'); < tlthreeurl+='&desc2=' + encodeURIComponent('Percent Complete'); < tlthreeurl+='&title2=' + encodeURIComponent('Dependencies'); < tlthreeurl+='&text2=' + encodeURIComponent('Start Date'); < tlthreeurl+='&data=[newDate(' + eval(1900 + atc[6].getYear()) + ',' + eval(0 + atc[6].getMonth()) + ',' + atc[6].getDate() + '),' + encodeURIComponent(('' + atc[3]).replace('null','0')) + ',~' + encodeURIComponent(atc[1]) + '~,~' + encodeURIComponent(atc[2]) + '~,' + encodeURIComponent(('' + atc[4]).replace('null','0')) + ',~' + encodeURIComponent(('' + atc[5]).replace('null','')) + '~,~' + encodeURIComponent('End Date is ' + atc[0].toLocaleString()) + '~],'; < lastdate=atc[0]; < } else { < tlthreeurl+=','; < if (eval(1900 + atc[6].getYear()) > eval(1900 + lastdate.getYear())) { < tlthreeurl+='[newDate(' + eval(1900 + atc[6].getYear()) + ',' + eval(0 + atc[6].getMonth()) + ',' + atc[6].getDate() + '),' + encodeURIComponent(('' + atc[3]).replace('null','0')) + ',~' + encodeURIComponent(atc[1]) + '~,~' + encodeURIComponent(atc[2]) + '~,' + encodeURIComponent(('' + atc[4]).replace('null','0')) + ',~' + encodeURIComponent(('' + atc[5]).replace('null','')) + '~,~' + encodeURIComponent('End Date is ' + atc[0].toLocaleString()) + '~],'; < } else if (eval(0 + atc[6].getMonth()) > eval(0 + lastdate.getMonth()) && eval(1900 + atc[6].getYear()) == eval(1900 + lastdate.getYear())) { < tlthreeurl+='[newDate(' + eval(1900 + atc[6].getYear()) + ',' + eval(0 + atc[6].getMonth()) + ',' + atc[6].getDate() + '),' + encodeURIComponent(('' + atc[3]).replace('null','0')) + ',~' + encodeURIComponent(atc[1]) + '~,~' + encodeURIComponent(atc[2]) + '~,' + encodeURIComponent(('' + atc[4]).replace('null','0')) + ',~' + encodeURIComponent(('' + atc[5]).replace('null','')) + '~,~' + encodeURIComponent('End Date is ' + atc[0].toLocaleString()) + '~],'; < } else if (eval(atc[6].getDate()) >= eval(lastdate.getDate()) && eval(0 + atc[6].getMonth()) == eval(0 + lastdate.getMonth()) && eval(1900 + atc[6].getYear()) == eval(1900 + lastdate.getYear())) { < tlthreeurl+='[newDate(' + eval(1900 + atc[6].getYear()) + ',' + eval(0 + atc[6].getMonth()) + ',' + atc[6].getDate() + '),' + encodeURIComponent(('' + atc[3]).replace('null','0')) + ',~' + encodeURIComponent(atc[1]) + '~,~' + encodeURIComponent(atc[2]) + '~,' + encodeURIComponent(('' + atc[4]).replace('null','0')) + ',~' + encodeURIComponent(('' + atc[5]).replace('null','')) + '~,~' + encodeURIComponent('End Date is ' + atc[0].toLocaleString()) + '~],'; < } < lastdate=atc[0]; < } < tlthreeurl+='[' + cdsnum[1] + ',' + encodeURIComponent('-' + ('' + atc[3]).replace('null','0').replace('-','')) + ',~' + encodeURIComponent(atc[1]) + '~,~' + encodeURIComponent(atc[2]) + '~,' + encodeURIComponent(('' + atc[4]).replace('null','0')) + ',~' + encodeURIComponent(('' + atc[5]).replace('null','')) + '~,~' + encodeURIComponent('Start Date is ' + atc[6].toLocaleString()) + '~]'; < if (ans.substring(0,1).toLowerCase() == 'x') window.open(iftoobig('',tlthreeurl), '_blank', 'top=100,left=100,width=500,height=500'); 657,660d520 < } else if (ans.substring(0,1).toLowerCase() == 'y') { < location.href=iftoobig('',tltwourl); < } else if (ans.substring(0,1).toLowerCase() == 'z') { < location.href=iftoobig('',tlthreeurl); 814,823d673 < echo ' if (eval(sput.value.replace("null","0")) != 0) { ' . "\n"; < echo ' pDates=new Date(); pDates.setDate(pDatee.getDate() - eval(sput.value)); ' . "\n"; < echo ' retval = retval + "newDate(" + eval(1900 + pDates.getYear()) + ","; ' . "\n"; < echo ' retval = retval + eval(0 + pDates.getMonth()) + ","; ' . "\n"; < echo ' retval = retval + pDates.getDate() + "),"; ' . "\n"; < echo ' } else { ' . "\n"; < echo ' pDates = YAHOO.example.calendar.cale' . ($ic - 1) . '.getSelectedDates()[0]; ' . "\n"; < echo ' retval = retval + "null,"; ' . "\n"; < echo ' } ' . "\n"; < echo ' } else if (eval(sput.value.replace("null","0")) == 0) { ' . "\n"; 849,851c699,700 < echo " if (sput.value == 'null') retval = retval.replace(')]',')," . '' . "null" . '' . "," . '' . "' + pput.value + '" . '' . "," . '"' . "' + ('' + dput.value).replace('null','') + '" . '"' . "]'); " . "\n"; < //echo " if (sput.value != 'null') retval = retval.replace(')]',')," . '' . "' + eval(60 * 60 * 24 * 1000 * sput.value) + '" . '' . "," . '' . "' + pput.value + '" . '' . "," . '"' . "' + dput.value + '" . '"' . "]'); " . "\n"; < echo " if (sput.value != 'null') retval = retval.replace(')]',')," . '' . "' + eval(1.0 * sput.value) + '" . '' . "," . '' . "' + pput.value + '" . '' . "," . '"' . "' + dput.value + '" . '"' . "]'); " . "\n"; --- > echo " if (sput.value == 'null') retval = retval.replace(')]',')," . '' . "null" . '' . "," . '' . "' + pput.value + '" . '' . "," . '"' . "' + dput.value.replace('null','') + '" . '"' . "]'); " . "\n"; > echo " if (sput.value != 'null') retval = retval.replace(')]',')," . '' . "' + eval(60 * 60 * 24 * 1000 * sput.value) + '" . '' . "," . '' . "' + pput.value + '" . '' . "," . '"' . "' + dput.value + '" . '"' . "]'); " . "\n"; 915c764 < echo ' bits = "
Click here to Show Chart when All Filled out Below ...
";' . "\n"; --- > echo ' bits = "
Click here to Show Chart when All Filled out Below ...
From" + title + "To
";' . "\n"; 936c785 < echo ' ct.innerHTML = bits; location.href="#wafo"; ' . "\n"; --- > echo ' ct.innerHTML = bits;' . "\n";
From" + title + "To