Fossil SCM

Merge from '<tt>brlist-timeline</tt>' which enables easy selection of several branches on the [/brlist] page. A special hyperlink in the submenu of [/brlist] page interactively tracks which branches are checked and points to the <tt>/timeline</tt> view of just these selected branches.

george 2021-04-22 01:40 trunk merge
Commit 5df47469a174421e545708e73ff41eaf2536a04c3aac52a7218eb538d1c7d425
--- skins/bootstrap/css.txt
+++ skins/bootstrap/css.txt
cannot compute difference between binary files
11
--- skins/bootstrap/css.txt
+++ skins/bootstrap/css.txt
0 annot compute difference between binary files
1
--- skins/bootstrap/css.txt
+++ skins/bootstrap/css.txt
0 annot compute difference between binary files
1
--- skins/bootstrap/footer.txt
+++ skins/bootstrap/footer.txt
@@ -8,20 +8,24 @@
88
</div>
99
<footer id="footer">
1010
<p>&#169; Copyright $<project_name>. All right reserved. Fossil $release_version &#183; <a href="$home/timeline.rss">RSS</a></p>
1111
</footer>
1212
<script nonce="$<nonce>">
13
+window.addEventListener( 'load', function() {
14
+var i;
1315
var tables = document.querySelectorAll('table');
14
-for (var i = 0; i < tables.length; i++) {
15
- if (tables[i].id !== "timelineTable")
16
- tables[i].classList.add('table');
16
+for(i = 0; i < tables.length; i++) {
17
+ if (tables[i].id !== "timelineTable"){
18
+ tables[i].classList.add('table');
19
+ }
1720
};
1821
var submenus = document.querySelectorAll('.submenu');
19
-for (var i = 0; i < submenus.length; i++) {
22
+var labels, j;
23
+for (i = 0; i < submenus.length; i++) {
2024
submenus[i].classList.add('btn-group');
21
- var labels = submenus[i].querySelectorAll('.label');
22
- for (var j = 0; j < labels.length; j++) {
25
+ labels = submenus[i].querySelectorAll('.label');
26
+ for (j = 0; j < labels.length; j++) {
2327
labels[j].classList.remove('label');
2428
labels[j].classList.add('btn');
2529
labels[j].classList.add('btn-default');
2630
labels[j].classList.add('btn-sm');
2731
}
@@ -33,6 +37,6 @@
3337
collapse.getAttribute('data-target')
3438
);
3539
target.classList.toggle('collapse');
3640
target.classList.toggle('collapsed');
3741
};
38
-</script>
42
+});</script>
3943
--- skins/bootstrap/footer.txt
+++ skins/bootstrap/footer.txt
@@ -8,20 +8,24 @@
8 </div>
9 <footer id="footer">
10 <p>&#169; Copyright $<project_name>. All right reserved. Fossil $release_version &#183; <a href="$home/timeline.rss">RSS</a></p>
11 </footer>
12 <script nonce="$<nonce>">
 
 
13 var tables = document.querySelectorAll('table');
14 for (var i = 0; i < tables.length; i++) {
15 if (tables[i].id !== "timelineTable")
16 tables[i].classList.add('table');
 
17 };
18 var submenus = document.querySelectorAll('.submenu');
19 for (var i = 0; i < submenus.length; i++) {
 
20 submenus[i].classList.add('btn-group');
21 var labels = submenus[i].querySelectorAll('.label');
22 for (var j = 0; j < labels.length; j++) {
23 labels[j].classList.remove('label');
24 labels[j].classList.add('btn');
25 labels[j].classList.add('btn-default');
26 labels[j].classList.add('btn-sm');
27 }
@@ -33,6 +37,6 @@
33 collapse.getAttribute('data-target')
34 );
35 target.classList.toggle('collapse');
36 target.classList.toggle('collapsed');
37 };
38 </script>
39
--- skins/bootstrap/footer.txt
+++ skins/bootstrap/footer.txt
@@ -8,20 +8,24 @@
8 </div>
9 <footer id="footer">
10 <p>&#169; Copyright $<project_name>. All right reserved. Fossil $release_version &#183; <a href="$home/timeline.rss">RSS</a></p>
11 </footer>
12 <script nonce="$<nonce>">
13 window.addEventListener( 'load', function() {
14 var i;
15 var tables = document.querySelectorAll('table');
16 for(i = 0; i < tables.length; i++) {
17 if (tables[i].id !== "timelineTable"){
18 tables[i].classList.add('table');
19 }
20 };
21 var submenus = document.querySelectorAll('.submenu');
22 var labels, j;
23 for (i = 0; i < submenus.length; i++) {
24 submenus[i].classList.add('btn-group');
25 labels = submenus[i].querySelectorAll('.label');
26 for (j = 0; j < labels.length; j++) {
27 labels[j].classList.remove('label');
28 labels[j].classList.add('btn');
29 labels[j].classList.add('btn-default');
30 labels[j].classList.add('btn-sm');
31 }
@@ -33,6 +37,6 @@
37 collapse.getAttribute('data-target')
38 );
39 target.classList.toggle('collapse');
40 target.classList.toggle('collapsed');
41 };
42 });</script>
43
+4 -1
--- src/branch.c
+++ src/branch.c
@@ -467,10 +467,11 @@
467467
if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
468468
style_set_current_feature("branch");
469469
style_header("Branches");
470470
style_adunit_config(ADUNIT_RIGHT_OK);
471471
style_submenu_checkbox("colors", "Use Branch Colors", 0, 0);
472
+ style_submenu_element("Timeline", "%R/timeline");
472473
login_anonymous_available();
473474
474475
brlist_create_temp_table();
475476
db_prepare(&q, "SELECT * FROM tmp_brlist ORDER BY mtime DESC");
476477
rNow = db_double(0.0, "SELECT julianday('now')");
@@ -504,11 +505,12 @@
504505
if( zBgClr && zBgClr[0] && show_colors ){
505506
@ <tr style="background-color:%s(zBgClr)">
506507
}else{
507508
@ <tr>
508509
}
509
- @ <td>%z(href("%R/timeline?r=%T",zBranch))%h(zBranch)</a></td>
510
+ @ <td>%z(href("%R/timeline?r=%T",zBranch))%h(zBranch)</a><input
511
+ @ type="checkbox" disabled="disabled"/></td>
510512
@ <td data-sortkey="%016llx(iMtime)">%s(zAge)</td>
511513
@ <td>%d(nCkin)</td>
512514
fossil_free(zAge);
513515
@ <td>%s(isClosed?"closed":"")</td>
514516
if( zMergeTo ){
@@ -519,10 +521,11 @@
519521
}
520522
@ </tr>
521523
}
522524
@ </tbody></table></div>
523525
db_finalize(&q);
526
+ builtin_request_js("fossil.page.brlist.js");
524527
style_table_sorter();
525528
style_finish_page();
526529
}
527530
528531
/*
529532
--- src/branch.c
+++ src/branch.c
@@ -467,10 +467,11 @@
467 if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
468 style_set_current_feature("branch");
469 style_header("Branches");
470 style_adunit_config(ADUNIT_RIGHT_OK);
471 style_submenu_checkbox("colors", "Use Branch Colors", 0, 0);
 
472 login_anonymous_available();
473
474 brlist_create_temp_table();
475 db_prepare(&q, "SELECT * FROM tmp_brlist ORDER BY mtime DESC");
476 rNow = db_double(0.0, "SELECT julianday('now')");
@@ -504,11 +505,12 @@
504 if( zBgClr && zBgClr[0] && show_colors ){
505 @ <tr style="background-color:%s(zBgClr)">
506 }else{
507 @ <tr>
508 }
509 @ <td>%z(href("%R/timeline?r=%T",zBranch))%h(zBranch)</a></td>
 
510 @ <td data-sortkey="%016llx(iMtime)">%s(zAge)</td>
511 @ <td>%d(nCkin)</td>
512 fossil_free(zAge);
513 @ <td>%s(isClosed?"closed":"")</td>
514 if( zMergeTo ){
@@ -519,10 +521,11 @@
519 }
520 @ </tr>
521 }
522 @ </tbody></table></div>
523 db_finalize(&q);
 
524 style_table_sorter();
525 style_finish_page();
526 }
527
528 /*
529
--- src/branch.c
+++ src/branch.c
@@ -467,10 +467,11 @@
467 if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
468 style_set_current_feature("branch");
469 style_header("Branches");
470 style_adunit_config(ADUNIT_RIGHT_OK);
471 style_submenu_checkbox("colors", "Use Branch Colors", 0, 0);
472 style_submenu_element("Timeline", "%R/timeline");
473 login_anonymous_available();
474
475 brlist_create_temp_table();
476 db_prepare(&q, "SELECT * FROM tmp_brlist ORDER BY mtime DESC");
477 rNow = db_double(0.0, "SELECT julianday('now')");
@@ -504,11 +505,12 @@
505 if( zBgClr && zBgClr[0] && show_colors ){
506 @ <tr style="background-color:%s(zBgClr)">
507 }else{
508 @ <tr>
509 }
510 @ <td>%z(href("%R/timeline?r=%T",zBranch))%h(zBranch)</a><input
511 @ type="checkbox" disabled="disabled"/></td>
512 @ <td data-sortkey="%016llx(iMtime)">%s(zAge)</td>
513 @ <td>%d(nCkin)</td>
514 fossil_free(zAge);
515 @ <td>%s(isClosed?"closed":"")</td>
516 if( zMergeTo ){
@@ -519,10 +521,11 @@
521 }
522 @ </tr>
523 }
524 @ </tbody></table></div>
525 db_finalize(&q);
526 builtin_request_js("fossil.page.brlist.js");
527 style_table_sorter();
528 style_finish_page();
529 }
530
531 /*
532
--- src/default.css
+++ src/default.css
@@ -1772,10 +1772,30 @@
17721772
}
17731773
17741774
input[type="checkbox"].diff-toggle {
17751775
float: right;
17761776
}
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.timeline-link {
1791
+ display: none;
1792
+}
1793
+body.branch .submenu > a.timeline-link.selected {
1794
+ display: inline;
1795
+}
1796
+
17771797
/* Objects in the "desktoponly" class are invisible on mobile */
17781798
@media screen and (max-width: 600px) {
17791799
.desktoponly {
17801800
display: none;
17811801
}
17821802
17831803
ADDED src/fossil.page.brlist.js
--- src/default.css
+++ src/default.css
@@ -1772,10 +1772,30 @@
1772 }
1773
1774 input[type="checkbox"].diff-toggle {
1775 float: right;
1776 }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1777 /* Objects in the "desktoponly" class are invisible on mobile */
1778 @media screen and (max-width: 600px) {
1779 .desktoponly {
1780 display: none;
1781 }
1782
1783 DDED src/fossil.page.brlist.js
--- src/default.css
+++ src/default.css
@@ -1772,10 +1772,30 @@
1772 }
1773
1774 input[type="checkbox"].diff-toggle {
1775 float: right;
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.timeline-link {
1791 display: none;
1792 }
1793 body.branch .submenu > a.timeline-link.selected {
1794 display: inline;
1795 }
1796
1797 /* Objects in the "desktoponly" class are invisible on mobile */
1798 @media screen and (max-width: 600px) {
1799 .desktoponly {
1800 display: none;
1801 }
1802
1803 DDED src/fossil.page.brlist.js
--- a/src/fossil.page.brlist.js
+++ b/src/fossil.page.brlist.js
@@ -0,0 +1,14 @@
1
+/*
2
+ * This script adds multiselect facility for the list of branches.
3
+ *
4
+ * Some info on 'const':
5
+ * https://caniuse.com/const
6
+ * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const#browser_compatibility
7
+ *
8
+ * According to MDN 'const' requires Android's WebView 37,
9
+ * which may not be available.
10
+ * For the time being, continueing without 'const' and 'indexOf'
11
+ * (but that may be reconsidered later).
12
+*/
13
+window.addEventListener(anchor, function( > a:first-of-type" );
14
+if( !anchor || anchor.innerText != "Timeline" ) returntimeline-link'",anchor.hrefGm@MV,3eAeED;regexp&rel||
--- a/src/fossil.page.brlist.js
+++ b/src/fossil.page.brlist.js
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
--- a/src/fossil.page.brlist.js
+++ b/src/fossil.page.brlist.js
@@ -0,0 +1,14 @@
1 /*
2 * This script adds multiselect facility for the list of branches.
3 *
4 * Some info on 'const':
5 * https://caniuse.com/const
6 * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const#browser_compatibility
7 *
8 * According to MDN 'const' requires Android's WebView 37,
9 * which may not be available.
10 * For the time being, continueing without 'const' and 'indexOf'
11 * (but that may be reconsidered later).
12 */
13 window.addEventListener(anchor, function( > a:first-of-type" );
14 if( !anchor || anchor.innerText != "Timeline" ) returntimeline-link'",anchor.hrefGm@MV,3eAeED;regexp&rel||
--- src/main.mk
+++ src/main.mk
@@ -226,10 +226,11 @@
226226
$(SRCDIR)/fossil.copybutton.js \
227227
$(SRCDIR)/fossil.dom.js \
228228
$(SRCDIR)/fossil.fetch.js \
229229
$(SRCDIR)/fossil.info-diff.js \
230230
$(SRCDIR)/fossil.numbered-lines.js \
231
+ $(SRCDIR)/fossil.page.brlist.js \
231232
$(SRCDIR)/fossil.page.fileedit.js \
232233
$(SRCDIR)/fossil.page.forumpost.js \
233234
$(SRCDIR)/fossil.page.pikchrshow.js \
234235
$(SRCDIR)/fossil.page.whistory.js \
235236
$(SRCDIR)/fossil.page.wikiedit.js \
236237
--- src/main.mk
+++ src/main.mk
@@ -226,10 +226,11 @@
226 $(SRCDIR)/fossil.copybutton.js \
227 $(SRCDIR)/fossil.dom.js \
228 $(SRCDIR)/fossil.fetch.js \
229 $(SRCDIR)/fossil.info-diff.js \
230 $(SRCDIR)/fossil.numbered-lines.js \
 
231 $(SRCDIR)/fossil.page.fileedit.js \
232 $(SRCDIR)/fossil.page.forumpost.js \
233 $(SRCDIR)/fossil.page.pikchrshow.js \
234 $(SRCDIR)/fossil.page.whistory.js \
235 $(SRCDIR)/fossil.page.wikiedit.js \
236
--- src/main.mk
+++ src/main.mk
@@ -226,10 +226,11 @@
226 $(SRCDIR)/fossil.copybutton.js \
227 $(SRCDIR)/fossil.dom.js \
228 $(SRCDIR)/fossil.fetch.js \
229 $(SRCDIR)/fossil.info-diff.js \
230 $(SRCDIR)/fossil.numbered-lines.js \
231 $(SRCDIR)/fossil.page.brlist.js \
232 $(SRCDIR)/fossil.page.fileedit.js \
233 $(SRCDIR)/fossil.page.forumpost.js \
234 $(SRCDIR)/fossil.page.pikchrshow.js \
235 $(SRCDIR)/fossil.page.whistory.js \
236 $(SRCDIR)/fossil.page.wikiedit.js \
237
--- 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