Fossil SCM
Change the "Log" submenu element of the annotation page so that it shows or hides the log using javascript, avoiding a server roundtrip and a recomputation of the annotation.
Commit
037e06b37015873b0f45b08ebe2d8ddbfcfabd0f32002fff21a8c15498c85782
Parent
a551d503c290e54…
6 files changed
+1
-1
+1
-1
+25
-30
+5
-5
+19
-11
+7
-7
+1
-1
| --- src/branch.c | ||
| +++ src/branch.c | ||
| @@ -388,11 +388,11 @@ | ||
| 388 | 388 | int show_colors = PB("colors"); |
| 389 | 389 | login_check_credentials(); |
| 390 | 390 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 391 | 391 | style_header("Branches"); |
| 392 | 392 | style_adunit_config(ADUNIT_RIGHT_OK); |
| 393 | - style_submenu_checkbox("colors", "Use Branch Colors", 0); | |
| 393 | + style_submenu_checkbox("colors", "Use Branch Colors", 0, 0); | |
| 394 | 394 | login_anonymous_available(); |
| 395 | 395 | |
| 396 | 396 | db_prepare(&q, brlistQuery/*works-like:""*/); |
| 397 | 397 | rNow = db_double(0.0, "SELECT julianday('now')"); |
| 398 | 398 | @ <div class="brlist"><table id="branchlisttable"> |
| 399 | 399 |
| --- src/branch.c | |
| +++ src/branch.c | |
| @@ -388,11 +388,11 @@ | |
| 388 | int show_colors = PB("colors"); |
| 389 | login_check_credentials(); |
| 390 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 391 | style_header("Branches"); |
| 392 | style_adunit_config(ADUNIT_RIGHT_OK); |
| 393 | style_submenu_checkbox("colors", "Use Branch Colors", 0); |
| 394 | login_anonymous_available(); |
| 395 | |
| 396 | db_prepare(&q, brlistQuery/*works-like:""*/); |
| 397 | rNow = db_double(0.0, "SELECT julianday('now')"); |
| 398 | @ <div class="brlist"><table id="branchlisttable"> |
| 399 |
| --- src/branch.c | |
| +++ src/branch.c | |
| @@ -388,11 +388,11 @@ | |
| 388 | int show_colors = PB("colors"); |
| 389 | login_check_credentials(); |
| 390 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 391 | style_header("Branches"); |
| 392 | style_adunit_config(ADUNIT_RIGHT_OK); |
| 393 | style_submenu_checkbox("colors", "Use Branch Colors", 0, 0); |
| 394 | login_anonymous_available(); |
| 395 | |
| 396 | db_prepare(&q, brlistQuery/*works-like:""*/); |
| 397 | rNow = db_double(0.0, "SELECT julianday('now')"); |
| 398 | @ <div class="brlist"><table id="branchlisttable"> |
| 399 |
+1
-1
| --- src/browse.c | ||
| +++ src/browse.c | ||
| @@ -753,11 +753,11 @@ | ||
| 753 | 753 | zObjType = "Folders"; |
| 754 | 754 | }else{ |
| 755 | 755 | zObjType = "Files"; |
| 756 | 756 | } |
| 757 | 757 | |
| 758 | - style_submenu_checkbox("nofiles", "Folders Only", 0); | |
| 758 | + style_submenu_checkbox("nofiles", "Folders Only", 0, 0); | |
| 759 | 759 | |
| 760 | 760 | if( zCI ){ |
| 761 | 761 | @ <h2>%s(zObjType) from |
| 762 | 762 | if( sqlite3_strnicmp(zCI, zUuid, (int)strlen(zCI))!=0 ){ |
| 763 | 763 | @ "%h(zCI)" |
| 764 | 764 |
| --- src/browse.c | |
| +++ src/browse.c | |
| @@ -753,11 +753,11 @@ | |
| 753 | zObjType = "Folders"; |
| 754 | }else{ |
| 755 | zObjType = "Files"; |
| 756 | } |
| 757 | |
| 758 | style_submenu_checkbox("nofiles", "Folders Only", 0); |
| 759 | |
| 760 | if( zCI ){ |
| 761 | @ <h2>%s(zObjType) from |
| 762 | if( sqlite3_strnicmp(zCI, zUuid, (int)strlen(zCI))!=0 ){ |
| 763 | @ "%h(zCI)" |
| 764 |
| --- src/browse.c | |
| +++ src/browse.c | |
| @@ -753,11 +753,11 @@ | |
| 753 | zObjType = "Folders"; |
| 754 | }else{ |
| 755 | zObjType = "Files"; |
| 756 | } |
| 757 | |
| 758 | style_submenu_checkbox("nofiles", "Folders Only", 0, 0); |
| 759 | |
| 760 | if( zCI ){ |
| 761 | @ <h2>%s(zObjType) from |
| 762 | if( sqlite3_strnicmp(zCI, zUuid, (int)strlen(zCI))!=0 ){ |
| 763 | @ "%h(zCI)" |
| 764 |
+25
-30
| --- src/diff.c | ||
| +++ src/diff.c | ||
| @@ -2315,10 +2315,11 @@ | ||
| 2315 | 2315 | int fileVers; /* Show file version instead of check-in versions */ |
| 2316 | 2316 | int ignoreWs; /* Ignore whitespace */ |
| 2317 | 2317 | const char *zFilename; /* Name of file to annotate */ |
| 2318 | 2318 | const char *zRevision; /* Name of check-in from which to start annotation */ |
| 2319 | 2319 | const char *zCI; /* The check-in containing zFilename */ |
| 2320 | + char *zLink; | |
| 2320 | 2321 | Annotator ann; |
| 2321 | 2322 | HQuery url; |
| 2322 | 2323 | struct AnnVers *p; |
| 2323 | 2324 | unsigned clr1, clr2, clr; |
| 2324 | 2325 | int bBlame = g.zPath[0]!='a';/* True for BLAME output. False for ANNOTATE. */ |
| @@ -2353,13 +2354,13 @@ | ||
| 2353 | 2354 | url_add_parameter(&url, "limit", sqlite3_mprintf("%d", iLimit)); |
| 2354 | 2355 | } |
| 2355 | 2356 | url_add_parameter(&url, "w", ignoreWs ? "1" : "0"); |
| 2356 | 2357 | url_add_parameter(&url, "log", showLog ? "1" : "0"); |
| 2357 | 2358 | url_add_parameter(&url, "filevers", fileVers ? "1" : "0"); |
| 2358 | - style_submenu_checkbox("w", "Ignore Whitespace", 0); | |
| 2359 | - style_submenu_checkbox("log", "Log", 0); | |
| 2360 | - style_submenu_checkbox("filevers", "Link to Files", 0); | |
| 2359 | + style_submenu_checkbox("w", "Ignore Whitespace", 0, 0); | |
| 2360 | + style_submenu_checkbox("log", "Log", 0, "toggle_annotation_log()"); | |
| 2361 | + style_submenu_checkbox("filevers", "Link to Files", 0, 0); | |
| 2361 | 2362 | if( ann.bLimit ){ |
| 2362 | 2363 | char *z1, *z2; |
| 2363 | 2364 | style_submenu_element("All Ancestors", "%s", |
| 2364 | 2365 | url_render(&url, "limit", "-1", 0, 0)); |
| 2365 | 2366 | z1 = sqlite3_mprintf("%d Ancestors", iLimit+20); |
| @@ -2380,37 +2381,31 @@ | ||
| 2380 | 2381 | for(p=ann.aVers, i=0; i<ann.nVers; i++, p++){ |
| 2381 | 2382 | clr = gradient_color(clr1, clr2, ann.nVers-1, i); |
| 2382 | 2383 | ann.aVers[i].zBgColor = mprintf("#%06x", clr); |
| 2383 | 2384 | } |
| 2384 | 2385 | |
| 2385 | - if( showLog ){ | |
| 2386 | - char *zLink = href("%R/finfo?name=%t&ci=%!S",zFilename,zCI); | |
| 2387 | - @ <h2>Ancestors of %z(zLink)%h(zFilename)</a> analyzed:</h2> | |
| 2388 | - @ <ol> | |
| 2389 | - for(p=ann.aVers, i=0; i<ann.nVers; i++, p++){ | |
| 2390 | - @ <li><span style='background-color:%s(p->zBgColor);'>%s(p->zDate) | |
| 2391 | - @ check-in %z(href("%R/info/%!S",p->zMUuid))%S(p->zMUuid)</a> | |
| 2392 | - @ artifact %z(href("%R/artifact/%!S",p->zFUuid))%S(p->zFUuid)</a> | |
| 2393 | - @ </span> | |
| 2394 | -#if 0 | |
| 2395 | - if( i>0 ){ | |
| 2396 | - char *zLink = xhref("target='infowindow'", | |
| 2397 | - "%R/fdiff?v1=%S&v2=%S&sbs=1", | |
| 2398 | - p->zFUuid,ann.aVers[0].zFUuid); | |
| 2399 | - @ %z(zLink)[diff-to-top]</a> | |
| 2400 | - if( i>1 ){ | |
| 2401 | - zLink = xhref("target='infowindow'", | |
| 2402 | - "%R/fdiff?v1=%S&v2=%S&sbs=1", | |
| 2403 | - p->zFUuid,p[-1].zFUuid); | |
| 2404 | - @ %z(zLink)[diff-to-previous]</a> | |
| 2405 | - } | |
| 2406 | - } | |
| 2407 | -#endif | |
| 2408 | - } | |
| 2409 | - @ </ol> | |
| 2410 | - @ <hr /> | |
| 2411 | - } | |
| 2386 | + @ <div id="annotation_log" style='display:%s(showLog?"block":"none")'> | |
| 2387 | + zLink = href("%R/finfo?name=%t&ci=%!S",zFilename,zCI); | |
| 2388 | + @ <h2>Versions of %z(zLink)%h(zFilename)</a> analyzed:</h2> | |
| 2389 | + @ <ol> | |
| 2390 | + for(p=ann.aVers, i=0; i<ann.nVers; i++, p++){ | |
| 2391 | + @ <li><span style='background-color:%s(p->zBgColor);'>%s(p->zDate) | |
| 2392 | + @ check-in %z(href("%R/info/%!S",p->zMUuid))%S(p->zMUuid)</a> | |
| 2393 | + @ artifact %z(href("%R/artifact/%!S",p->zFUuid))%S(p->zFUuid)</a> | |
| 2394 | + @ </span> | |
| 2395 | + } | |
| 2396 | + @ </ol> | |
| 2397 | + @ <hr /> | |
| 2398 | + @ </div> | |
| 2399 | + @ <script> | |
| 2400 | + @ function toggle_annotation_log(){ | |
| 2401 | + @ var w = gebi("annotation_log"); | |
| 2402 | + @ var x = document.forms["f01"].elements["log"].checked | |
| 2403 | + @ w.style.display = x ? "block" : "none"; | |
| 2404 | + @ } | |
| 2405 | + @ </script> | |
| 2406 | + | |
| 2412 | 2407 | if( !ann.bLimit ){ |
| 2413 | 2408 | @ <h2>Origin for each line in |
| 2414 | 2409 | @ %z(href("%R/finfo?name=%h&ci=%!S", zFilename, zCI))%h(zFilename)</a> |
| 2415 | 2410 | @ from check-in %z(href("%R/info/%!S",zCI))%S(zCI)</a>:</h2> |
| 2416 | 2411 | iLimit = ann.nVers+10; |
| 2417 | 2412 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -2315,10 +2315,11 @@ | |
| 2315 | int fileVers; /* Show file version instead of check-in versions */ |
| 2316 | int ignoreWs; /* Ignore whitespace */ |
| 2317 | const char *zFilename; /* Name of file to annotate */ |
| 2318 | const char *zRevision; /* Name of check-in from which to start annotation */ |
| 2319 | const char *zCI; /* The check-in containing zFilename */ |
| 2320 | Annotator ann; |
| 2321 | HQuery url; |
| 2322 | struct AnnVers *p; |
| 2323 | unsigned clr1, clr2, clr; |
| 2324 | int bBlame = g.zPath[0]!='a';/* True for BLAME output. False for ANNOTATE. */ |
| @@ -2353,13 +2354,13 @@ | |
| 2353 | url_add_parameter(&url, "limit", sqlite3_mprintf("%d", iLimit)); |
| 2354 | } |
| 2355 | url_add_parameter(&url, "w", ignoreWs ? "1" : "0"); |
| 2356 | url_add_parameter(&url, "log", showLog ? "1" : "0"); |
| 2357 | url_add_parameter(&url, "filevers", fileVers ? "1" : "0"); |
| 2358 | style_submenu_checkbox("w", "Ignore Whitespace", 0); |
| 2359 | style_submenu_checkbox("log", "Log", 0); |
| 2360 | style_submenu_checkbox("filevers", "Link to Files", 0); |
| 2361 | if( ann.bLimit ){ |
| 2362 | char *z1, *z2; |
| 2363 | style_submenu_element("All Ancestors", "%s", |
| 2364 | url_render(&url, "limit", "-1", 0, 0)); |
| 2365 | z1 = sqlite3_mprintf("%d Ancestors", iLimit+20); |
| @@ -2380,37 +2381,31 @@ | |
| 2380 | for(p=ann.aVers, i=0; i<ann.nVers; i++, p++){ |
| 2381 | clr = gradient_color(clr1, clr2, ann.nVers-1, i); |
| 2382 | ann.aVers[i].zBgColor = mprintf("#%06x", clr); |
| 2383 | } |
| 2384 | |
| 2385 | if( showLog ){ |
| 2386 | char *zLink = href("%R/finfo?name=%t&ci=%!S",zFilename,zCI); |
| 2387 | @ <h2>Ancestors of %z(zLink)%h(zFilename)</a> analyzed:</h2> |
| 2388 | @ <ol> |
| 2389 | for(p=ann.aVers, i=0; i<ann.nVers; i++, p++){ |
| 2390 | @ <li><span style='background-color:%s(p->zBgColor);'>%s(p->zDate) |
| 2391 | @ check-in %z(href("%R/info/%!S",p->zMUuid))%S(p->zMUuid)</a> |
| 2392 | @ artifact %z(href("%R/artifact/%!S",p->zFUuid))%S(p->zFUuid)</a> |
| 2393 | @ </span> |
| 2394 | #if 0 |
| 2395 | if( i>0 ){ |
| 2396 | char *zLink = xhref("target='infowindow'", |
| 2397 | "%R/fdiff?v1=%S&v2=%S&sbs=1", |
| 2398 | p->zFUuid,ann.aVers[0].zFUuid); |
| 2399 | @ %z(zLink)[diff-to-top]</a> |
| 2400 | if( i>1 ){ |
| 2401 | zLink = xhref("target='infowindow'", |
| 2402 | "%R/fdiff?v1=%S&v2=%S&sbs=1", |
| 2403 | p->zFUuid,p[-1].zFUuid); |
| 2404 | @ %z(zLink)[diff-to-previous]</a> |
| 2405 | } |
| 2406 | } |
| 2407 | #endif |
| 2408 | } |
| 2409 | @ </ol> |
| 2410 | @ <hr /> |
| 2411 | } |
| 2412 | if( !ann.bLimit ){ |
| 2413 | @ <h2>Origin for each line in |
| 2414 | @ %z(href("%R/finfo?name=%h&ci=%!S", zFilename, zCI))%h(zFilename)</a> |
| 2415 | @ from check-in %z(href("%R/info/%!S",zCI))%S(zCI)</a>:</h2> |
| 2416 | iLimit = ann.nVers+10; |
| 2417 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -2315,10 +2315,11 @@ | |
| 2315 | int fileVers; /* Show file version instead of check-in versions */ |
| 2316 | int ignoreWs; /* Ignore whitespace */ |
| 2317 | const char *zFilename; /* Name of file to annotate */ |
| 2318 | const char *zRevision; /* Name of check-in from which to start annotation */ |
| 2319 | const char *zCI; /* The check-in containing zFilename */ |
| 2320 | char *zLink; |
| 2321 | Annotator ann; |
| 2322 | HQuery url; |
| 2323 | struct AnnVers *p; |
| 2324 | unsigned clr1, clr2, clr; |
| 2325 | int bBlame = g.zPath[0]!='a';/* True for BLAME output. False for ANNOTATE. */ |
| @@ -2353,13 +2354,13 @@ | |
| 2354 | url_add_parameter(&url, "limit", sqlite3_mprintf("%d", iLimit)); |
| 2355 | } |
| 2356 | url_add_parameter(&url, "w", ignoreWs ? "1" : "0"); |
| 2357 | url_add_parameter(&url, "log", showLog ? "1" : "0"); |
| 2358 | url_add_parameter(&url, "filevers", fileVers ? "1" : "0"); |
| 2359 | style_submenu_checkbox("w", "Ignore Whitespace", 0, 0); |
| 2360 | style_submenu_checkbox("log", "Log", 0, "toggle_annotation_log()"); |
| 2361 | style_submenu_checkbox("filevers", "Link to Files", 0, 0); |
| 2362 | if( ann.bLimit ){ |
| 2363 | char *z1, *z2; |
| 2364 | style_submenu_element("All Ancestors", "%s", |
| 2365 | url_render(&url, "limit", "-1", 0, 0)); |
| 2366 | z1 = sqlite3_mprintf("%d Ancestors", iLimit+20); |
| @@ -2380,37 +2381,31 @@ | |
| 2381 | for(p=ann.aVers, i=0; i<ann.nVers; i++, p++){ |
| 2382 | clr = gradient_color(clr1, clr2, ann.nVers-1, i); |
| 2383 | ann.aVers[i].zBgColor = mprintf("#%06x", clr); |
| 2384 | } |
| 2385 | |
| 2386 | @ <div id="annotation_log" style='display:%s(showLog?"block":"none")'> |
| 2387 | zLink = href("%R/finfo?name=%t&ci=%!S",zFilename,zCI); |
| 2388 | @ <h2>Versions of %z(zLink)%h(zFilename)</a> analyzed:</h2> |
| 2389 | @ <ol> |
| 2390 | for(p=ann.aVers, i=0; i<ann.nVers; i++, p++){ |
| 2391 | @ <li><span style='background-color:%s(p->zBgColor);'>%s(p->zDate) |
| 2392 | @ check-in %z(href("%R/info/%!S",p->zMUuid))%S(p->zMUuid)</a> |
| 2393 | @ artifact %z(href("%R/artifact/%!S",p->zFUuid))%S(p->zFUuid)</a> |
| 2394 | @ </span> |
| 2395 | } |
| 2396 | @ </ol> |
| 2397 | @ <hr /> |
| 2398 | @ </div> |
| 2399 | @ <script> |
| 2400 | @ function toggle_annotation_log(){ |
| 2401 | @ var w = gebi("annotation_log"); |
| 2402 | @ var x = document.forms["f01"].elements["log"].checked |
| 2403 | @ w.style.display = x ? "block" : "none"; |
| 2404 | @ } |
| 2405 | @ </script> |
| 2406 | |
| 2407 | if( !ann.bLimit ){ |
| 2408 | @ <h2>Origin for each line in |
| 2409 | @ %z(href("%R/finfo?name=%h&ci=%!S", zFilename, zCI))%h(zFilename)</a> |
| 2410 | @ from check-in %z(href("%R/info/%!S",zCI))%S(zCI)</a>:</h2> |
| 2411 | iLimit = ann.nVers+10; |
| 2412 |
+5
-5
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -1154,11 +1154,11 @@ | ||
| 1154 | 1154 | sideBySide, (verboseFlag && !sideBySide)?"&v":"", zW); |
| 1155 | 1155 | }else{ |
| 1156 | 1156 | style_submenu_element("Patch", "%R/vpatch?from=%T&to=%T%s", zFrom, zTo, zW); |
| 1157 | 1157 | } |
| 1158 | 1158 | if( sideBySide || verboseFlag ){ |
| 1159 | - style_submenu_checkbox("w", "Ignore Whitespace", 0); | |
| 1159 | + style_submenu_checkbox("w", "Ignore Whitespace", 0, 0); | |
| 1160 | 1160 | } |
| 1161 | 1161 | style_header("Check-in Differences"); |
| 1162 | 1162 | if( P("nohdr")==0 ){ |
| 1163 | 1163 | @ <h2>Difference From:</h2><blockquote> |
| 1164 | 1164 | checkin_description(ridFrom); |
| @@ -1586,13 +1586,13 @@ | ||
| 1586 | 1586 | zV1 = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", v1); |
| 1587 | 1587 | zV2 = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", v2); |
| 1588 | 1588 | diffFlags = construct_diff_flags(1, sideBySide) | DIFF_HTML; |
| 1589 | 1589 | |
| 1590 | 1590 | style_header("Diff"); |
| 1591 | - style_submenu_checkbox("w", "Ignore Whitespace", 0); | |
| 1592 | - style_submenu_checkbox("sbs", "Side-by-Side Diff", 0); | |
| 1593 | - style_submenu_checkbox("verbose", "Verbose", 0); | |
| 1591 | + style_submenu_checkbox("w", "Ignore Whitespace", 0, 0); | |
| 1592 | + style_submenu_checkbox("sbs", "Side-by-Side Diff", 0, 0); | |
| 1593 | + style_submenu_checkbox("verbose", "Verbose", 0, 0); | |
| 1594 | 1594 | style_submenu_element("Patch", "%s/fdiff?v1=%T&v2=%T&patch", |
| 1595 | 1595 | g.zTop, P("v1"), P("v2")); |
| 1596 | 1596 | |
| 1597 | 1597 | if( P("smhdr")!=0 ){ |
| 1598 | 1598 | @ <h2>Differences From Artifact |
| @@ -2084,11 +2084,11 @@ | ||
| 2084 | 2084 | } |
| 2085 | 2085 | if( descOnly ){ |
| 2086 | 2086 | style_submenu_element("Content", "%R/artifact/%s", zUuid); |
| 2087 | 2087 | }else{ |
| 2088 | 2088 | if( zLn==0 || atoi(zLn)==0 ){ |
| 2089 | - style_submenu_checkbox("ln", "Line Numbers", 0); | |
| 2089 | + style_submenu_checkbox("ln", "Line Numbers", 0, 0); | |
| 2090 | 2090 | } |
| 2091 | 2091 | @ <hr /> |
| 2092 | 2092 | content_get(rid, &content); |
| 2093 | 2093 | if( renderAsWiki ){ |
| 2094 | 2094 | wiki_render_by_mimetype(&content, zMime); |
| 2095 | 2095 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -1154,11 +1154,11 @@ | |
| 1154 | sideBySide, (verboseFlag && !sideBySide)?"&v":"", zW); |
| 1155 | }else{ |
| 1156 | style_submenu_element("Patch", "%R/vpatch?from=%T&to=%T%s", zFrom, zTo, zW); |
| 1157 | } |
| 1158 | if( sideBySide || verboseFlag ){ |
| 1159 | style_submenu_checkbox("w", "Ignore Whitespace", 0); |
| 1160 | } |
| 1161 | style_header("Check-in Differences"); |
| 1162 | if( P("nohdr")==0 ){ |
| 1163 | @ <h2>Difference From:</h2><blockquote> |
| 1164 | checkin_description(ridFrom); |
| @@ -1586,13 +1586,13 @@ | |
| 1586 | zV1 = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", v1); |
| 1587 | zV2 = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", v2); |
| 1588 | diffFlags = construct_diff_flags(1, sideBySide) | DIFF_HTML; |
| 1589 | |
| 1590 | style_header("Diff"); |
| 1591 | style_submenu_checkbox("w", "Ignore Whitespace", 0); |
| 1592 | style_submenu_checkbox("sbs", "Side-by-Side Diff", 0); |
| 1593 | style_submenu_checkbox("verbose", "Verbose", 0); |
| 1594 | style_submenu_element("Patch", "%s/fdiff?v1=%T&v2=%T&patch", |
| 1595 | g.zTop, P("v1"), P("v2")); |
| 1596 | |
| 1597 | if( P("smhdr")!=0 ){ |
| 1598 | @ <h2>Differences From Artifact |
| @@ -2084,11 +2084,11 @@ | |
| 2084 | } |
| 2085 | if( descOnly ){ |
| 2086 | style_submenu_element("Content", "%R/artifact/%s", zUuid); |
| 2087 | }else{ |
| 2088 | if( zLn==0 || atoi(zLn)==0 ){ |
| 2089 | style_submenu_checkbox("ln", "Line Numbers", 0); |
| 2090 | } |
| 2091 | @ <hr /> |
| 2092 | content_get(rid, &content); |
| 2093 | if( renderAsWiki ){ |
| 2094 | wiki_render_by_mimetype(&content, zMime); |
| 2095 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -1154,11 +1154,11 @@ | |
| 1154 | sideBySide, (verboseFlag && !sideBySide)?"&v":"", zW); |
| 1155 | }else{ |
| 1156 | style_submenu_element("Patch", "%R/vpatch?from=%T&to=%T%s", zFrom, zTo, zW); |
| 1157 | } |
| 1158 | if( sideBySide || verboseFlag ){ |
| 1159 | style_submenu_checkbox("w", "Ignore Whitespace", 0, 0); |
| 1160 | } |
| 1161 | style_header("Check-in Differences"); |
| 1162 | if( P("nohdr")==0 ){ |
| 1163 | @ <h2>Difference From:</h2><blockquote> |
| 1164 | checkin_description(ridFrom); |
| @@ -1586,13 +1586,13 @@ | |
| 1586 | zV1 = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", v1); |
| 1587 | zV2 = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", v2); |
| 1588 | diffFlags = construct_diff_flags(1, sideBySide) | DIFF_HTML; |
| 1589 | |
| 1590 | style_header("Diff"); |
| 1591 | style_submenu_checkbox("w", "Ignore Whitespace", 0, 0); |
| 1592 | style_submenu_checkbox("sbs", "Side-by-Side Diff", 0, 0); |
| 1593 | style_submenu_checkbox("verbose", "Verbose", 0, 0); |
| 1594 | style_submenu_element("Patch", "%s/fdiff?v1=%T&v2=%T&patch", |
| 1595 | g.zTop, P("v1"), P("v2")); |
| 1596 | |
| 1597 | if( P("smhdr")!=0 ){ |
| 1598 | @ <h2>Differences From Artifact |
| @@ -2084,11 +2084,11 @@ | |
| 2084 | } |
| 2085 | if( descOnly ){ |
| 2086 | style_submenu_element("Content", "%R/artifact/%s", zUuid); |
| 2087 | }else{ |
| 2088 | if( zLn==0 || atoi(zLn)==0 ){ |
| 2089 | style_submenu_checkbox("ln", "Line Numbers", 0, 0); |
| 2090 | } |
| 2091 | @ <hr /> |
| 2092 | content_get(rid, &content); |
| 2093 | if( renderAsWiki ){ |
| 2094 | wiki_render_by_mimetype(&content, zMime); |
| 2095 |
+19
-11
| --- src/style.c | ||
| +++ src/style.c | ||
| @@ -44,17 +44,18 @@ | ||
| 44 | 44 | const char *zLabel; /* Button label */ |
| 45 | 45 | const char *zLink; /* Jump to this link when button is pressed */ |
| 46 | 46 | } aSubmenu[30]; |
| 47 | 47 | static int nSubmenu = 0; /* Number of buttons */ |
| 48 | 48 | static struct SubmenuCtrl { |
| 49 | - const char *zName; /* Form query parameter */ | |
| 50 | - const char *zLabel; /* Label. Might be NULL for FF_MULTI */ | |
| 51 | - unsigned char eType; /* FF_ENTRY, FF_MULTI, FF_BINARY */ | |
| 52 | - unsigned char isDisabled; /* True if this control is grayed out */ | |
| 53 | - short int iSize; /* Width for FF_ENTRY. Count for FF_MULTI */ | |
| 54 | - const char *const *azChoice;/* value/display pairs for FF_MULTI */ | |
| 55 | - const char *zFalse; /* FF_BINARY label when false */ | |
| 49 | + const char *zName; /* Form query parameter */ | |
| 50 | + const char *zLabel; /* Label. Might be NULL for FF_MULTI */ | |
| 51 | + unsigned char eType; /* FF_ENTRY, FF_MULTI, FF_BINARY */ | |
| 52 | + unsigned char isDisabled; /* True if this control is grayed out */ | |
| 53 | + short int iSize; /* Width for FF_ENTRY. Count for FF_MULTI */ | |
| 54 | + const char *const *azChoice; /* value/display pairs for FF_MULTI */ | |
| 55 | + const char *zFalse; /* FF_BINARY label when false */ | |
| 56 | + const char *zJS; /* Javascript to run on toggle */ | |
| 56 | 57 | } aSubmenuCtrl[20]; |
| 57 | 58 | static int nSubmenuCtrl = 0; |
| 58 | 59 | #define FF_ENTRY 1 |
| 59 | 60 | #define FF_MULTI 2 |
| 60 | 61 | #define FF_BINARY 3 |
| @@ -260,16 +261,18 @@ | ||
| 260 | 261 | nSubmenuCtrl++; |
| 261 | 262 | } |
| 262 | 263 | void style_submenu_checkbox( |
| 263 | 264 | const char *zName, /* Query parameter name */ |
| 264 | 265 | const char *zLabel, /* Label to display after the checkbox */ |
| 265 | - int isDisabled /* True if disabled */ | |
| 266 | + int isDisabled, /* True if disabled */ | |
| 267 | + const char *zJS /* Optional javascript to run on toggle */ | |
| 266 | 268 | ){ |
| 267 | 269 | assert( nSubmenuCtrl < count(aSubmenuCtrl) ); |
| 268 | 270 | aSubmenuCtrl[nSubmenuCtrl].zName = zName; |
| 269 | 271 | aSubmenuCtrl[nSubmenuCtrl].zLabel = zLabel; |
| 270 | 272 | aSubmenuCtrl[nSubmenuCtrl].isDisabled = isDisabled; |
| 273 | + aSubmenuCtrl[nSubmenuCtrl].zJS = zJS; | |
| 271 | 274 | aSubmenuCtrl[nSubmenuCtrl].eType = FF_CHECKBOX; |
| 272 | 275 | nSubmenuCtrl++; |
| 273 | 276 | } |
| 274 | 277 | void style_submenu_binary( |
| 275 | 278 | const char *zName, /* Query parameter name */ |
| @@ -593,19 +596,24 @@ | ||
| 593 | 596 | } |
| 594 | 597 | @ >%h(aSubmenuCtrl[i].zFalse)</option> |
| 595 | 598 | @ </select> |
| 596 | 599 | break; |
| 597 | 600 | } |
| 598 | - case FF_CHECKBOX: | |
| 601 | + case FF_CHECKBOX: { | |
| 599 | 602 | @ <label class='submenuctrl submenuckbox'>\ |
| 600 | 603 | @ <input type='checkbox' name='%s(zQPN)' \ |
| 601 | 604 | if( PB(zQPN) ){ |
| 602 | 605 | @ checked \ |
| 603 | 606 | } |
| 604 | - @ onchange='gebi("f01").submit();'%s(zDisabled)>\ | |
| 607 | + if( aSubmenuCtrl[i].zJS ){ | |
| 608 | + @ onchange='%s(aSubmenuCtrl[i].zJS)'%s(zDisabled)>\ | |
| 609 | + }else{ | |
| 610 | + @ onchange='gebi("f01").submit();'%s(zDisabled)>\ | |
| 611 | + } | |
| 605 | 612 | @ %h(aSubmenuCtrl[i].zLabel)</label> |
| 606 | 613 | break; |
| 614 | + } | |
| 607 | 615 | } |
| 608 | 616 | } |
| 609 | 617 | @ </div> |
| 610 | 618 | if( nSubmenuCtrl ){ |
| 611 | 619 | cgi_query_parameters_to_hidden(); |
| @@ -1593,11 +1601,11 @@ | ||
| 1593 | 1601 | return; |
| 1594 | 1602 | } |
| 1595 | 1603 | for(i=0; i<count(azCgiVars); i++) (void)P(azCgiVars[i]); |
| 1596 | 1604 | style_header("Environment Test"); |
| 1597 | 1605 | showAll = PB("showall"); |
| 1598 | - style_submenu_checkbox("showall", "Cookies", 0); | |
| 1606 | + style_submenu_checkbox("showall", "Cookies", 0, 0); | |
| 1599 | 1607 | style_submenu_element("Stats", "%R/stat"); |
| 1600 | 1608 | |
| 1601 | 1609 | #if !defined(_WIN32) |
| 1602 | 1610 | @ uid=%d(getuid()), gid=%d(getgid())<br /> |
| 1603 | 1611 | #endif |
| 1604 | 1612 |
| --- src/style.c | |
| +++ src/style.c | |
| @@ -44,17 +44,18 @@ | |
| 44 | const char *zLabel; /* Button label */ |
| 45 | const char *zLink; /* Jump to this link when button is pressed */ |
| 46 | } aSubmenu[30]; |
| 47 | static int nSubmenu = 0; /* Number of buttons */ |
| 48 | static struct SubmenuCtrl { |
| 49 | const char *zName; /* Form query parameter */ |
| 50 | const char *zLabel; /* Label. Might be NULL for FF_MULTI */ |
| 51 | unsigned char eType; /* FF_ENTRY, FF_MULTI, FF_BINARY */ |
| 52 | unsigned char isDisabled; /* True if this control is grayed out */ |
| 53 | short int iSize; /* Width for FF_ENTRY. Count for FF_MULTI */ |
| 54 | const char *const *azChoice;/* value/display pairs for FF_MULTI */ |
| 55 | const char *zFalse; /* FF_BINARY label when false */ |
| 56 | } aSubmenuCtrl[20]; |
| 57 | static int nSubmenuCtrl = 0; |
| 58 | #define FF_ENTRY 1 |
| 59 | #define FF_MULTI 2 |
| 60 | #define FF_BINARY 3 |
| @@ -260,16 +261,18 @@ | |
| 260 | nSubmenuCtrl++; |
| 261 | } |
| 262 | void style_submenu_checkbox( |
| 263 | const char *zName, /* Query parameter name */ |
| 264 | const char *zLabel, /* Label to display after the checkbox */ |
| 265 | int isDisabled /* True if disabled */ |
| 266 | ){ |
| 267 | assert( nSubmenuCtrl < count(aSubmenuCtrl) ); |
| 268 | aSubmenuCtrl[nSubmenuCtrl].zName = zName; |
| 269 | aSubmenuCtrl[nSubmenuCtrl].zLabel = zLabel; |
| 270 | aSubmenuCtrl[nSubmenuCtrl].isDisabled = isDisabled; |
| 271 | aSubmenuCtrl[nSubmenuCtrl].eType = FF_CHECKBOX; |
| 272 | nSubmenuCtrl++; |
| 273 | } |
| 274 | void style_submenu_binary( |
| 275 | const char *zName, /* Query parameter name */ |
| @@ -593,19 +596,24 @@ | |
| 593 | } |
| 594 | @ >%h(aSubmenuCtrl[i].zFalse)</option> |
| 595 | @ </select> |
| 596 | break; |
| 597 | } |
| 598 | case FF_CHECKBOX: |
| 599 | @ <label class='submenuctrl submenuckbox'>\ |
| 600 | @ <input type='checkbox' name='%s(zQPN)' \ |
| 601 | if( PB(zQPN) ){ |
| 602 | @ checked \ |
| 603 | } |
| 604 | @ onchange='gebi("f01").submit();'%s(zDisabled)>\ |
| 605 | @ %h(aSubmenuCtrl[i].zLabel)</label> |
| 606 | break; |
| 607 | } |
| 608 | } |
| 609 | @ </div> |
| 610 | if( nSubmenuCtrl ){ |
| 611 | cgi_query_parameters_to_hidden(); |
| @@ -1593,11 +1601,11 @@ | |
| 1593 | return; |
| 1594 | } |
| 1595 | for(i=0; i<count(azCgiVars); i++) (void)P(azCgiVars[i]); |
| 1596 | style_header("Environment Test"); |
| 1597 | showAll = PB("showall"); |
| 1598 | style_submenu_checkbox("showall", "Cookies", 0); |
| 1599 | style_submenu_element("Stats", "%R/stat"); |
| 1600 | |
| 1601 | #if !defined(_WIN32) |
| 1602 | @ uid=%d(getuid()), gid=%d(getgid())<br /> |
| 1603 | #endif |
| 1604 |
| --- src/style.c | |
| +++ src/style.c | |
| @@ -44,17 +44,18 @@ | |
| 44 | const char *zLabel; /* Button label */ |
| 45 | const char *zLink; /* Jump to this link when button is pressed */ |
| 46 | } aSubmenu[30]; |
| 47 | static int nSubmenu = 0; /* Number of buttons */ |
| 48 | static struct SubmenuCtrl { |
| 49 | const char *zName; /* Form query parameter */ |
| 50 | const char *zLabel; /* Label. Might be NULL for FF_MULTI */ |
| 51 | unsigned char eType; /* FF_ENTRY, FF_MULTI, FF_BINARY */ |
| 52 | unsigned char isDisabled; /* True if this control is grayed out */ |
| 53 | short int iSize; /* Width for FF_ENTRY. Count for FF_MULTI */ |
| 54 | const char *const *azChoice; /* value/display pairs for FF_MULTI */ |
| 55 | const char *zFalse; /* FF_BINARY label when false */ |
| 56 | const char *zJS; /* Javascript to run on toggle */ |
| 57 | } aSubmenuCtrl[20]; |
| 58 | static int nSubmenuCtrl = 0; |
| 59 | #define FF_ENTRY 1 |
| 60 | #define FF_MULTI 2 |
| 61 | #define FF_BINARY 3 |
| @@ -260,16 +261,18 @@ | |
| 261 | nSubmenuCtrl++; |
| 262 | } |
| 263 | void style_submenu_checkbox( |
| 264 | const char *zName, /* Query parameter name */ |
| 265 | const char *zLabel, /* Label to display after the checkbox */ |
| 266 | int isDisabled, /* True if disabled */ |
| 267 | const char *zJS /* Optional javascript to run on toggle */ |
| 268 | ){ |
| 269 | assert( nSubmenuCtrl < count(aSubmenuCtrl) ); |
| 270 | aSubmenuCtrl[nSubmenuCtrl].zName = zName; |
| 271 | aSubmenuCtrl[nSubmenuCtrl].zLabel = zLabel; |
| 272 | aSubmenuCtrl[nSubmenuCtrl].isDisabled = isDisabled; |
| 273 | aSubmenuCtrl[nSubmenuCtrl].zJS = zJS; |
| 274 | aSubmenuCtrl[nSubmenuCtrl].eType = FF_CHECKBOX; |
| 275 | nSubmenuCtrl++; |
| 276 | } |
| 277 | void style_submenu_binary( |
| 278 | const char *zName, /* Query parameter name */ |
| @@ -593,19 +596,24 @@ | |
| 596 | } |
| 597 | @ >%h(aSubmenuCtrl[i].zFalse)</option> |
| 598 | @ </select> |
| 599 | break; |
| 600 | } |
| 601 | case FF_CHECKBOX: { |
| 602 | @ <label class='submenuctrl submenuckbox'>\ |
| 603 | @ <input type='checkbox' name='%s(zQPN)' \ |
| 604 | if( PB(zQPN) ){ |
| 605 | @ checked \ |
| 606 | } |
| 607 | if( aSubmenuCtrl[i].zJS ){ |
| 608 | @ onchange='%s(aSubmenuCtrl[i].zJS)'%s(zDisabled)>\ |
| 609 | }else{ |
| 610 | @ onchange='gebi("f01").submit();'%s(zDisabled)>\ |
| 611 | } |
| 612 | @ %h(aSubmenuCtrl[i].zLabel)</label> |
| 613 | break; |
| 614 | } |
| 615 | } |
| 616 | } |
| 617 | @ </div> |
| 618 | if( nSubmenuCtrl ){ |
| 619 | cgi_query_parameters_to_hidden(); |
| @@ -1593,11 +1601,11 @@ | |
| 1601 | return; |
| 1602 | } |
| 1603 | for(i=0; i<count(azCgiVars); i++) (void)P(azCgiVars[i]); |
| 1604 | style_header("Environment Test"); |
| 1605 | showAll = PB("showall"); |
| 1606 | style_submenu_checkbox("showall", "Cookies", 0, 0); |
| 1607 | style_submenu_element("Stats", "%R/stat"); |
| 1608 | |
| 1609 | #if !defined(_WIN32) |
| 1610 | @ uid=%d(getuid()), gid=%d(getgid())<br /> |
| 1611 | #endif |
| 1612 |
+7
-7
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -1616,11 +1616,11 @@ | ||
| 1616 | 1616 | /* For exact maching, inhibit links to the selected tag. */ |
| 1617 | 1617 | zThisTag = zTagName; |
| 1618 | 1618 | } |
| 1619 | 1619 | |
| 1620 | 1620 | /* Display a checkbox to enable/disable display of related check-ins. */ |
| 1621 | - style_submenu_checkbox("rel", "Related", 0); | |
| 1621 | + style_submenu_checkbox("rel", "Related", 0, 0); | |
| 1622 | 1622 | |
| 1623 | 1623 | /* Construct the tag match expression. */ |
| 1624 | 1624 | zTagSql = tagMatchExpression(matchStyle, zTagName, &zMatchDesc, &zError); |
| 1625 | 1625 | } |
| 1626 | 1626 | |
| @@ -1748,11 +1748,11 @@ | ||
| 1748 | 1748 | blob_append(&sql, ")", -1); |
| 1749 | 1749 | path_reset(); |
| 1750 | 1750 | addFileGlobExclusion(zChng, &sql); |
| 1751 | 1751 | tmFlags |= TIMELINE_DISJOINT; |
| 1752 | 1752 | db_multi_exec("%s", blob_sql_text(&sql)); |
| 1753 | - style_submenu_checkbox("v", "Files", zType[0]!='a' && zType[0]!='c'); | |
| 1753 | + style_submenu_checkbox("v", "Files", zType[0]!='a' && zType[0]!='c', 0); | |
| 1754 | 1754 | blob_appendf(&desc, "%d check-ins going from ", |
| 1755 | 1755 | db_int(0, "SELECT count(*) FROM timeline")); |
| 1756 | 1756 | blob_appendf(&desc, "%z[%h]</a>", href("%R/info/%h", zFrom), zFrom); |
| 1757 | 1757 | blob_append(&desc, " to ", -1); |
| 1758 | 1758 | blob_appendf(&desc, "%z[%h]</a>", href("%R/info/%h",zTo), zTo); |
| @@ -1798,11 +1798,11 @@ | ||
| 1798 | 1798 | if( p_rid ){ |
| 1799 | 1799 | /* If both p= and d= are set, we don't have the uuid of d yet. */ |
| 1800 | 1800 | zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", d_rid); |
| 1801 | 1801 | } |
| 1802 | 1802 | } |
| 1803 | - style_submenu_checkbox("v", "Files", zType[0]!='a' && zType[0]!='c'); | |
| 1803 | + style_submenu_checkbox("v", "Files", zType[0]!='a' && zType[0]!='c', 0); | |
| 1804 | 1804 | style_submenu_entry("n","Max:",4,0); |
| 1805 | 1805 | timeline_y_submenu(1); |
| 1806 | 1806 | }else if( f_rid && g.perm.Read ){ |
| 1807 | 1807 | /* If f= is present, ignore all other parameters other than n= */ |
| 1808 | 1808 | char *zUuid; |
| @@ -1818,12 +1818,12 @@ | ||
| 1818 | 1818 | if( useDividers ) selectedRid = f_rid; |
| 1819 | 1819 | blob_appendf(&desc, "Parents and children of check-in "); |
| 1820 | 1820 | zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", f_rid); |
| 1821 | 1821 | blob_appendf(&desc, "%z[%S]</a>", href("%R/info/%!S", zUuid), zUuid); |
| 1822 | 1822 | tmFlags |= TIMELINE_DISJOINT; |
| 1823 | - style_submenu_checkbox("unhide", "Unhide", 0); | |
| 1824 | - style_submenu_checkbox("v", "Files", zType[0]!='a' && zType[0]!='c'); | |
| 1823 | + style_submenu_checkbox("unhide", "Unhide", 0, 0); | |
| 1824 | + style_submenu_checkbox("v", "Files", zType[0]!='a' && zType[0]!='c', 0); | |
| 1825 | 1825 | }else{ |
| 1826 | 1826 | /* Otherwise, a timeline based on a span of time */ |
| 1827 | 1827 | int n; |
| 1828 | 1828 | const char *zEType = "timeline item"; |
| 1829 | 1829 | char *zDate; |
| @@ -2103,13 +2103,13 @@ | ||
| 2103 | 2103 | timeline_submenu(&url, "Newer", "a", zDate, "b"); |
| 2104 | 2104 | } |
| 2105 | 2105 | free(zDate); |
| 2106 | 2106 | } |
| 2107 | 2107 | if( zType[0]=='a' || zType[0]=='c' ){ |
| 2108 | - style_submenu_checkbox("unhide", "Unhide", 0); | |
| 2108 | + style_submenu_checkbox("unhide", "Unhide", 0, 0); | |
| 2109 | 2109 | } |
| 2110 | - style_submenu_checkbox("v", "Files", zType[0]!='a' && zType[0]!='c'); | |
| 2110 | + style_submenu_checkbox("v", "Files", zType[0]!='a' && zType[0]!='c', 0); | |
| 2111 | 2111 | style_submenu_entry("n","Max:",4,0); |
| 2112 | 2112 | timeline_y_submenu(disableY); |
| 2113 | 2113 | style_submenu_entry("t", "Tag Filter:", -8, 0); |
| 2114 | 2114 | style_submenu_multichoice("ms", count(azMatchStyles)/2, azMatchStyles, 0); |
| 2115 | 2115 | } |
| 2116 | 2116 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -1616,11 +1616,11 @@ | |
| 1616 | /* For exact maching, inhibit links to the selected tag. */ |
| 1617 | zThisTag = zTagName; |
| 1618 | } |
| 1619 | |
| 1620 | /* Display a checkbox to enable/disable display of related check-ins. */ |
| 1621 | style_submenu_checkbox("rel", "Related", 0); |
| 1622 | |
| 1623 | /* Construct the tag match expression. */ |
| 1624 | zTagSql = tagMatchExpression(matchStyle, zTagName, &zMatchDesc, &zError); |
| 1625 | } |
| 1626 | |
| @@ -1748,11 +1748,11 @@ | |
| 1748 | blob_append(&sql, ")", -1); |
| 1749 | path_reset(); |
| 1750 | addFileGlobExclusion(zChng, &sql); |
| 1751 | tmFlags |= TIMELINE_DISJOINT; |
| 1752 | db_multi_exec("%s", blob_sql_text(&sql)); |
| 1753 | style_submenu_checkbox("v", "Files", zType[0]!='a' && zType[0]!='c'); |
| 1754 | blob_appendf(&desc, "%d check-ins going from ", |
| 1755 | db_int(0, "SELECT count(*) FROM timeline")); |
| 1756 | blob_appendf(&desc, "%z[%h]</a>", href("%R/info/%h", zFrom), zFrom); |
| 1757 | blob_append(&desc, " to ", -1); |
| 1758 | blob_appendf(&desc, "%z[%h]</a>", href("%R/info/%h",zTo), zTo); |
| @@ -1798,11 +1798,11 @@ | |
| 1798 | if( p_rid ){ |
| 1799 | /* If both p= and d= are set, we don't have the uuid of d yet. */ |
| 1800 | zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", d_rid); |
| 1801 | } |
| 1802 | } |
| 1803 | style_submenu_checkbox("v", "Files", zType[0]!='a' && zType[0]!='c'); |
| 1804 | style_submenu_entry("n","Max:",4,0); |
| 1805 | timeline_y_submenu(1); |
| 1806 | }else if( f_rid && g.perm.Read ){ |
| 1807 | /* If f= is present, ignore all other parameters other than n= */ |
| 1808 | char *zUuid; |
| @@ -1818,12 +1818,12 @@ | |
| 1818 | if( useDividers ) selectedRid = f_rid; |
| 1819 | blob_appendf(&desc, "Parents and children of check-in "); |
| 1820 | zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", f_rid); |
| 1821 | blob_appendf(&desc, "%z[%S]</a>", href("%R/info/%!S", zUuid), zUuid); |
| 1822 | tmFlags |= TIMELINE_DISJOINT; |
| 1823 | style_submenu_checkbox("unhide", "Unhide", 0); |
| 1824 | style_submenu_checkbox("v", "Files", zType[0]!='a' && zType[0]!='c'); |
| 1825 | }else{ |
| 1826 | /* Otherwise, a timeline based on a span of time */ |
| 1827 | int n; |
| 1828 | const char *zEType = "timeline item"; |
| 1829 | char *zDate; |
| @@ -2103,13 +2103,13 @@ | |
| 2103 | timeline_submenu(&url, "Newer", "a", zDate, "b"); |
| 2104 | } |
| 2105 | free(zDate); |
| 2106 | } |
| 2107 | if( zType[0]=='a' || zType[0]=='c' ){ |
| 2108 | style_submenu_checkbox("unhide", "Unhide", 0); |
| 2109 | } |
| 2110 | style_submenu_checkbox("v", "Files", zType[0]!='a' && zType[0]!='c'); |
| 2111 | style_submenu_entry("n","Max:",4,0); |
| 2112 | timeline_y_submenu(disableY); |
| 2113 | style_submenu_entry("t", "Tag Filter:", -8, 0); |
| 2114 | style_submenu_multichoice("ms", count(azMatchStyles)/2, azMatchStyles, 0); |
| 2115 | } |
| 2116 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -1616,11 +1616,11 @@ | |
| 1616 | /* For exact maching, inhibit links to the selected tag. */ |
| 1617 | zThisTag = zTagName; |
| 1618 | } |
| 1619 | |
| 1620 | /* Display a checkbox to enable/disable display of related check-ins. */ |
| 1621 | style_submenu_checkbox("rel", "Related", 0, 0); |
| 1622 | |
| 1623 | /* Construct the tag match expression. */ |
| 1624 | zTagSql = tagMatchExpression(matchStyle, zTagName, &zMatchDesc, &zError); |
| 1625 | } |
| 1626 | |
| @@ -1748,11 +1748,11 @@ | |
| 1748 | blob_append(&sql, ")", -1); |
| 1749 | path_reset(); |
| 1750 | addFileGlobExclusion(zChng, &sql); |
| 1751 | tmFlags |= TIMELINE_DISJOINT; |
| 1752 | db_multi_exec("%s", blob_sql_text(&sql)); |
| 1753 | style_submenu_checkbox("v", "Files", zType[0]!='a' && zType[0]!='c', 0); |
| 1754 | blob_appendf(&desc, "%d check-ins going from ", |
| 1755 | db_int(0, "SELECT count(*) FROM timeline")); |
| 1756 | blob_appendf(&desc, "%z[%h]</a>", href("%R/info/%h", zFrom), zFrom); |
| 1757 | blob_append(&desc, " to ", -1); |
| 1758 | blob_appendf(&desc, "%z[%h]</a>", href("%R/info/%h",zTo), zTo); |
| @@ -1798,11 +1798,11 @@ | |
| 1798 | if( p_rid ){ |
| 1799 | /* If both p= and d= are set, we don't have the uuid of d yet. */ |
| 1800 | zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", d_rid); |
| 1801 | } |
| 1802 | } |
| 1803 | style_submenu_checkbox("v", "Files", zType[0]!='a' && zType[0]!='c', 0); |
| 1804 | style_submenu_entry("n","Max:",4,0); |
| 1805 | timeline_y_submenu(1); |
| 1806 | }else if( f_rid && g.perm.Read ){ |
| 1807 | /* If f= is present, ignore all other parameters other than n= */ |
| 1808 | char *zUuid; |
| @@ -1818,12 +1818,12 @@ | |
| 1818 | if( useDividers ) selectedRid = f_rid; |
| 1819 | blob_appendf(&desc, "Parents and children of check-in "); |
| 1820 | zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", f_rid); |
| 1821 | blob_appendf(&desc, "%z[%S]</a>", href("%R/info/%!S", zUuid), zUuid); |
| 1822 | tmFlags |= TIMELINE_DISJOINT; |
| 1823 | style_submenu_checkbox("unhide", "Unhide", 0, 0); |
| 1824 | style_submenu_checkbox("v", "Files", zType[0]!='a' && zType[0]!='c', 0); |
| 1825 | }else{ |
| 1826 | /* Otherwise, a timeline based on a span of time */ |
| 1827 | int n; |
| 1828 | const char *zEType = "timeline item"; |
| 1829 | char *zDate; |
| @@ -2103,13 +2103,13 @@ | |
| 2103 | timeline_submenu(&url, "Newer", "a", zDate, "b"); |
| 2104 | } |
| 2105 | free(zDate); |
| 2106 | } |
| 2107 | if( zType[0]=='a' || zType[0]=='c' ){ |
| 2108 | style_submenu_checkbox("unhide", "Unhide", 0, 0); |
| 2109 | } |
| 2110 | style_submenu_checkbox("v", "Files", zType[0]!='a' && zType[0]!='c', 0); |
| 2111 | style_submenu_entry("n","Max:",4,0); |
| 2112 | timeline_y_submenu(disableY); |
| 2113 | style_submenu_entry("t", "Tag Filter:", -8, 0); |
| 2114 | style_submenu_multichoice("ms", count(azMatchStyles)/2, azMatchStyles, 0); |
| 2115 | } |
| 2116 |