Fossil

Diff
Login

Differences From Artifact [a2ff92931b]:

To Artifact [86adbfa5a8]:


29
30
31
32
33
34
35
36

37
38
39
40
41
42


43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60



61
62
63
64
65
29
30
31
32
33
34
35

36
37
38
39
40
41

42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59


60
61
62
63
64
65
66
67







-
+





-
+
+
















-
-
+
+
+





  }
  else {
    tr.classList.remove('selected');
    for( var i = selected.length; --i >= 0 ;)
      if( selected[i] == tag )
        selected.splice(i,1);
  }
  if( selected.length >= 2 )
  if( selected.length >= 1 )
    anchor.classList.add('selected');
  else
    anchor.classList.remove('selected');

  anchor.href = prefix + selected.join("|");
  anchor.innerHTML = "View " + selected.length + " branches";
  anchor.innerHTML = "View " + selected.length +
                     ( selected.length > 1 ? " branches" : " branch" );
  // console.log("Link:",anchor.href);
}

var stags = []; /* initially selected tags, not used above */
document.querySelectorAll("div.brlist > table td:first-child > input")
  .forEach( function( cbx ){
    cbx.onchange = onChange;
    cbx.disabled = false;
    if( cbx.checked ){
      stags.push(cbx.parentElement.children[0].innerText);
      cbx.parentElement.parentElement.classList.add('selected');
    }
  });

if( stags.length != 0 ){
  anchor.href =  prefix + stags.join("|");
  if( stags.length >= 2 ) {
    anchor.innerHTML = "View " + stags.length + " branches";
  if( stags.length >= 1 ) {
    anchor.innerHTML = "View " + stags.length +
                       ( stags.length > 1 ? " branches" : " branch" );
    anchor.classList.add('selected');
  }
}

}); // window.addEventListener( 'load' ...