Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | On the /brlist page, try to prevent flicker of the "View N branches" label by creating the label using JS instead of as part of the original document. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
668f0e71e63c4343c08f53a4626ddba1 |
| User & Date: | drh 2021-04-30 18:07:33.659 |
Context
|
2021-04-30
| ||
| 20:44 | Fix small typo in comments (no functional changes) ... (check-in: 6f9ed5636a user: mgagnon tags: trunk) | |
| 18:07 | On the /brlist page, try to prevent flicker of the "View N branches" label by creating the label using JS instead of as part of the original document. ... (check-in: 668f0e71e6 user: drh tags: trunk) | |
| 15:13 | de-minify the custom CSS for the bootstrap skin, so that it is readable and editable. ... (check-in: 95a7269142 user: drh tags: trunk) | |
Changes
Changes to src/branch.c.
| ︙ | ︙ | |||
465 466 467 468 469 470 471 |
int show_colors = PB("colors");
login_check_credentials();
if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
style_set_current_feature("branch");
style_header("Branches");
style_adunit_config(ADUNIT_RIGHT_OK);
style_submenu_checkbox("colors", "Use Branch Colors", 0, 0);
| < > > | 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 |
int show_colors = PB("colors");
login_check_credentials();
if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
style_set_current_feature("branch");
style_header("Branches");
style_adunit_config(ADUNIT_RIGHT_OK);
style_submenu_checkbox("colors", "Use Branch Colors", 0, 0);
login_anonymous_available();
brlist_create_temp_table();
db_prepare(&q, "SELECT * FROM tmp_brlist ORDER BY mtime DESC");
rNow = db_double(0.0, "SELECT julianday('now')");
@ <script id="brlist-data" type="application/json">\
@ {"timelineUrl":"%R/timeline"}</script>
@ <div class="brlist">
@ <table class='sortable' data-column-types='tkNtt' data-init-sort='2'>
@ <thead><tr>
@ <th>Branch Name</th>
@ <th>Last Change</th>
@ <th>Check-ins</th>
@ <th>Status</th>
|
| ︙ | ︙ |
Changes to src/fossil.page.brlist.js.
| ︙ | ︙ | |||
8 9 10 11 12 13 14 |
* According to MDN 'const' requires Android's WebView 37,
* which may not be available.
* For the time being, continueing without 'const' and 'indexOf'
* (but that may be reconsidered later).
*/
window.addEventListener( 'load', function() {
| | > > > > | > > | < | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
* According to MDN 'const' requires Android's WebView 37,
* which may not be available.
* For the time being, continueing without 'const' and 'indexOf'
* (but that may be reconsidered later).
*/
window.addEventListener( 'load', function() {
var submenu = document.querySelector("div.submenu");
var anchor = document.createElement("A");
var brlistDataObj = document.getElementById("brlist-data");
var brlistDataTxt = brlistDataObj.textContent || brlistDataObj.innerText;
var brlistData = JSON.parse(brlistDataTxt);
anchor.classList.add("label");
anchor.classList.add("timeline-link");
anchor.href = brlistData.timelineUrl;
var prefix = anchor.href.toString() + "?ms=brlist&t=";
submenu.insertBefore(anchor,submenu.childNodes[0]);
var amendAnchor = function( selected ){
if( selected.length == 0 ){
anchor.classList.remove('selected');
anchor.href = prefix;
return;
}
re = selected.join(",");
try{re = encodeURIComponent(re);}
catch{console.log("encodeURIComponent() failed for ",re);}
anchor.href = prefix + re;
anchor.innerHTML = "View " + selected.length +
( selected.length > 1 ? " branches" : " branch" );
anchor.classList.add('selected');
}
var onChange = function( event ){
var cbx = event.target;
var tr = cbx.parentElement.parentElement;
var tag = cbx.parentElement.children[0].innerText;
var re = anchor.href.substr(prefix.length);
|
| ︙ | ︙ |