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.
Commit
c6a061f2a0744230b70df6841cdaf94964280ca0dd3179816b8934010a0b31f0
Parent
00891cba00a6987…
4 files changed
+6
-3
+6
-4
+8
+13
+6
-3
| --- src/default.css | ||
| +++ src/default.css | ||
| @@ -1776,22 +1776,25 @@ | ||
| 1776 | 1776 | } |
| 1777 | 1777 | |
| 1778 | 1778 | body.branch .brlist > table > tbody > tr:hover > td:first-child, |
| 1779 | 1779 | body.branch .brlist > table > tbody > tr.selected { |
| 1780 | 1780 | font-weight: bold; |
| 1781 | +} | |
| 1782 | +body.branch .brlist > table > tbody td:first-child > input { | |
| 1783 | + cursor: pointer; | |
| 1781 | 1784 | } |
| 1782 | 1785 | body.branch .brlist > table > tbody > tr > td:nth-child(1) { |
| 1783 | 1786 | display: flex; |
| 1784 | 1787 | flex-direction: row; |
| 1785 | 1788 | justify-content: space-between; |
| 1786 | 1789 | } |
| 1787 | -body.branch a.label.timeline-link { | |
| 1790 | +body.branch .submenu > a.label.timeline-link { | |
| 1788 | 1791 | display: none; |
| 1789 | 1792 | } |
| 1790 | -body.branch a.label.timeline-link.selected { | |
| 1793 | +body.branch .submenu > a.label.timeline-link.selected { | |
| 1791 | 1794 | display: inline; |
| 1792 | - font-weight: bold; | |
| 1795 | + font-weight: bold; /* <-- usefulness is questionable */ | |
| 1793 | 1796 | } |
| 1794 | 1797 | |
| 1795 | 1798 | /* Objects in the "desktoponly" class are invisible on mobile */ |
| 1796 | 1799 | @media screen and (max-width: 600px) { |
| 1797 | 1800 | .desktoponly { |
| 1798 | 1801 |
| --- 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 |
+6
-4
| --- src/fossil.page.brlist.js | ||
| +++ src/fossil.page.brlist.js | ||
| @@ -31,17 +31,18 @@ | ||
| 31 | 31 | tr.classList.remove('selected'); |
| 32 | 32 | for( var i = selected.length; --i >= 0 ;) |
| 33 | 33 | if( selected[i] == tag ) |
| 34 | 34 | selected.splice(i,1); |
| 35 | 35 | } |
| 36 | - if( selected.length >= 2 ) | |
| 36 | + if( selected.length >= 1 ) | |
| 37 | 37 | anchor.classList.add('selected'); |
| 38 | 38 | else |
| 39 | 39 | anchor.classList.remove('selected'); |
| 40 | 40 | |
| 41 | 41 | anchor.href = prefix + selected.join("|"); |
| 42 | - anchor.innerHTML = "View " + selected.length + " branches"; | |
| 42 | + anchor.innerHTML = "View " + selected.length + | |
| 43 | + ( selected.length > 1 ? " branches" : " branch" ); | |
| 43 | 44 | // console.log("Link:",anchor.href); |
| 44 | 45 | } |
| 45 | 46 | |
| 46 | 47 | var stags = []; /* initially selected tags, not used above */ |
| 47 | 48 | document.querySelectorAll("div.brlist > table td:first-child > input") |
| @@ -54,12 +55,13 @@ | ||
| 54 | 55 | } |
| 55 | 56 | }); |
| 56 | 57 | |
| 57 | 58 | if( stags.length != 0 ){ |
| 58 | 59 | 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" ); | |
| 61 | 63 | anchor.classList.add('selected'); |
| 62 | 64 | } |
| 63 | 65 | } |
| 64 | 66 | |
| 65 | 67 | }); // window.addEventListener( 'load' ... |
| 66 | 68 |
| --- 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 |
+8
| --- www/changes.wiki | ||
| +++ www/changes.wiki | ||
| @@ -1,7 +1,15 @@ | ||
| 1 | 1 | <title>Change Log</title> |
| 2 | 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 | + | |
| 3 | 11 | <a name='v2_15'></a> |
| 4 | 12 | <h2>Changes for Version 2.15 (2021-03-26) and Patch 2.15.1 on (2021-04-07)</h2> |
| 5 | 13 | * <b>Patch 2.15.1:</b> Fix a data exfiltration bug in the server. <b>Upgrading to |
| 6 | 14 | the patch is recommended.</b><p> |
| 7 | 15 | * The [./defcsp.md|default CSP] has been relaxed slightly to allow |
| 8 | 16 |
| --- 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 |
+13
| --- www/javascript.md | ||
| +++ www/javascript.md | ||
| @@ -570,10 +570,23 @@ | ||
| 570 | 570 | |
| 571 | 571 | …would pull the messages submitted since the last poll. Making the |
| 572 | 572 | gateway bidirectional should be possible as well, as long as it properly |
| 573 | 573 | uses SQLite transactions. |
| 574 | 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 | + | |
| 575 | 588 | ---- |
| 576 | 589 | |
| 577 | 590 | ## <a id="future"></a>Future Plans for JavaScript in Fossil |
| 578 | 591 | |
| 579 | 592 | As of mid-2020, the informal provisional plan is to increase Fossil |
| 580 | 593 |
| --- 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 |