719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
|
var n = x.length;
for(var i=0; i<n; i++) {x[i].style.display = value;}
}
function changeDisplayById(id,value){
var x = document.getElementById(id);
if(x) x.style.display=value;
}
function toggleDetail(){
var id = parseInt(this.getAttribute('data-id'))
var x = document.getElementById("detail-"+id);
if( x.style.display=="inline" ){
x.style.display="none";
document.getElementById("ellipsis-"+id).textContent = "...";
changeDisplayById("links-"+id,"none");
}else{
|
|
>
>
>
>
|
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
|
var n = x.length;
for(var i=0; i<n; i++) {x[i].style.display = value;}
}
function changeDisplayById(id,value){
var x = document.getElementById(id);
if(x) x.style.display=value;
}
function toggleDetail(evt){
/* Ignore clicks to hyperlinks in check-in comments. This click-handler is
** attached to <SPAN> elements with the CSS class names "timelineEllipsis"
** and "timelineCompactComment" (for the "Compact" and "Simple" views). */
if( evt.target.tagName=='A' ) return;
var id = parseInt(this.getAttribute('data-id'))
var x = document.getElementById("detail-"+id);
if( x.style.display=="inline" ){
x.style.display="none";
document.getElementById("ellipsis-"+id).textContent = "...";
changeDisplayById("links-"+id,"none");
}else{
|
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
|
/* Set the onclick= attributes for elements of the "Compact" and
** "Simple" views so that clicking turns the details on and off.
*/
var lx = topObj.getElementsByClassName('timelineEllipsis');
var i;
for(i=0; i<lx.length; i++){
if( lx[i].hasAttribute('data-id') ) lx[i].onclick = toggleDetail;
}
lx = topObj.getElementsByClassName('timelineCompactComment');
for(i=0; i<lx.length; i++){
if( lx[i].hasAttribute('data-id') ) lx[i].onclick = toggleDetail;
}
if( window.innerWidth<400 ){
/* On narrow displays, shift the date from the first column to the
** third column, to make the first column narrower */
lx = topObj.getElementsByClassName('timelineDateRow');
for(i=0; i<lx.length; i++){
var rx = lx[i];
|
|
>
>
|
>
>
|
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
|
/* Set the onclick= attributes for elements of the "Compact" and
** "Simple" views so that clicking turns the details on and off.
*/
var lx = topObj.getElementsByClassName('timelineEllipsis');
var i;
for(i=0; i<lx.length; i++){
if( lx[i].hasAttribute('data-id') ){
lx[i].addEventListener('click',toggleDetail);
}
}
lx = topObj.getElementsByClassName('timelineCompactComment');
for(i=0; i<lx.length; i++){
if( lx[i].hasAttribute('data-id') ){
lx[i].addEventListener('click',toggleDetail);
}
}
if( window.innerWidth<400 ){
/* On narrow displays, shift the date from the first column to the
** third column, to make the first column narrower */
lx = topObj.getElementsByClassName('timelineDateRow');
for(i=0; i<lx.length; i++){
var rx = lx[i];
|