Fossil SCM

Display "View 1 branch" hyperlink if just one branch is selected. Add documentation to the <tt>www/javascript.md</tt> and to the changelog. Also minor CSS tweaks.

george 2021-04-19 16:08 brlist-timeline
Commit c6a061f2a0744230b70df6841cdaf94964280ca0dd3179816b8934010a0b31f0
+6 -3
--- src/default.css
+++ src/default.css
@@ -1776,22 +1776,25 @@
17761776
}
17771777
17781778
body.branch .brlist > table > tbody > tr:hover > td:first-child,
17791779
body.branch .brlist > table > tbody > tr.selected {
17801780
font-weight: bold;
1781
+}
1782
+body.branch .brlist > table > tbody td:first-child > input {
1783
+ cursor: pointer;
17811784
}
17821785
body.branch .brlist > table > tbody > tr > td:nth-child(1) {
17831786
display: flex;
17841787
flex-direction: row;
17851788
justify-content: space-between;
17861789
}
1787
-body.branch a.label.timeline-link {
1790
+body.branch .submenu > a.label.timeline-link {
17881791
display: none;
17891792
}
1790
-body.branch a.label.timeline-link.selected {
1793
+body.branch .submenu > a.label.timeline-link.selected {
17911794
display: inline;
1792
- font-weight: bold;
1795
+ font-weight: bold; /* <-- usefulness is questionable */
17931796
}
17941797
17951798
/* Objects in the "desktoponly" class are invisible on mobile */
17961799
@media screen and (max-width: 600px) {
17971800
.desktoponly {
17981801
--- src/default.css
+++ src/default.css
@@ -1776,22 +1776,25 @@
1776 }
1777
1778 body.branch .brlist > table > tbody > tr:hover > td:first-child,
1779 body.branch .brlist > table > tbody > tr.selected {
1780 font-weight: bold;
 
 
 
1781 }
1782 body.branch .brlist > table > tbody > tr > td:nth-child(1) {
1783 display: flex;
1784 flex-direction: row;
1785 justify-content: space-between;
1786 }
1787 body.branch a.label.timeline-link {
1788 display: none;
1789 }
1790 body.branch a.label.timeline-link.selected {
1791 display: inline;
1792 font-weight: bold;
1793 }
1794
1795 /* Objects in the "desktoponly" class are invisible on mobile */
1796 @media screen and (max-width: 600px) {
1797 .desktoponly {
1798
--- src/default.css
+++ src/default.css
@@ -1776,22 +1776,25 @@
1776 }
1777
1778 body.branch .brlist > table > tbody > tr:hover > td:first-child,
1779 body.branch .brlist > table > tbody > tr.selected {
1780 font-weight: bold;
1781 }
1782 body.branch .brlist > table > tbody td:first-child > input {
1783 cursor: pointer;
1784 }
1785 body.branch .brlist > table > tbody > tr > td:nth-child(1) {
1786 display: flex;
1787 flex-direction: row;
1788 justify-content: space-between;
1789 }
1790 body.branch .submenu > a.label.timeline-link {
1791 display: none;
1792 }
1793 body.branch .submenu > a.label.timeline-link.selected {
1794 display: inline;
1795 font-weight: bold; /* <-- usefulness is questionable */
1796 }
1797
1798 /* Objects in the "desktoponly" class are invisible on mobile */
1799 @media screen and (max-width: 600px) {
1800 .desktoponly {
1801
--- src/fossil.page.brlist.js
+++ src/fossil.page.brlist.js
@@ -31,17 +31,18 @@
3131
tr.classList.remove('selected');
3232
for( var i = selected.length; --i >= 0 ;)
3333
if( selected[i] == tag )
3434
selected.splice(i,1);
3535
}
36
- if( selected.length >= 2 )
36
+ if( selected.length >= 1 )
3737
anchor.classList.add('selected');
3838
else
3939
anchor.classList.remove('selected');
4040
4141
anchor.href = prefix + selected.join("|");
42
- anchor.innerHTML = "View " + selected.length + " branches";
42
+ anchor.innerHTML = "View " + selected.length +
43
+ ( selected.length > 1 ? " branches" : " branch" );
4344
// console.log("Link:",anchor.href);
4445
}
4546
4647
var stags = []; /* initially selected tags, not used above */
4748
document.querySelectorAll("div.brlist > table td:first-child > input")
@@ -54,12 +55,13 @@
5455
}
5556
});
5657
5758
if( stags.length != 0 ){
5859
anchor.href = prefix + stags.join("|");
59
- if( stags.length >= 2 ) {
60
- anchor.innerHTML = "View " + stags.length + " branches";
60
+ if( stags.length >= 1 ) {
61
+ anchor.innerHTML = "View " + stags.length +
62
+ ( stags.length > 1 ? " branches" : " branch" );
6163
anchor.classList.add('selected');
6264
}
6365
}
6466
6567
}); // window.addEventListener( 'load' ...
6668
--- src/fossil.page.brlist.js
+++ src/fossil.page.brlist.js
@@ -31,17 +31,18 @@
31 tr.classList.remove('selected');
32 for( var i = selected.length; --i >= 0 ;)
33 if( selected[i] == tag )
34 selected.splice(i,1);
35 }
36 if( selected.length >= 2 )
37 anchor.classList.add('selected');
38 else
39 anchor.classList.remove('selected');
40
41 anchor.href = prefix + selected.join("|");
42 anchor.innerHTML = "View " + selected.length + " branches";
 
43 // console.log("Link:",anchor.href);
44 }
45
46 var stags = []; /* initially selected tags, not used above */
47 document.querySelectorAll("div.brlist > table td:first-child > input")
@@ -54,12 +55,13 @@
54 }
55 });
56
57 if( stags.length != 0 ){
58 anchor.href = prefix + stags.join("|");
59 if( stags.length >= 2 ) {
60 anchor.innerHTML = "View " + stags.length + " branches";
 
61 anchor.classList.add('selected');
62 }
63 }
64
65 }); // window.addEventListener( 'load' ...
66
--- src/fossil.page.brlist.js
+++ src/fossil.page.brlist.js
@@ -31,17 +31,18 @@
31 tr.classList.remove('selected');
32 for( var i = selected.length; --i >= 0 ;)
33 if( selected[i] == tag )
34 selected.splice(i,1);
35 }
36 if( selected.length >= 1 )
37 anchor.classList.add('selected');
38 else
39 anchor.classList.remove('selected');
40
41 anchor.href = prefix + selected.join("|");
42 anchor.innerHTML = "View " + selected.length +
43 ( selected.length > 1 ? " branches" : " branch" );
44 // console.log("Link:",anchor.href);
45 }
46
47 var stags = []; /* initially selected tags, not used above */
48 document.querySelectorAll("div.brlist > table td:first-child > input")
@@ -54,12 +55,13 @@
55 }
56 });
57
58 if( stags.length != 0 ){
59 anchor.href = prefix + stags.join("|");
60 if( stags.length >= 1 ) {
61 anchor.innerHTML = "View " + stags.length +
62 ( stags.length > 1 ? " branches" : " branch" );
63 anchor.classList.add('selected');
64 }
65 }
66
67 }); // window.addEventListener( 'load' ...
68
--- www/changes.wiki
+++ www/changes.wiki
@@ -1,7 +1,15 @@
11
<title>Change Log</title>
22
3
+<a name='v2_16'></a>
4
+<h2>Changes for Version 2.16 (pending)</h2>
5
+ * [/brlist|List of branches] gained
6
+ [/timeline?r=brlist-timeline|the facility] to select several
7
+ branches and [./javascript.md#brlist|point a user] to the
8
+ <tt>/timeline</tt> view that shows just these selected branches
9
+ and the related check-ins.
10
+
311
<a name='v2_15'></a>
412
<h2>Changes for Version 2.15 (2021-03-26) and Patch 2.15.1 on (2021-04-07)</h2>
513
* <b>Patch 2.15.1:</b> Fix a data exfiltration bug in the server. <b>Upgrading to
614
the patch is recommended.</b><p>
715
* The [./defcsp.md|default CSP] has been relaxed slightly to allow
816
--- www/changes.wiki
+++ www/changes.wiki
@@ -1,7 +1,15 @@
1 <title>Change Log</title>
2
 
 
 
 
 
 
 
 
3 <a name='v2_15'></a>
4 <h2>Changes for Version 2.15 (2021-03-26) and Patch 2.15.1 on (2021-04-07)</h2>
5 * <b>Patch 2.15.1:</b> Fix a data exfiltration bug in the server. <b>Upgrading to
6 the patch is recommended.</b><p>
7 * The [./defcsp.md|default CSP] has been relaxed slightly to allow
8
--- www/changes.wiki
+++ www/changes.wiki
@@ -1,7 +1,15 @@
1 <title>Change Log</title>
2
3 <a name='v2_16'></a>
4 <h2>Changes for Version 2.16 (pending)</h2>
5 * [/brlist|List of branches] gained
6 [/timeline?r=brlist-timeline|the facility] to select several
7 branches and [./javascript.md#brlist|point a user] to the
8 <tt>/timeline</tt> view that shows just these selected branches
9 and the related check-ins.
10
11 <a name='v2_15'></a>
12 <h2>Changes for Version 2.15 (2021-03-26) and Patch 2.15.1 on (2021-04-07)</h2>
13 * <b>Patch 2.15.1:</b> Fix a data exfiltration bug in the server. <b>Upgrading to
14 the patch is recommended.</b><p>
15 * The [./defcsp.md|default CSP] has been relaxed slightly to allow
16
--- www/javascript.md
+++ www/javascript.md
@@ -570,10 +570,23 @@
570570
571571
…would pull the messages submitted since the last poll. Making the
572572
gateway bidirectional should be possible as well, as long as it properly
573573
uses SQLite transactions.
574574
575
+### <a id="brlist"></a>List of branches
576
+
577
+Since Fossil 2.16 [`/brlist`](/brlist) page uses JavaScript to enable
578
+selection of several branches for further study via `/timeline`.
579
+Client-side script interactively responds to checkboxes' events
580
+and constructs a special hyperlink in the submenu.
581
+Clicking this hyperlink loads a `/timeline` page that shows
582
+only these selected branches (and the related check-ins).
583
+
584
+_Potential Workaround:_ A user can manually construct an appropriate
585
+regular expession and put it into the "Tag Filter" entry of the
586
+`/timeline` page (in its advanced mode).
587
+
575588
----
576589
577590
## <a id="future"></a>Future Plans for JavaScript in Fossil
578591
579592
As of mid-2020, the informal provisional plan is to increase Fossil
580593
--- www/javascript.md
+++ www/javascript.md
@@ -570,10 +570,23 @@
570
571 …would pull the messages submitted since the last poll. Making the
572 gateway bidirectional should be possible as well, as long as it properly
573 uses SQLite transactions.
574
 
 
 
 
 
 
 
 
 
 
 
 
 
575 ----
576
577 ## <a id="future"></a>Future Plans for JavaScript in Fossil
578
579 As of mid-2020, the informal provisional plan is to increase Fossil
580
--- www/javascript.md
+++ www/javascript.md
@@ -570,10 +570,23 @@
570
571 …would pull the messages submitted since the last poll. Making the
572 gateway bidirectional should be possible as well, as long as it properly
573 uses SQLite transactions.
574
575 ### <a id="brlist"></a>List of branches
576
577 Since Fossil 2.16 [`/brlist`](/brlist) page uses JavaScript to enable
578 selection of several branches for further study via `/timeline`.
579 Client-side script interactively responds to checkboxes' events
580 and constructs a special hyperlink in the submenu.
581 Clicking this hyperlink loads a `/timeline` page that shows
582 only these selected branches (and the related check-ins).
583
584 _Potential Workaround:_ A user can manually construct an appropriate
585 regular expession and put it into the "Tag Filter" entry of the
586 `/timeline` page (in its advanced mode).
587
588 ----
589
590 ## <a id="future"></a>Future Plans for JavaScript in Fossil
591
592 As of mid-2020, the informal provisional plan is to increase Fossil
593

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button