Fossil SCM

Improvements to the accordion panes in the UI. The associated wiki on the /info page defaults to collapsed.

drh 2026-11-13 19:41 UTC trunk merge
Commit 45889598287f2dbac3a272e30bef13df171a53fc7186d1ba77e87e77f9f0a9c0
--- skins/black_and_white/css.txt
+++ skins/black_and_white/css.txt
@@ -121,11 +121,11 @@
121121
div.content {
122122
padding: 2ex 1ex 0ex 2ex;
123123
}
124124
125125
/* Some pages have section dividers */
126
-div.section {
126
+div.section, summary.section {
127127
margin-bottom: 0px;
128128
margin-top: 1em;
129129
padding: 1px 1px 1px 1px;
130130
font-size: 1.2em;
131131
font-weight: bold;
132132
--- skins/black_and_white/css.txt
+++ skins/black_and_white/css.txt
@@ -121,11 +121,11 @@
121 div.content {
122 padding: 2ex 1ex 0ex 2ex;
123 }
124
125 /* Some pages have section dividers */
126 div.section {
127 margin-bottom: 0px;
128 margin-top: 1em;
129 padding: 1px 1px 1px 1px;
130 font-size: 1.2em;
131 font-weight: bold;
132
--- skins/black_and_white/css.txt
+++ skins/black_and_white/css.txt
@@ -121,11 +121,11 @@
121 div.content {
122 padding: 2ex 1ex 0ex 2ex;
123 }
124
125 /* Some pages have section dividers */
126 div.section, summary.section {
127 margin-bottom: 0px;
128 margin-top: 1em;
129 padding: 1px 1px 1px 1px;
130 font-size: 1.2em;
131 font-weight: bold;
132
--- skins/darkmode/css.txt
+++ skins/darkmode/css.txt
@@ -155,11 +155,11 @@
155155
div.content {
156156
padding: 0ex 1ex 1ex 1ex;
157157
}
158158
159159
/* Some pages have section dividers */
160
-div.section {
160
+div.section, summary.section {
161161
margin-bottom: 0;
162162
margin-top: 1em;
163163
padding: 0.1em;
164164
font-size: 1.2em;
165165
font-weight: bold;
166166
--- skins/darkmode/css.txt
+++ skins/darkmode/css.txt
@@ -155,11 +155,11 @@
155 div.content {
156 padding: 0ex 1ex 1ex 1ex;
157 }
158
159 /* Some pages have section dividers */
160 div.section {
161 margin-bottom: 0;
162 margin-top: 1em;
163 padding: 0.1em;
164 font-size: 1.2em;
165 font-weight: bold;
166
--- skins/darkmode/css.txt
+++ skins/darkmode/css.txt
@@ -155,11 +155,11 @@
155 div.content {
156 padding: 0ex 1ex 1ex 1ex;
157 }
158
159 /* Some pages have section dividers */
160 div.section, summary.section {
161 margin-bottom: 0;
162 margin-top: 1em;
163 padding: 0.1em;
164 font-size: 1.2em;
165 font-weight: bold;
166
--- skins/eagle/css.txt
+++ skins/eagle/css.txt
@@ -106,11 +106,11 @@
106106
div.content {
107107
padding: 0ex 1ex 0ex 2ex;
108108
}
109109
110110
/* Some pages have section dividers */
111
-div.section {
111
+div.section, summary.section {
112112
margin-bottom: 0px;
113113
margin-top: 1em;
114114
padding: 1px 1px 1px 1px;
115115
font-size: 1.2em;
116116
font-weight: bold;
117117
--- skins/eagle/css.txt
+++ skins/eagle/css.txt
@@ -106,11 +106,11 @@
106 div.content {
107 padding: 0ex 1ex 0ex 2ex;
108 }
109
110 /* Some pages have section dividers */
111 div.section {
112 margin-bottom: 0px;
113 margin-top: 1em;
114 padding: 1px 1px 1px 1px;
115 font-size: 1.2em;
116 font-weight: bold;
117
--- skins/eagle/css.txt
+++ skins/eagle/css.txt
@@ -106,11 +106,11 @@
106 div.content {
107 padding: 0ex 1ex 0ex 2ex;
108 }
109
110 /* Some pages have section dividers */
111 div.section, summary.section {
112 margin-bottom: 0px;
113 margin-top: 1em;
114 padding: 1px 1px 1px 1px;
115 font-size: 1.2em;
116 font-weight: bold;
117
--- skins/khaki/css.txt
+++ skins/khaki/css.txt
@@ -109,11 +109,11 @@
109109
text-decoration: none;
110110
}
111111
112112
113113
/* Some pages have section dividers */
114
-div.section {
114
+div.section, summary.section {
115115
margin-bottom: 0px;
116116
margin-top: 1em;
117117
padding: 3px 3px 0 3px;
118118
font-size: 1.2em;
119119
font-weight: bold;
120120
--- skins/khaki/css.txt
+++ skins/khaki/css.txt
@@ -109,11 +109,11 @@
109 text-decoration: none;
110 }
111
112
113 /* Some pages have section dividers */
114 div.section {
115 margin-bottom: 0px;
116 margin-top: 1em;
117 padding: 3px 3px 0 3px;
118 font-size: 1.2em;
119 font-weight: bold;
120
--- skins/khaki/css.txt
+++ skins/khaki/css.txt
@@ -109,11 +109,11 @@
109 text-decoration: none;
110 }
111
112
113 /* Some pages have section dividers */
114 div.section, summary.section {
115 margin-bottom: 0px;
116 margin-top: 1em;
117 padding: 3px 3px 0 3px;
118 font-size: 1.2em;
119 font-weight: bold;
120
--- skins/original/css.txt
+++ skins/original/css.txt
@@ -91,11 +91,11 @@
9191
border: solid #aaa;
9292
border-width: 1px;
9393
}
9494
9595
/* Some pages have section dividers */
96
-div.section {
96
+div.section, summary.section {
9797
margin-bottom: 0px;
9898
margin-top: 1em;
9999
padding: 1px 1px 1px 1px;
100100
font-size: 1.2em;
101101
font-weight: bold;
102102
--- skins/original/css.txt
+++ skins/original/css.txt
@@ -91,11 +91,11 @@
91 border: solid #aaa;
92 border-width: 1px;
93 }
94
95 /* Some pages have section dividers */
96 div.section {
97 margin-bottom: 0px;
98 margin-top: 1em;
99 padding: 1px 1px 1px 1px;
100 font-size: 1.2em;
101 font-weight: bold;
102
--- skins/original/css.txt
+++ skins/original/css.txt
@@ -91,11 +91,11 @@
91 border: solid #aaa;
92 border-width: 1px;
93 }
94
95 /* Some pages have section dividers */
96 div.section, summary.section {
97 margin-bottom: 0px;
98 margin-top: 1em;
99 padding: 1px 1px 1px 1px;
100 font-size: 1.2em;
101 font-weight: bold;
102
--- skins/plain_gray/css.txt
+++ skins/plain_gray/css.txt
@@ -107,11 +107,11 @@
107107
padding: 0.5em;
108108
white-space: pre-wrap;
109109
}
110110
111111
/* Some pages have section dividers */
112
-div.section {
112
+div.section, summary.section {
113113
margin-bottom: 0px;
114114
margin-top: 1em;
115115
padding: 1px 1px 1px 1px;
116116
font-size: 1.2em;
117117
font-weight: bold;
118118
--- skins/plain_gray/css.txt
+++ skins/plain_gray/css.txt
@@ -107,11 +107,11 @@
107 padding: 0.5em;
108 white-space: pre-wrap;
109 }
110
111 /* Some pages have section dividers */
112 div.section {
113 margin-bottom: 0px;
114 margin-top: 1em;
115 padding: 1px 1px 1px 1px;
116 font-size: 1.2em;
117 font-weight: bold;
118
--- skins/plain_gray/css.txt
+++ skins/plain_gray/css.txt
@@ -107,11 +107,11 @@
107 padding: 0.5em;
108 white-space: pre-wrap;
109 }
110
111 /* Some pages have section dividers */
112 div.section, summary.section {
113 margin-bottom: 0px;
114 margin-top: 1em;
115 padding: 1px 1px 1px 1px;
116 font-size: 1.2em;
117 font-weight: bold;
118
--- skins/xekri/css.txt
+++ skins/xekri/css.txt
@@ -549,11 +549,12 @@
549549
550550
/**************************************
551551
* Sections
552552
*/
553553
554
-div.section, div.sectionmenu {
554
+div.section, div.sectionmenu,
555
+summary.section{
555556
color: #2ee;
556557
background-color: #22c;
557558
border-radius: 0 3rem;
558559
box-shadow: 2px 2px #000;
559560
display: flex;
560561
561562
DELETED src/accordion.js
--- skins/xekri/css.txt
+++ skins/xekri/css.txt
@@ -549,11 +549,12 @@
549
550 /**************************************
551 * Sections
552 */
553
554 div.section, div.sectionmenu {
 
555 color: #2ee;
556 background-color: #22c;
557 border-radius: 0 3rem;
558 box-shadow: 2px 2px #000;
559 display: flex;
560
561 ELETED src/accordion.js
--- skins/xekri/css.txt
+++ skins/xekri/css.txt
@@ -549,11 +549,12 @@
549
550 /**************************************
551 * Sections
552 */
553
554 div.section, div.sectionmenu,
555 summary.section{
556 color: #2ee;
557 background-color: #22c;
558 border-radius: 0 3rem;
559 box-shadow: 2px 2px #000;
560 display: flex;
561
562 ELETED src/accordion.js
D src/accordion.js
-99
--- a/src/accordion.js
+++ b/src/accordion.js
@@ -1,99 +0,0 @@
1
-/*
2
-** Attach appropriate javascript to each ".accordion" button so that it expands
3
-** and contracts when clicked.
4
-**
5
-** The uncompressed source code for the SVG icons can be found on the wiki page
6
-** "branch/accordion-experiments" in the Fossil repository.
7
-**
8
-** Implementation notes:
9
-**
10
-** The `maxHeight' CSS property is quite restrictive for vertical resizing of
11
-** elements, especially for dynamic-content areas like the diff panels. That's
12
-** why `maxHeight' is set only during animation, to prevent truncated elements.
13
-** (The diff panels may get truncated right after page loading, and other
14
-** elements may get truncated when resizing the browser window to a smaller
15
-** width, causing vertical growth.)
16
-**
17
-** Another problem is that `scrollHeight' used to calculate the expanded height
18
-** while still in the contracted state may return values with small errors on
19
-** some browsers, especially for large elements, presumably due to omitting the
20
-** space required by the vertical scrollbar that may become necessary, causing
21
-** additional horizontal shrinking and consequently more vertical growth than
22
-** calculated. That's why setting `maxHeight' to `scrollHeight' is considered
23
-** "good enough" only during animation, but cleared afterwards.
24
-**
25
-** https://fossil-scm.org/forum/forumpost/66d7075f40
26
-** https://fossil-scm.org/home/timeline?r=accordion-fix
27
-**
28
-** To work around the missing support for `overflow-y: clip', this script uses a
29
-** fallback and sets `overflow-y: hidden' during the accordion panel animations.
30
-** That's because if `overflow-y: hidden' is set statically from the stylesheet,
31
-** the shadow of the selected or current timeline entries in the context section
32
-** of `/info' pages is still truncated on the right (which is strange, as that's
33
-** not the "y" direction) in all major browsers. Otherwise, the stylesheet might
34
-** define the fallback using the `@supports(…)' at-rule:
35
-**
36
-** .accordion_panel {
37
-** overflow-y: hidden;
38
-** }
39
-** @supports(overflow-y: clip) {
40
-** .accordion_panel {
41
-** overflow-y: clip;
42
-** }
43
-** }
44
-*/
45
-(function(){
46
- const acc_svgdata = ["data:image/svg+xml,"+
47
- "%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E"+
48
- "%3Cpath style='fill:black;opacity:0' d='M16,16H0V0h16v16z'/%3E"+
49
- "%3Cpath style='fill:rgb(240,240,240)' d='M14,14H2V2h12v12z'/%3E"+
50
- "%3Cpath style='fill:rgb(64,64,64)' d='M13,13H3V3h10v10z'/%3E"+
51
- "%3Cpath style='fill:rgb(248,248,248)' d='M12,12H4V4h8v8z'/%3E"+
52
- "%3Cpath style='fill:rgb(80,128,208)' d='", "'/%3E%3C/svg%3E",
53
- "M5,7h2v-2h2v2h2v2h-2v2h-2v-2h-2z", "M11,9H5V7h6v6z"];
54
- const a = document.getElementsByClassName("accordion");
55
- const xClickyHTML = /^(?:A|AREA|BUTTON|INPUT|LABEL|SELECT|TEXTAREA|DETAILS)$/;
56
- const onclick = function(evt){
57
- /* Ignore clicks to hyperlinks and other "click-responsive" HTML elements in
58
- ** ".accordion" headers (for which Fossil uses <DIV> elements that represent
59
- ** section headers). */
60
- if( xClickyHTML.test(evt.target.tagName) ) return;
61
- const x = this.nextElementSibling;
62
- if( this.classList.contains("accordion_closed") ){
63
- x.style.maxHeight = x.scrollHeight + "px";
64
- setTimeout(function(){
65
- x.style.maxHeight = "";
66
- if( !window.CSS || !window.CSS.supports("overflow: clip") ){
67
- x.style.overflowY = "";
68
- }
69
- },250); // default.css: .accordion_panel { transition-duration }
70
- }else{
71
- x.style.maxHeight = x.scrollHeight + "px";
72
- if( !window.CSS || !window.CSS.supports("overflow: clip") ){
73
- x.style.overflowY = "hidden";
74
- }
75
- setTimeout(function(){
76
- x.style.maxHeight = "0";
77
- },1);
78
- }
79
- this.classList.toggle("accordion_closed");
80
- };
81
- for(const e of a){
82
- let img = document.createElement("img");
83
- img.src = acc_svgdata[0]+acc_svgdata[2]+acc_svgdata[1];
84
- img.className = "accordion_btn accordion_btn_plus";
85
- e.insertBefore(img,e.firstChild);
86
- img = document.createElement("img");
87
- img.src = acc_svgdata[0]+acc_svgdata[3]+acc_svgdata[1];
88
- img.className = "accordion_btn accordion_btn_minus";
89
- e.insertBefore(img,e.firstChild);
90
- e.addEventListener("click", onclick);
91
- if( e.classList.contains('collapsed') ){
92
- /* C code sets the 'collapsed' class for accordions which should
93
- start that way. */
94
- e.classList.remove('collapsed');
95
- console.warn("WTH?", e);
96
- e.click();
97
- }
98
- }
99
-})();
--- a/src/accordion.js
+++ b/src/accordion.js
@@ -1,99 +0,0 @@
1 /*
2 ** Attach appropriate javascript to each ".accordion" button so that it expands
3 ** and contracts when clicked.
4 **
5 ** The uncompressed source code for the SVG icons can be found on the wiki page
6 ** "branch/accordion-experiments" in the Fossil repository.
7 **
8 ** Implementation notes:
9 **
10 ** The `maxHeight' CSS property is quite restrictive for vertical resizing of
11 ** elements, especially for dynamic-content areas like the diff panels. That's
12 ** why `maxHeight' is set only during animation, to prevent truncated elements.
13 ** (The diff panels may get truncated right after page loading, and other
14 ** elements may get truncated when resizing the browser window to a smaller
15 ** width, causing vertical growth.)
16 **
17 ** Another problem is that `scrollHeight' used to calculate the expanded height
18 ** while still in the contracted state may return values with small errors on
19 ** some browsers, especially for large elements, presumably due to omitting the
20 ** space required by the vertical scrollbar that may become necessary, causing
21 ** additional horizontal shrinking and consequently more vertical growth than
22 ** calculated. That's why setting `maxHeight' to `scrollHeight' is considered
23 ** "good enough" only during animation, but cleared afterwards.
24 **
25 ** https://fossil-scm.org/forum/forumpost/66d7075f40
26 ** https://fossil-scm.org/home/timeline?r=accordion-fix
27 **
28 ** To work around the missing support for `overflow-y: clip', this script uses a
29 ** fallback and sets `overflow-y: hidden' during the accordion panel animations.
30 ** That's because if `overflow-y: hidden' is set statically from the stylesheet,
31 ** the shadow of the selected or current timeline entries in the context section
32 ** of `/info' pages is still truncated on the right (which is strange, as that's
33 ** not the "y" direction) in all major browsers. Otherwise, the stylesheet might
34 ** define the fallback using the `@supports(…)' at-rule:
35 **
36 ** .accordion_panel {
37 ** overflow-y: hidden;
38 ** }
39 ** @supports(overflow-y: clip) {
40 ** .accordion_panel {
41 ** overflow-y: clip;
42 ** }
43 ** }
44 */
45 (function(){
46 const acc_svgdata = ["data:image/svg+xml,"+
47 "%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E"+
48 "%3Cpath style='fill:black;opacity:0' d='M16,16H0V0h16v16z'/%3E"+
49 "%3Cpath style='fill:rgb(240,240,240)' d='M14,14H2V2h12v12z'/%3E"+
50 "%3Cpath style='fill:rgb(64,64,64)' d='M13,13H3V3h10v10z'/%3E"+
51 "%3Cpath style='fill:rgb(248,248,248)' d='M12,12H4V4h8v8z'/%3E"+
52 "%3Cpath style='fill:rgb(80,128,208)' d='", "'/%3E%3C/svg%3E",
53 "M5,7h2v-2h2v2h2v2h-2v2h-2v-2h-2z", "M11,9H5V7h6v6z"];
54 const a = document.getElementsByClassName("accordion");
55 const xClickyHTML = /^(?:A|AREA|BUTTON|INPUT|LABEL|SELECT|TEXTAREA|DETAILS)$/;
56 const onclick = function(evt){
57 /* Ignore clicks to hyperlinks and other "click-responsive" HTML elements in
58 ** ".accordion" headers (for which Fossil uses <DIV> elements that represent
59 ** section headers). */
60 if( xClickyHTML.test(evt.target.tagName) ) return;
61 const x = this.nextElementSibling;
62 if( this.classList.contains("accordion_closed") ){
63 x.style.maxHeight = x.scrollHeight + "px";
64 setTimeout(function(){
65 x.style.maxHeight = "";
66 if( !window.CSS || !window.CSS.supports("overflow: clip") ){
67 x.style.overflowY = "";
68 }
69 },250); // default.css: .accordion_panel { transition-duration }
70 }else{
71 x.style.maxHeight = x.scrollHeight + "px";
72 if( !window.CSS || !window.CSS.supports("overflow: clip") ){
73 x.style.overflowY = "hidden";
74 }
75 setTimeout(function(){
76 x.style.maxHeight = "0";
77 },1);
78 }
79 this.classList.toggle("accordion_closed");
80 };
81 for(const e of a){
82 let img = document.createElement("img");
83 img.src = acc_svgdata[0]+acc_svgdata[2]+acc_svgdata[1];
84 img.className = "accordion_btn accordion_btn_plus";
85 e.insertBefore(img,e.firstChild);
86 img = document.createElement("img");
87 img.src = acc_svgdata[0]+acc_svgdata[3]+acc_svgdata[1];
88 img.className = "accordion_btn accordion_btn_minus";
89 e.insertBefore(img,e.firstChild);
90 e.addEventListener("click", onclick);
91 if( e.classList.contains('collapsed') ){
92 /* C code sets the 'collapsed' class for accordions which should
93 start that way. */
94 e.classList.remove('collapsed');
95 console.warn("WTH?", e);
96 e.click();
97 }
98 }
99 })();
--- a/src/accordion.js
+++ b/src/accordion.js
@@ -1,99 +0,0 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
+7 -6
--- src/backlink.c
+++ src/backlink.c
@@ -26,10 +26,11 @@
2626
#include <assert.h>
2727
2828
2929
/*
3030
** Show a graph of all wiki, tickets, and check-ins that refer to object zUuid.
31
+** If there are none, emit no output.
3132
**
3233
** If zLabel is not NULL and the graph is not empty, then output zLabel as
3334
** a prefix to the graph.
3435
*/
3536
void render_backlink_graph(const char *zUuid, const char *zLabel){
@@ -49,27 +50,27 @@
4950
" FROM backlink\n"
5051
" WHERE target GLOB %Q"
5152
" AND %Q GLOB (target || '*');",
5253
zGlob, zUuid
5354
);
55
+ fossil_free(zGlob);
5456
if( !db_exists("SELECT 1 FROM ok") ) return;
5557
if( zLabel ){
56
- cgi_printf("%s", zLabel);
57
- if( strstr(zLabel, "accordion")!=0 ){
58
- cgi_printf("<div class=\"accordion_panel\">\n");
59
- needEndPanel = 1;
60
- }
58
+ cgi_printf("<details open>"
59
+ "<summary class='section'>%h</summary>"
60
+ "<div class=\"accordion_panel\">", zLabel);
61
+ needEndPanel = 1;
6162
}
6263
blob_zero(&sql);
6364
blob_append(&sql, timeline_query_for_www(), -1);
6465
blob_append_sql(&sql, " AND event.objid IN ok ORDER BY mtime DESC");
6566
db_prepare(&q, "%s", blob_sql_text(&sql));
6667
www_print_timeline(&q,
6768
TIMELINE_DISJOINT|TIMELINE_GRAPH|TIMELINE_NOSCROLL|TIMELINE_REFS, 0);
6869
db_finalize(&q);
6970
if( needEndPanel ){
70
- cgi_printf("</div>\n");
71
+ cgi_printf("</div></details>\n");
7172
}
7273
}
7374
7475
/*
7576
** WEBPAGE: test-backlink-timeline
7677
--- src/backlink.c
+++ src/backlink.c
@@ -26,10 +26,11 @@
26 #include <assert.h>
27
28
29 /*
30 ** Show a graph of all wiki, tickets, and check-ins that refer to object zUuid.
 
31 **
32 ** If zLabel is not NULL and the graph is not empty, then output zLabel as
33 ** a prefix to the graph.
34 */
35 void render_backlink_graph(const char *zUuid, const char *zLabel){
@@ -49,27 +50,27 @@
49 " FROM backlink\n"
50 " WHERE target GLOB %Q"
51 " AND %Q GLOB (target || '*');",
52 zGlob, zUuid
53 );
 
54 if( !db_exists("SELECT 1 FROM ok") ) return;
55 if( zLabel ){
56 cgi_printf("%s", zLabel);
57 if( strstr(zLabel, "accordion")!=0 ){
58 cgi_printf("<div class=\"accordion_panel\">\n");
59 needEndPanel = 1;
60 }
61 }
62 blob_zero(&sql);
63 blob_append(&sql, timeline_query_for_www(), -1);
64 blob_append_sql(&sql, " AND event.objid IN ok ORDER BY mtime DESC");
65 db_prepare(&q, "%s", blob_sql_text(&sql));
66 www_print_timeline(&q,
67 TIMELINE_DISJOINT|TIMELINE_GRAPH|TIMELINE_NOSCROLL|TIMELINE_REFS, 0);
68 db_finalize(&q);
69 if( needEndPanel ){
70 cgi_printf("</div>\n");
71 }
72 }
73
74 /*
75 ** WEBPAGE: test-backlink-timeline
76
--- src/backlink.c
+++ src/backlink.c
@@ -26,10 +26,11 @@
26 #include <assert.h>
27
28
29 /*
30 ** Show a graph of all wiki, tickets, and check-ins that refer to object zUuid.
31 ** If there are none, emit no output.
32 **
33 ** If zLabel is not NULL and the graph is not empty, then output zLabel as
34 ** a prefix to the graph.
35 */
36 void render_backlink_graph(const char *zUuid, const char *zLabel){
@@ -49,27 +50,27 @@
50 " FROM backlink\n"
51 " WHERE target GLOB %Q"
52 " AND %Q GLOB (target || '*');",
53 zGlob, zUuid
54 );
55 fossil_free(zGlob);
56 if( !db_exists("SELECT 1 FROM ok") ) return;
57 if( zLabel ){
58 cgi_printf("<details open>"
59 "<summary class='section'>%h</summary>"
60 "<div class=\"accordion_panel\">", zLabel);
61 needEndPanel = 1;
 
62 }
63 blob_zero(&sql);
64 blob_append(&sql, timeline_query_for_www(), -1);
65 blob_append_sql(&sql, " AND event.objid IN ok ORDER BY mtime DESC");
66 db_prepare(&q, "%s", blob_sql_text(&sql));
67 www_print_timeline(&q,
68 TIMELINE_DISJOINT|TIMELINE_GRAPH|TIMELINE_NOSCROLL|TIMELINE_REFS, 0);
69 db_finalize(&q);
70 if( needEndPanel ){
71 cgi_printf("</div></details>\n");
72 }
73 }
74
75 /*
76 ** WEBPAGE: test-backlink-timeline
77
+34 -1
--- src/checkin.c
+++ src/checkin.c
@@ -2442,11 +2442,11 @@
24422442
blob_reset(&txt);
24432443
}
24442444
blob_reset(&html);
24452445
blob_reset(&in);
24462446
return rc;
2447
-}
2447
+}
24482448
24492449
/*
24502450
** COMMAND: ci#
24512451
** COMMAND: commit
24522452
**
@@ -2534,10 +2534,16 @@
25342534
** --proxy PROXY Use PROXY as http proxy during sync operation
25352535
** --tag TAG-NAME Add TAG-NAME to the check-in. May be repeated.
25362536
** --trace Debug tracing
25372537
** --user-override USER Record USER as the login that created the
25382538
** new check-in, rather that the current user.
2539
+** -w|--wiki FILE Adds FILE's content as a wiki page associated
2540
+** with this check-in.
2541
+** --wm|--wiki-mimetype TYPE Mimetype for --wiki-file. Default is from the
2542
+** file extension: .md=markdown, .wiki=fossil,
2543
+** otherwise plain text. Accepts "markdown",
2544
+** "wiki", and "plain" as aliases.
25392545
**
25402546
** See also: [[branch]], [[changes]], [[update]], [[extras]], [[sync]]
25412547
*/
25422548
void commit_cmd(void){
25432549
int hasChanges; /* True if unsaved changes exist */
@@ -2587,10 +2593,12 @@
25872593
int bIgnoreSkew = 0; /* --ignore-clock-skew flag */
25882594
int mxSize;
25892595
char *zCurBranch = 0; /* The current branch name of checkout */
25902596
char *zNewBranch = 0; /* The branch name after update */
25912597
int ckComFlgs; /* Flags passed to verify_comment() */
2598
+ const char * zWikiFile; /* --wiki X */
2599
+ const char * zWikiMime; /* --wiki-mimetype X */
25922600
25932601
memset(&sCiInfo, 0, sizeof(sCiInfo));
25942602
url_proxy_options();
25952603
/* Undocumented. Supported only for backwards
25962604
** compatibility -------vvvvvvv */
@@ -2655,10 +2663,12 @@
26552663
if( db_get_boolean("clearsign", 0)==0 ){ noSign = 1; }
26562664
useCksum = db_get_boolean("repo-cksum", 1);
26572665
bIgnoreSkew = find_option("ignore-clock-skew",0,0)!=0;
26582666
mxSize = db_large_file_size();
26592667
if( find_option("ignore-oversize",0,0)!=0 ) mxSize = 0;
2668
+ zWikiFile = find_option("wiki","w",1);
2669
+ zWikiMime = find_option("wiki-mimetype","wm",1);
26602670
(void)fossil_text_editor();
26612671
verify_all_options();
26622672
26632673
/* The --no-warnings flag and the --force flag each imply
26642674
** the --no-verify-comment flag */
@@ -3305,10 +3315,33 @@
33053315
vfile_aggregate_checksum_disk(nvid, &cksum2);
33063316
if( blob_compare(&cksum1, &cksum2) ){
33073317
fossil_fatal("working check-out before and after commit does not match");
33083318
}
33093319
}
3320
+
3321
+ if( zWikiFile ){
3322
+ /* Handle --wiki and --wiki-mimetype */
3323
+ Blob bWiki = BLOB_INITIALIZER;
3324
+ char * zPageName;
3325
+ int parentRid = 0;
3326
+ blob_read_from_file(&bWiki, zWikiFile, ExtFILE);
3327
+ if( !zWikiMime ){
3328
+ if( 0==sqlite3_strglob("*.md", zWikiFile) ){
3329
+ zWikiMime = "text/x-markdown";
3330
+ }else if( 0==sqlite3_strglob("*.wiki", zWikiFile) ){
3331
+ zWikiMime = "text/x-fossil-wiki";
3332
+ }else{
3333
+ zWikiMime = "text/plain";
3334
+ }
3335
+ }
3336
+ zPageName = mprintf("checkin/%s", zUuid);
3337
+ zWikiMime = wiki_filter_mimetypes(zWikiMime);
3338
+ wiki_cmd_commit(zPageName, parentRid, &bWiki, zWikiMime, 1);
3339
+ fossil_print("Added %s (%s)\n", zPageName, zWikiMime);
3340
+ blob_reset(&bWiki);
3341
+ fossil_free(zPageName);
3342
+ }
33103343
33113344
/* Clear the undo/redo stack */
33123345
undo_reset();
33133346
33143347
/* Commit */
33153348
--- src/checkin.c
+++ src/checkin.c
@@ -2442,11 +2442,11 @@
2442 blob_reset(&txt);
2443 }
2444 blob_reset(&html);
2445 blob_reset(&in);
2446 return rc;
2447 }
2448
2449 /*
2450 ** COMMAND: ci#
2451 ** COMMAND: commit
2452 **
@@ -2534,10 +2534,16 @@
2534 ** --proxy PROXY Use PROXY as http proxy during sync operation
2535 ** --tag TAG-NAME Add TAG-NAME to the check-in. May be repeated.
2536 ** --trace Debug tracing
2537 ** --user-override USER Record USER as the login that created the
2538 ** new check-in, rather that the current user.
 
 
 
 
 
 
2539 **
2540 ** See also: [[branch]], [[changes]], [[update]], [[extras]], [[sync]]
2541 */
2542 void commit_cmd(void){
2543 int hasChanges; /* True if unsaved changes exist */
@@ -2587,10 +2593,12 @@
2587 int bIgnoreSkew = 0; /* --ignore-clock-skew flag */
2588 int mxSize;
2589 char *zCurBranch = 0; /* The current branch name of checkout */
2590 char *zNewBranch = 0; /* The branch name after update */
2591 int ckComFlgs; /* Flags passed to verify_comment() */
 
 
2592
2593 memset(&sCiInfo, 0, sizeof(sCiInfo));
2594 url_proxy_options();
2595 /* Undocumented. Supported only for backwards
2596 ** compatibility -------vvvvvvv */
@@ -2655,10 +2663,12 @@
2655 if( db_get_boolean("clearsign", 0)==0 ){ noSign = 1; }
2656 useCksum = db_get_boolean("repo-cksum", 1);
2657 bIgnoreSkew = find_option("ignore-clock-skew",0,0)!=0;
2658 mxSize = db_large_file_size();
2659 if( find_option("ignore-oversize",0,0)!=0 ) mxSize = 0;
 
 
2660 (void)fossil_text_editor();
2661 verify_all_options();
2662
2663 /* The --no-warnings flag and the --force flag each imply
2664 ** the --no-verify-comment flag */
@@ -3305,10 +3315,33 @@
3305 vfile_aggregate_checksum_disk(nvid, &cksum2);
3306 if( blob_compare(&cksum1, &cksum2) ){
3307 fossil_fatal("working check-out before and after commit does not match");
3308 }
3309 }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3310
3311 /* Clear the undo/redo stack */
3312 undo_reset();
3313
3314 /* Commit */
3315
--- src/checkin.c
+++ src/checkin.c
@@ -2442,11 +2442,11 @@
2442 blob_reset(&txt);
2443 }
2444 blob_reset(&html);
2445 blob_reset(&in);
2446 return rc;
2447 }
2448
2449 /*
2450 ** COMMAND: ci#
2451 ** COMMAND: commit
2452 **
@@ -2534,10 +2534,16 @@
2534 ** --proxy PROXY Use PROXY as http proxy during sync operation
2535 ** --tag TAG-NAME Add TAG-NAME to the check-in. May be repeated.
2536 ** --trace Debug tracing
2537 ** --user-override USER Record USER as the login that created the
2538 ** new check-in, rather that the current user.
2539 ** -w|--wiki FILE Adds FILE's content as a wiki page associated
2540 ** with this check-in.
2541 ** --wm|--wiki-mimetype TYPE Mimetype for --wiki-file. Default is from the
2542 ** file extension: .md=markdown, .wiki=fossil,
2543 ** otherwise plain text. Accepts "markdown",
2544 ** "wiki", and "plain" as aliases.
2545 **
2546 ** See also: [[branch]], [[changes]], [[update]], [[extras]], [[sync]]
2547 */
2548 void commit_cmd(void){
2549 int hasChanges; /* True if unsaved changes exist */
@@ -2587,10 +2593,12 @@
2593 int bIgnoreSkew = 0; /* --ignore-clock-skew flag */
2594 int mxSize;
2595 char *zCurBranch = 0; /* The current branch name of checkout */
2596 char *zNewBranch = 0; /* The branch name after update */
2597 int ckComFlgs; /* Flags passed to verify_comment() */
2598 const char * zWikiFile; /* --wiki X */
2599 const char * zWikiMime; /* --wiki-mimetype X */
2600
2601 memset(&sCiInfo, 0, sizeof(sCiInfo));
2602 url_proxy_options();
2603 /* Undocumented. Supported only for backwards
2604 ** compatibility -------vvvvvvv */
@@ -2655,10 +2663,12 @@
2663 if( db_get_boolean("clearsign", 0)==0 ){ noSign = 1; }
2664 useCksum = db_get_boolean("repo-cksum", 1);
2665 bIgnoreSkew = find_option("ignore-clock-skew",0,0)!=0;
2666 mxSize = db_large_file_size();
2667 if( find_option("ignore-oversize",0,0)!=0 ) mxSize = 0;
2668 zWikiFile = find_option("wiki","w",1);
2669 zWikiMime = find_option("wiki-mimetype","wm",1);
2670 (void)fossil_text_editor();
2671 verify_all_options();
2672
2673 /* The --no-warnings flag and the --force flag each imply
2674 ** the --no-verify-comment flag */
@@ -3305,10 +3315,33 @@
3315 vfile_aggregate_checksum_disk(nvid, &cksum2);
3316 if( blob_compare(&cksum1, &cksum2) ){
3317 fossil_fatal("working check-out before and after commit does not match");
3318 }
3319 }
3320
3321 if( zWikiFile ){
3322 /* Handle --wiki and --wiki-mimetype */
3323 Blob bWiki = BLOB_INITIALIZER;
3324 char * zPageName;
3325 int parentRid = 0;
3326 blob_read_from_file(&bWiki, zWikiFile, ExtFILE);
3327 if( !zWikiMime ){
3328 if( 0==sqlite3_strglob("*.md", zWikiFile) ){
3329 zWikiMime = "text/x-markdown";
3330 }else if( 0==sqlite3_strglob("*.wiki", zWikiFile) ){
3331 zWikiMime = "text/x-fossil-wiki";
3332 }else{
3333 zWikiMime = "text/plain";
3334 }
3335 }
3336 zPageName = mprintf("checkin/%s", zUuid);
3337 zWikiMime = wiki_filter_mimetypes(zWikiMime);
3338 wiki_cmd_commit(zPageName, parentRid, &bWiki, zWikiMime, 1);
3339 fossil_print("Added %s (%s)\n", zPageName, zWikiMime);
3340 blob_reset(&bWiki);
3341 fossil_free(zPageName);
3342 }
3343
3344 /* Clear the undo/redo stack */
3345 undo_reset();
3346
3347 /* Commit */
3348
+4 -1
--- src/default.css
+++ src/default.css
@@ -1244,13 +1244,16 @@
12441244
display: none;
12451245
}
12461246
.accordion_closed > .accordion_btn_plus {
12471247
display: inline-block;
12481248
}
1249
-.accordion_panel {
1249
+.accordion_panel, details > div {
12501250
overflow-y: clip;
12511251
transition: max-height 0.25s ease-out;
1252
+}
1253
+details > summary.section {
1254
+ cursor: pointer;
12521255
}
12531256
.error {
12541257
color: darkred;
12551258
background: yellow;
12561259
}
12571260
--- src/default.css
+++ src/default.css
@@ -1244,13 +1244,16 @@
1244 display: none;
1245 }
1246 .accordion_closed > .accordion_btn_plus {
1247 display: inline-block;
1248 }
1249 .accordion_panel {
1250 overflow-y: clip;
1251 transition: max-height 0.25s ease-out;
 
 
 
1252 }
1253 .error {
1254 color: darkred;
1255 background: yellow;
1256 }
1257
--- src/default.css
+++ src/default.css
@@ -1244,13 +1244,16 @@
1244 display: none;
1245 }
1246 .accordion_closed > .accordion_btn_plus {
1247 display: inline-block;
1248 }
1249 .accordion_panel, details > div {
1250 overflow-y: clip;
1251 transition: max-height 0.25s ease-out;
1252 }
1253 details > summary.section {
1254 cursor: pointer;
1255 }
1256 .error {
1257 color: darkred;
1258 background: yellow;
1259 }
1260
+10 -8
--- src/info.c
+++ src/info.c
@@ -1080,11 +1080,12 @@
10801080
zComment = db_column_text(&q1, 3);
10811081
zDate = db_column_text(&q1,1);
10821082
zOrigDate = db_column_text(&q1, 4);
10831083
if( zOrigDate==0 ) zOrigDate = zDate;
10841084
zZulu = db_column_text(&q1, 6);
1085
- @ <div class="section accordion">Overview</div>
1085
+ @ <details open>
1086
+ @ <summary class="section">Overview</summary>
10861087
@ <div class="accordion_panel">
10871088
@ <table class="label-value">
10881089
@ <tr><th>Comment:</th><td class="infoComment">\
10891090
@ %!W(zEComment?zEComment:zComment)</td></tr>
10901091
@@ -1269,20 +1270,21 @@
12691270
}else{
12701271
style_header("Check-in Information");
12711272
login_anonymous_available();
12721273
}
12731274
db_finalize(&q1);
1274
- @ </div>
1275
- builtin_request_js("accordion.js");
1275
+ @ </details>
12761276
if( !PB("nowiki") ){
12771277
wiki_render_associated("checkin", zUuid, 0);
12781278
}
1279
- render_backlink_graph(zUuid,
1280
- "<div class=\"section accordion\">References</div>\n");
1281
- @ <div class="section accordion">Context</div><div class="accordion_panel">
1279
+ render_backlink_graph(zUuid, "References");
1280
+ @ <details open><summary class="section">Context</summary>
1281
+ @ <div class="accordion_panel">
12821282
render_checkin_context(rid, 0, 2, 0);
1283
- @ </div><div class="section accordion" id="changes_section">Changes</div>
1283
+ @ </div></details>
1284
+ @ <details open>
1285
+ @ <summary class="section" id="changes_section">Changes</summary>
12841286
@ <div class="accordion_panel">
12851287
@ <div class="sectionmenu info-changes-menu">
12861288
/* ^^^ .info-changes-menu is used by diff scroll sync */
12871289
pCfg = construct_diff_flags(diffType, &DCfg);
12881290
DCfg.diffFlags |= DIFF_NUMSTAT; /* Show stats in the 'Changes' section */
@@ -1338,11 +1340,11 @@
13381340
const char *zOldName = db_column_text(&q3, 4);
13391341
append_file_change_line(zUuid, zName, zOld, zNew, zOldName,
13401342
pCfg,mperm,aChng);
13411343
}
13421344
db_finalize(&q3);
1343
- @ </div>
1345
+ @ </div></details>
13441346
if( diffType!=0 ){
13451347
adjust_changes_section_title(__LINE__, aChng);
13461348
}
13471349
append_diff_javascript(diffType);
13481350
style_finish_page();
13491351
--- src/info.c
+++ src/info.c
@@ -1080,11 +1080,12 @@
1080 zComment = db_column_text(&q1, 3);
1081 zDate = db_column_text(&q1,1);
1082 zOrigDate = db_column_text(&q1, 4);
1083 if( zOrigDate==0 ) zOrigDate = zDate;
1084 zZulu = db_column_text(&q1, 6);
1085 @ <div class="section accordion">Overview</div>
 
1086 @ <div class="accordion_panel">
1087 @ <table class="label-value">
1088 @ <tr><th>Comment:</th><td class="infoComment">\
1089 @ %!W(zEComment?zEComment:zComment)</td></tr>
1090
@@ -1269,20 +1270,21 @@
1269 }else{
1270 style_header("Check-in Information");
1271 login_anonymous_available();
1272 }
1273 db_finalize(&q1);
1274 @ </div>
1275 builtin_request_js("accordion.js");
1276 if( !PB("nowiki") ){
1277 wiki_render_associated("checkin", zUuid, 0);
1278 }
1279 render_backlink_graph(zUuid,
1280 "<div class=\"section accordion\">References</div>\n");
1281 @ <div class="section accordion">Context</div><div class="accordion_panel">
1282 render_checkin_context(rid, 0, 2, 0);
1283 @ </div><div class="section accordion" id="changes_section">Changes</div>
 
 
1284 @ <div class="accordion_panel">
1285 @ <div class="sectionmenu info-changes-menu">
1286 /* ^^^ .info-changes-menu is used by diff scroll sync */
1287 pCfg = construct_diff_flags(diffType, &DCfg);
1288 DCfg.diffFlags |= DIFF_NUMSTAT; /* Show stats in the 'Changes' section */
@@ -1338,11 +1340,11 @@
1338 const char *zOldName = db_column_text(&q3, 4);
1339 append_file_change_line(zUuid, zName, zOld, zNew, zOldName,
1340 pCfg,mperm,aChng);
1341 }
1342 db_finalize(&q3);
1343 @ </div>
1344 if( diffType!=0 ){
1345 adjust_changes_section_title(__LINE__, aChng);
1346 }
1347 append_diff_javascript(diffType);
1348 style_finish_page();
1349
--- src/info.c
+++ src/info.c
@@ -1080,11 +1080,12 @@
1080 zComment = db_column_text(&q1, 3);
1081 zDate = db_column_text(&q1,1);
1082 zOrigDate = db_column_text(&q1, 4);
1083 if( zOrigDate==0 ) zOrigDate = zDate;
1084 zZulu = db_column_text(&q1, 6);
1085 @ <details open>
1086 @ <summary class="section">Overview</summary>
1087 @ <div class="accordion_panel">
1088 @ <table class="label-value">
1089 @ <tr><th>Comment:</th><td class="infoComment">\
1090 @ %!W(zEComment?zEComment:zComment)</td></tr>
1091
@@ -1269,20 +1270,21 @@
1270 }else{
1271 style_header("Check-in Information");
1272 login_anonymous_available();
1273 }
1274 db_finalize(&q1);
1275 @ </details>
 
1276 if( !PB("nowiki") ){
1277 wiki_render_associated("checkin", zUuid, 0);
1278 }
1279 render_backlink_graph(zUuid, "References");
1280 @ <details open><summary class="section">Context</summary>
1281 @ <div class="accordion_panel">
1282 render_checkin_context(rid, 0, 2, 0);
1283 @ </div></details>
1284 @ <details open>
1285 @ <summary class="section" id="changes_section">Changes</summary>
1286 @ <div class="accordion_panel">
1287 @ <div class="sectionmenu info-changes-menu">
1288 /* ^^^ .info-changes-menu is used by diff scroll sync */
1289 pCfg = construct_diff_flags(diffType, &DCfg);
1290 DCfg.diffFlags |= DIFF_NUMSTAT; /* Show stats in the 'Changes' section */
@@ -1338,11 +1340,11 @@
1340 const char *zOldName = db_column_text(&q3, 4);
1341 append_file_change_line(zUuid, zName, zOld, zNew, zOldName,
1342 pCfg,mperm,aChng);
1343 }
1344 db_finalize(&q3);
1345 @ </div></details>
1346 if( diffType!=0 ){
1347 adjust_changes_section_title(__LINE__, aChng);
1348 }
1349 append_diff_javascript(diffType);
1350 style_finish_page();
1351
--- src/main.mk
+++ src/main.mk
@@ -214,11 +214,10 @@
214214
$(SRCDIR)/../skins/plain_gray/header.txt \
215215
$(SRCDIR)/../skins/xekri/css.txt \
216216
$(SRCDIR)/../skins/xekri/details.txt \
217217
$(SRCDIR)/../skins/xekri/footer.txt \
218218
$(SRCDIR)/../skins/xekri/header.txt \
219
- $(SRCDIR)/accordion.js \
220219
$(SRCDIR)/alerts/bflat2.wav \
221220
$(SRCDIR)/alerts/bflat3.wav \
222221
$(SRCDIR)/alerts/bloop.wav \
223222
$(SRCDIR)/alerts/plunk.wav \
224223
$(SRCDIR)/ci_edit.js \
225224
--- src/main.mk
+++ src/main.mk
@@ -214,11 +214,10 @@
214 $(SRCDIR)/../skins/plain_gray/header.txt \
215 $(SRCDIR)/../skins/xekri/css.txt \
216 $(SRCDIR)/../skins/xekri/details.txt \
217 $(SRCDIR)/../skins/xekri/footer.txt \
218 $(SRCDIR)/../skins/xekri/header.txt \
219 $(SRCDIR)/accordion.js \
220 $(SRCDIR)/alerts/bflat2.wav \
221 $(SRCDIR)/alerts/bflat3.wav \
222 $(SRCDIR)/alerts/bloop.wav \
223 $(SRCDIR)/alerts/plunk.wav \
224 $(SRCDIR)/ci_edit.js \
225
--- src/main.mk
+++ src/main.mk
@@ -214,11 +214,10 @@
214 $(SRCDIR)/../skins/plain_gray/header.txt \
215 $(SRCDIR)/../skins/xekri/css.txt \
216 $(SRCDIR)/../skins/xekri/details.txt \
217 $(SRCDIR)/../skins/xekri/footer.txt \
218 $(SRCDIR)/../skins/xekri/header.txt \
 
219 $(SRCDIR)/alerts/bflat2.wav \
220 $(SRCDIR)/alerts/bflat3.wav \
221 $(SRCDIR)/alerts/bloop.wav \
222 $(SRCDIR)/alerts/plunk.wav \
223 $(SRCDIR)/ci_edit.js \
224
+8 -4
--- src/tar.c
+++ src/tar.c
@@ -1351,12 +1351,13 @@
13511351
")",
13521352
rid
13531353
);
13541354
style_header("Downloads For Check-in %!S", zUuid);
13551355
zBase = archive_base_name(rid);
1356
- @ <div class="section accordion">Downloads for check-in \
1357
- @ %z(href("%R/info/%!S",zUuid))%S(zUuid)</a>%h(zTags)</div>
1356
+ @ <details open>
1357
+ @ <summary class="section">Downloads for check-in \
1358
+ @ %z(href("%R/info/%!S",zUuid))%S(zUuid)</a>%h(zTags)</summary>
13581359
@ <div class="accordion_panel">
13591360
@ <table class="label-value">
13601361
@ <tr>
13611362
@ <th>Tarball:</th>
13621363
@ <td>%z(href("%R/tarball/%s.tar.gz",zBase))\
@@ -1373,12 +1374,15 @@
13731374
@ <th>SQLAR:</th>
13741375
@ <td>%z(href("%R/sqlar/%s.sqlar",zBase))\
13751376
@ %s(g.zBaseURL)/sqlar/%s(zBase).sqlar</a></td>
13761377
@ </tr>
13771378
@ </table></div>
1379
+ @ </details>
13781380
fossil_free(zBase);
1379
- @ <div class="section accordion">Context</div><div class="accordion_panel">
1381
+ @ <details open>
1382
+ @ <summary class="section">Context</summary>
1383
+ @ <div class="accordion_panel">
13801384
render_checkin_context(rid, 0, 0, 0);
13811385
@ </div>
1382
- builtin_request_js("accordion.js");
1386
+ @ </details>
13831387
style_finish_page();
13841388
}
13851389
--- src/tar.c
+++ src/tar.c
@@ -1351,12 +1351,13 @@
1351 ")",
1352 rid
1353 );
1354 style_header("Downloads For Check-in %!S", zUuid);
1355 zBase = archive_base_name(rid);
1356 @ <div class="section accordion">Downloads for check-in \
1357 @ %z(href("%R/info/%!S",zUuid))%S(zUuid)</a>%h(zTags)</div>
 
1358 @ <div class="accordion_panel">
1359 @ <table class="label-value">
1360 @ <tr>
1361 @ <th>Tarball:</th>
1362 @ <td>%z(href("%R/tarball/%s.tar.gz",zBase))\
@@ -1373,12 +1374,15 @@
1373 @ <th>SQLAR:</th>
1374 @ <td>%z(href("%R/sqlar/%s.sqlar",zBase))\
1375 @ %s(g.zBaseURL)/sqlar/%s(zBase).sqlar</a></td>
1376 @ </tr>
1377 @ </table></div>
 
1378 fossil_free(zBase);
1379 @ <div class="section accordion">Context</div><div class="accordion_panel">
 
 
1380 render_checkin_context(rid, 0, 0, 0);
1381 @ </div>
1382 builtin_request_js("accordion.js");
1383 style_finish_page();
1384 }
1385
--- src/tar.c
+++ src/tar.c
@@ -1351,12 +1351,13 @@
1351 ")",
1352 rid
1353 );
1354 style_header("Downloads For Check-in %!S", zUuid);
1355 zBase = archive_base_name(rid);
1356 @ <details open>
1357 @ <summary class="section">Downloads for check-in \
1358 @ %z(href("%R/info/%!S",zUuid))%S(zUuid)</a>%h(zTags)</summary>
1359 @ <div class="accordion_panel">
1360 @ <table class="label-value">
1361 @ <tr>
1362 @ <th>Tarball:</th>
1363 @ <td>%z(href("%R/tarball/%s.tar.gz",zBase))\
@@ -1373,12 +1374,15 @@
1374 @ <th>SQLAR:</th>
1375 @ <td>%z(href("%R/sqlar/%s.sqlar",zBase))\
1376 @ %s(g.zBaseURL)/sqlar/%s(zBase).sqlar</a></td>
1377 @ </tr>
1378 @ </table></div>
1379 @ </details>
1380 fossil_free(zBase);
1381 @ <details open>
1382 @ <summary class="section">Context</summary>
1383 @ <div class="accordion_panel">
1384 render_checkin_context(rid, 0, 0, 0);
1385 @ </div>
1386 @ </details>
1387 style_finish_page();
1388 }
1389
+11 -9
--- src/wiki.c
+++ src/wiki.c
@@ -725,13 +725,13 @@
725725
** If pRid is not NULL then if a result is found *pRid is set to its
726726
** RID. If ppWiki is not NULL then if found *ppWiki is set to the
727727
** loaded wiki object, which the caller is responsible for passing to
728728
** manifest_destroy().
729729
*/
730
-static int wiki_fetch_by_name( const char *zPageName,
731
- unsigned int versionsBack,
732
- int * pRid, Manifest **ppWiki ){
730
+int wiki_fetch_by_name( const char *zPageName,
731
+ unsigned int versionsBack,
732
+ int * pRid, Manifest **ppWiki ){
733733
Manifest *pWiki = 0;
734734
char *zTag = mprintf("wiki-%s", zPageName);
735735
Stmt q = empty_Stmt;
736736
int rid = 0;
737737
@@ -2527,10 +2527,11 @@
25272527
#if INTERFACE
25282528
#define WIKIASSOC_FULL_TITLE 0x00001 /* Full title */
25292529
#define WIKIASSOC_MENU_READ 0x00002 /* Add submenu link to read wiki */
25302530
#define WIKIASSOC_MENU_WRITE 0x00004 /* Add submenu link to add wiki */
25312531
#define WIKIASSOC_ALL 0x00007 /* All of the above */
2532
+#define WIKIASSOC_REVEAL 0x00008 /* Reveal content by default */
25322533
#endif
25332534
25342535
/*
25352536
** Show the default Section label for an associated wiki page.
25362537
*/
@@ -2538,15 +2539,15 @@
25382539
const char *zPrefix, /* "branch", "tag", or "checkin" */
25392540
const char *zName, /* Name of the object */
25402541
unsigned int mFlags /* Zero or more WIKIASSOC_* flags */
25412542
){
25422543
if( (mFlags & WIKIASSOC_FULL_TITLE)==0 ){
2543
- @ <div class="section accordion">About</div>
2544
+ @ <summary class="section">About</summary>
25442545
}else if( zPrefix[0]=='c' ){ /* checkin/... */
2545
- @ <div class="section accordion">About check-in %.20h(zName)</div>
2546
+ @ <summary class="section accordion">About check-in %.20h(zName)</summary>
25462547
}else{
2547
- @ <div class="section accordion">About %s(zPrefix) %h(zName)</div>
2548
+ @ <summary class="section accordion">About %s(zPrefix) %h(zName)</summary>
25482549
}
25492550
}
25502551
25512552
/*
25522553
** Add an "Wiki" button in a submenu that links to the read-wiki page.
@@ -2604,18 +2605,19 @@
26042605
style_submenu_element("Add Wiki", "%R/wikiedit?name=%s/%t",
26052606
zPrefix, zName);
26062607
}
26072608
return 0;
26082609
}
2610
+ @ <details %s((WIKIASSOC_REVEAL & mFlags) ? "open" : "")>
26092611
if( fossil_strcmp(pWiki->zMimetype, "text/x-markdown")==0 ){
26102612
Blob tail = BLOB_INITIALIZER;
26112613
Blob title = BLOB_INITIALIZER;
26122614
Blob markdown;
26132615
blob_init(&markdown, pWiki->zWiki, -1);
26142616
markdown_to_html(&markdown, &title, &tail);
26152617
if( blob_size(&title) ){
2616
- @ <div class="section accordion">%h(blob_str(&title))</div>
2618
+ @ <summary class="section">%h(blob_str(&title))</summary>
26172619
}else{
26182620
wiki_section_label(zPrefix, zName, mFlags);
26192621
}
26202622
wiki_submenu_to_read_wiki(zPrefix, zName, mFlags);
26212623
wiki_submenu_to_edit_wiki(zPrefix, zName, mFlags);
@@ -2638,11 +2640,11 @@
26382640
Blob title = BLOB_INITIALIZER;
26392641
Blob wiki;
26402642
Blob *pBody;
26412643
blob_init(&wiki, pWiki->zWiki, -1);
26422644
if( wiki_find_title(&wiki, &title, &tail) ){
2643
- @ <div class="section accordion">%h(blob_str(&title))</div>
2645
+ @ <summary class="section">%h(blob_str(&title))</summary>
26442646
pBody = &tail;
26452647
}else{
26462648
wiki_section_label(zPrefix, zName, mFlags);
26472649
pBody = &wiki;
26482650
}
@@ -2652,9 +2654,9 @@
26522654
@ </div></div>
26532655
blob_reset(&tail);
26542656
blob_reset(&title);
26552657
blob_reset(&wiki);
26562658
}
2659
+ @ </details>
26572660
manifest_destroy(pWiki);
2658
- builtin_request_js("accordion.js");
26592661
return 1;
26602662
}
26612663
--- src/wiki.c
+++ src/wiki.c
@@ -725,13 +725,13 @@
725 ** If pRid is not NULL then if a result is found *pRid is set to its
726 ** RID. If ppWiki is not NULL then if found *ppWiki is set to the
727 ** loaded wiki object, which the caller is responsible for passing to
728 ** manifest_destroy().
729 */
730 static int wiki_fetch_by_name( const char *zPageName,
731 unsigned int versionsBack,
732 int * pRid, Manifest **ppWiki ){
733 Manifest *pWiki = 0;
734 char *zTag = mprintf("wiki-%s", zPageName);
735 Stmt q = empty_Stmt;
736 int rid = 0;
737
@@ -2527,10 +2527,11 @@
2527 #if INTERFACE
2528 #define WIKIASSOC_FULL_TITLE 0x00001 /* Full title */
2529 #define WIKIASSOC_MENU_READ 0x00002 /* Add submenu link to read wiki */
2530 #define WIKIASSOC_MENU_WRITE 0x00004 /* Add submenu link to add wiki */
2531 #define WIKIASSOC_ALL 0x00007 /* All of the above */
 
2532 #endif
2533
2534 /*
2535 ** Show the default Section label for an associated wiki page.
2536 */
@@ -2538,15 +2539,15 @@
2538 const char *zPrefix, /* "branch", "tag", or "checkin" */
2539 const char *zName, /* Name of the object */
2540 unsigned int mFlags /* Zero or more WIKIASSOC_* flags */
2541 ){
2542 if( (mFlags & WIKIASSOC_FULL_TITLE)==0 ){
2543 @ <div class="section accordion">About</div>
2544 }else if( zPrefix[0]=='c' ){ /* checkin/... */
2545 @ <div class="section accordion">About check-in %.20h(zName)</div>
2546 }else{
2547 @ <div class="section accordion">About %s(zPrefix) %h(zName)</div>
2548 }
2549 }
2550
2551 /*
2552 ** Add an "Wiki" button in a submenu that links to the read-wiki page.
@@ -2604,18 +2605,19 @@
2604 style_submenu_element("Add Wiki", "%R/wikiedit?name=%s/%t",
2605 zPrefix, zName);
2606 }
2607 return 0;
2608 }
 
2609 if( fossil_strcmp(pWiki->zMimetype, "text/x-markdown")==0 ){
2610 Blob tail = BLOB_INITIALIZER;
2611 Blob title = BLOB_INITIALIZER;
2612 Blob markdown;
2613 blob_init(&markdown, pWiki->zWiki, -1);
2614 markdown_to_html(&markdown, &title, &tail);
2615 if( blob_size(&title) ){
2616 @ <div class="section accordion">%h(blob_str(&title))</div>
2617 }else{
2618 wiki_section_label(zPrefix, zName, mFlags);
2619 }
2620 wiki_submenu_to_read_wiki(zPrefix, zName, mFlags);
2621 wiki_submenu_to_edit_wiki(zPrefix, zName, mFlags);
@@ -2638,11 +2640,11 @@
2638 Blob title = BLOB_INITIALIZER;
2639 Blob wiki;
2640 Blob *pBody;
2641 blob_init(&wiki, pWiki->zWiki, -1);
2642 if( wiki_find_title(&wiki, &title, &tail) ){
2643 @ <div class="section accordion">%h(blob_str(&title))</div>
2644 pBody = &tail;
2645 }else{
2646 wiki_section_label(zPrefix, zName, mFlags);
2647 pBody = &wiki;
2648 }
@@ -2652,9 +2654,9 @@
2652 @ </div></div>
2653 blob_reset(&tail);
2654 blob_reset(&title);
2655 blob_reset(&wiki);
2656 }
 
2657 manifest_destroy(pWiki);
2658 builtin_request_js("accordion.js");
2659 return 1;
2660 }
2661
--- src/wiki.c
+++ src/wiki.c
@@ -725,13 +725,13 @@
725 ** If pRid is not NULL then if a result is found *pRid is set to its
726 ** RID. If ppWiki is not NULL then if found *ppWiki is set to the
727 ** loaded wiki object, which the caller is responsible for passing to
728 ** manifest_destroy().
729 */
730 int wiki_fetch_by_name( const char *zPageName,
731 unsigned int versionsBack,
732 int * pRid, Manifest **ppWiki ){
733 Manifest *pWiki = 0;
734 char *zTag = mprintf("wiki-%s", zPageName);
735 Stmt q = empty_Stmt;
736 int rid = 0;
737
@@ -2527,10 +2527,11 @@
2527 #if INTERFACE
2528 #define WIKIASSOC_FULL_TITLE 0x00001 /* Full title */
2529 #define WIKIASSOC_MENU_READ 0x00002 /* Add submenu link to read wiki */
2530 #define WIKIASSOC_MENU_WRITE 0x00004 /* Add submenu link to add wiki */
2531 #define WIKIASSOC_ALL 0x00007 /* All of the above */
2532 #define WIKIASSOC_REVEAL 0x00008 /* Reveal content by default */
2533 #endif
2534
2535 /*
2536 ** Show the default Section label for an associated wiki page.
2537 */
@@ -2538,15 +2539,15 @@
2539 const char *zPrefix, /* "branch", "tag", or "checkin" */
2540 const char *zName, /* Name of the object */
2541 unsigned int mFlags /* Zero or more WIKIASSOC_* flags */
2542 ){
2543 if( (mFlags & WIKIASSOC_FULL_TITLE)==0 ){
2544 @ <summary class="section">About</summary>
2545 }else if( zPrefix[0]=='c' ){ /* checkin/... */
2546 @ <summary class="section accordion">About check-in %.20h(zName)</summary>
2547 }else{
2548 @ <summary class="section accordion">About %s(zPrefix) %h(zName)</summary>
2549 }
2550 }
2551
2552 /*
2553 ** Add an "Wiki" button in a submenu that links to the read-wiki page.
@@ -2604,18 +2605,19 @@
2605 style_submenu_element("Add Wiki", "%R/wikiedit?name=%s/%t",
2606 zPrefix, zName);
2607 }
2608 return 0;
2609 }
2610 @ <details %s((WIKIASSOC_REVEAL & mFlags) ? "open" : "")>
2611 if( fossil_strcmp(pWiki->zMimetype, "text/x-markdown")==0 ){
2612 Blob tail = BLOB_INITIALIZER;
2613 Blob title = BLOB_INITIALIZER;
2614 Blob markdown;
2615 blob_init(&markdown, pWiki->zWiki, -1);
2616 markdown_to_html(&markdown, &title, &tail);
2617 if( blob_size(&title) ){
2618 @ <summary class="section">%h(blob_str(&title))</summary>
2619 }else{
2620 wiki_section_label(zPrefix, zName, mFlags);
2621 }
2622 wiki_submenu_to_read_wiki(zPrefix, zName, mFlags);
2623 wiki_submenu_to_edit_wiki(zPrefix, zName, mFlags);
@@ -2638,11 +2640,11 @@
2640 Blob title = BLOB_INITIALIZER;
2641 Blob wiki;
2642 Blob *pBody;
2643 blob_init(&wiki, pWiki->zWiki, -1);
2644 if( wiki_find_title(&wiki, &title, &tail) ){
2645 @ <summary class="section">%h(blob_str(&title))</summary>
2646 pBody = &tail;
2647 }else{
2648 wiki_section_label(zPrefix, zName, mFlags);
2649 pBody = &wiki;
2650 }
@@ -2652,9 +2654,9 @@
2654 @ </div></div>
2655 blob_reset(&tail);
2656 blob_reset(&title);
2657 blob_reset(&wiki);
2658 }
2659 @ </details>
2660 manifest_destroy(pWiki);
 
2661 return 1;
2662 }
2663
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -600,11 +600,10 @@
600600
$(SRCDIR)/../skins/plain_gray/header.txt \
601601
$(SRCDIR)/../skins/xekri/css.txt \
602602
$(SRCDIR)/../skins/xekri/details.txt \
603603
$(SRCDIR)/../skins/xekri/footer.txt \
604604
$(SRCDIR)/../skins/xekri/header.txt \
605
- $(SRCDIR)/accordion.js \
606605
$(SRCDIR)/alerts/bflat2.wav \
607606
$(SRCDIR)/alerts/bflat3.wav \
608607
$(SRCDIR)/alerts/bloop.wav \
609608
$(SRCDIR)/alerts/plunk.wav \
610609
$(SRCDIR)/ci_edit.js \
611610
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -600,11 +600,10 @@
600 $(SRCDIR)/../skins/plain_gray/header.txt \
601 $(SRCDIR)/../skins/xekri/css.txt \
602 $(SRCDIR)/../skins/xekri/details.txt \
603 $(SRCDIR)/../skins/xekri/footer.txt \
604 $(SRCDIR)/../skins/xekri/header.txt \
605 $(SRCDIR)/accordion.js \
606 $(SRCDIR)/alerts/bflat2.wav \
607 $(SRCDIR)/alerts/bflat3.wav \
608 $(SRCDIR)/alerts/bloop.wav \
609 $(SRCDIR)/alerts/plunk.wav \
610 $(SRCDIR)/ci_edit.js \
611
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -600,11 +600,10 @@
600 $(SRCDIR)/../skins/plain_gray/header.txt \
601 $(SRCDIR)/../skins/xekri/css.txt \
602 $(SRCDIR)/../skins/xekri/details.txt \
603 $(SRCDIR)/../skins/xekri/footer.txt \
604 $(SRCDIR)/../skins/xekri/header.txt \
 
605 $(SRCDIR)/alerts/bflat2.wav \
606 $(SRCDIR)/alerts/bflat3.wav \
607 $(SRCDIR)/alerts/bloop.wav \
608 $(SRCDIR)/alerts/plunk.wav \
609 $(SRCDIR)/ci_edit.js \
610
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -229,11 +229,11 @@
229229
!elseif $(OPTIMIZATIONS)>1
230230
RELOPTS = /O2
231231
!elseif $(OPTIMIZATIONS)>0
232232
RELOPTS = /O1
233233
!else
234
-RELOPTS = /Od
234
+RELOPTS =
235235
!endif
236236
237237
!if $(DEBUG)!=0
238238
CFLAGS = $(CFLAGS) /Zi $(CRTFLAGS) $(DBGOPTS) /DFOSSIL_DEBUG /DTH_MEMDEBUG
239239
LDFLAGS = $(LDFLAGS) /DEBUG
@@ -565,11 +565,10 @@
565565
"$(SRCDIR)\..\skins\plain_gray\header.txt" \
566566
"$(SRCDIR)\..\skins\xekri\css.txt" \
567567
"$(SRCDIR)\..\skins\xekri\details.txt" \
568568
"$(SRCDIR)\..\skins\xekri\footer.txt" \
569569
"$(SRCDIR)\..\skins\xekri\header.txt" \
570
- "$(SRCDIR)\accordion.js" \
571570
"$(SRCDIR)\alerts\bflat2.wav" \
572571
"$(SRCDIR)\alerts\bflat3.wav" \
573572
"$(SRCDIR)\alerts\bloop.wav" \
574573
"$(SRCDIR)\alerts\plunk.wav" \
575574
"$(SRCDIR)\ci_edit.js" \
@@ -1205,11 +1204,10 @@
12051204
echo "$(SRCDIR)\../skins/plain_gray/header.txt" >> $@
12061205
echo "$(SRCDIR)\../skins/xekri/css.txt" >> $@
12071206
echo "$(SRCDIR)\../skins/xekri/details.txt" >> $@
12081207
echo "$(SRCDIR)\../skins/xekri/footer.txt" >> $@
12091208
echo "$(SRCDIR)\../skins/xekri/header.txt" >> $@
1210
- echo "$(SRCDIR)\accordion.js" >> $@
12111209
echo "$(SRCDIR)\alerts/bflat2.wav" >> $@
12121210
echo "$(SRCDIR)\alerts/bflat3.wav" >> $@
12131211
echo "$(SRCDIR)\alerts/bloop.wav" >> $@
12141212
echo "$(SRCDIR)\alerts/plunk.wav" >> $@
12151213
echo "$(SRCDIR)\ci_edit.js" >> $@
12161214
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -229,11 +229,11 @@
229 !elseif $(OPTIMIZATIONS)>1
230 RELOPTS = /O2
231 !elseif $(OPTIMIZATIONS)>0
232 RELOPTS = /O1
233 !else
234 RELOPTS = /Od
235 !endif
236
237 !if $(DEBUG)!=0
238 CFLAGS = $(CFLAGS) /Zi $(CRTFLAGS) $(DBGOPTS) /DFOSSIL_DEBUG /DTH_MEMDEBUG
239 LDFLAGS = $(LDFLAGS) /DEBUG
@@ -565,11 +565,10 @@
565 "$(SRCDIR)\..\skins\plain_gray\header.txt" \
566 "$(SRCDIR)\..\skins\xekri\css.txt" \
567 "$(SRCDIR)\..\skins\xekri\details.txt" \
568 "$(SRCDIR)\..\skins\xekri\footer.txt" \
569 "$(SRCDIR)\..\skins\xekri\header.txt" \
570 "$(SRCDIR)\accordion.js" \
571 "$(SRCDIR)\alerts\bflat2.wav" \
572 "$(SRCDIR)\alerts\bflat3.wav" \
573 "$(SRCDIR)\alerts\bloop.wav" \
574 "$(SRCDIR)\alerts\plunk.wav" \
575 "$(SRCDIR)\ci_edit.js" \
@@ -1205,11 +1204,10 @@
1205 echo "$(SRCDIR)\../skins/plain_gray/header.txt" >> $@
1206 echo "$(SRCDIR)\../skins/xekri/css.txt" >> $@
1207 echo "$(SRCDIR)\../skins/xekri/details.txt" >> $@
1208 echo "$(SRCDIR)\../skins/xekri/footer.txt" >> $@
1209 echo "$(SRCDIR)\../skins/xekri/header.txt" >> $@
1210 echo "$(SRCDIR)\accordion.js" >> $@
1211 echo "$(SRCDIR)\alerts/bflat2.wav" >> $@
1212 echo "$(SRCDIR)\alerts/bflat3.wav" >> $@
1213 echo "$(SRCDIR)\alerts/bloop.wav" >> $@
1214 echo "$(SRCDIR)\alerts/plunk.wav" >> $@
1215 echo "$(SRCDIR)\ci_edit.js" >> $@
1216
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -229,11 +229,11 @@
229 !elseif $(OPTIMIZATIONS)>1
230 RELOPTS = /O2
231 !elseif $(OPTIMIZATIONS)>0
232 RELOPTS = /O1
233 !else
234 RELOPTS =
235 !endif
236
237 !if $(DEBUG)!=0
238 CFLAGS = $(CFLAGS) /Zi $(CRTFLAGS) $(DBGOPTS) /DFOSSIL_DEBUG /DTH_MEMDEBUG
239 LDFLAGS = $(LDFLAGS) /DEBUG
@@ -565,11 +565,10 @@
565 "$(SRCDIR)\..\skins\plain_gray\header.txt" \
566 "$(SRCDIR)\..\skins\xekri\css.txt" \
567 "$(SRCDIR)\..\skins\xekri\details.txt" \
568 "$(SRCDIR)\..\skins\xekri\footer.txt" \
569 "$(SRCDIR)\..\skins\xekri\header.txt" \
 
570 "$(SRCDIR)\alerts\bflat2.wav" \
571 "$(SRCDIR)\alerts\bflat3.wav" \
572 "$(SRCDIR)\alerts\bloop.wav" \
573 "$(SRCDIR)\alerts\plunk.wav" \
574 "$(SRCDIR)\ci_edit.js" \
@@ -1205,11 +1204,10 @@
1204 echo "$(SRCDIR)\../skins/plain_gray/header.txt" >> $@
1205 echo "$(SRCDIR)\../skins/xekri/css.txt" >> $@
1206 echo "$(SRCDIR)\../skins/xekri/details.txt" >> $@
1207 echo "$(SRCDIR)\../skins/xekri/footer.txt" >> $@
1208 echo "$(SRCDIR)\../skins/xekri/header.txt" >> $@
 
1209 echo "$(SRCDIR)\alerts/bflat2.wav" >> $@
1210 echo "$(SRCDIR)\alerts/bflat3.wav" >> $@
1211 echo "$(SRCDIR)\alerts/bloop.wav" >> $@
1212 echo "$(SRCDIR)\alerts/plunk.wav" >> $@
1213 echo "$(SRCDIR)\ci_edit.js" >> $@
1214

Keyboard Shortcuts

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