Fossil SCM

format timeline page via css

Ratte 2010-09-04 19:20 stv-skinning merge
Commit 8dfed953f75304420782640246fe82bfd07947af
--- src/setup.c
+++ src/setup.c
@@ -909,10 +909,13 @@
909909
@ of CSS files can be seen on the <a href="setup_skin">skins page</a>.
910910
@ See also the <a href="setup_header">header</a> and
911911
@ <a href="setup_footer">footer</a> editing screens.
912912
@ <blockquote><pre>
913913
@ %h(zDefaultCSS)
914
+ @ %h(zTdTimelineTimeStampCell)
915
+ @ %h(zTdTimelineOmitted)
916
+ @ %h(zTdTimelineComment)
914917
@ </pre></blockquote>
915918
style_footer();
916919
db_end_transaction(0);
917920
}
918921
919922
--- src/setup.c
+++ src/setup.c
@@ -909,10 +909,13 @@
909 @ of CSS files can be seen on the <a href="setup_skin">skins page</a>.
910 @ See also the <a href="setup_header">header</a> and
911 @ <a href="setup_footer">footer</a> editing screens.
912 @ <blockquote><pre>
913 @ %h(zDefaultCSS)
 
 
 
914 @ </pre></blockquote>
915 style_footer();
916 db_end_transaction(0);
917 }
918
919
--- src/setup.c
+++ src/setup.c
@@ -909,10 +909,13 @@
909 @ of CSS files can be seen on the <a href="setup_skin">skins page</a>.
910 @ See also the <a href="setup_header">header</a> and
911 @ <a href="setup_footer">footer</a> editing screens.
912 @ <blockquote><pre>
913 @ %h(zDefaultCSS)
914 @ %h(zTdTimelineTimeStampCell)
915 @ %h(zTdTimelineOmitted)
916 @ %h(zTdTimelineComment)
917 @ </pre></blockquote>
918 style_footer();
919 db_end_transaction(0);
920 }
921
922
+31 -1
--- src/style.c
+++ src/style.c
@@ -101,10 +101,11 @@
101101
if( g.zLogin ){
102102
Th_Store("login", g.zLogin);
103103
}
104104
if( g.thTrace ) Th_Trace("BEGIN_HEADER_SCRIPT<br />\n", -1);
105105
Th_Render(zHeader);
106
+ cgi_printf("%s","<link rel=\"stylesheet\" href=\"stdstyle.css\" type=\"text/css\">");
106107
if( g.thTrace ) Th_Trace("END_HEADER<br />\n", -1);
107108
Th_Unstore("title"); /* Avoid collisions with ticket field names */
108109
cgi_destination(CGI_BODY);
109110
g.cgiOutput = 1;
110111
headerHasBeenGenerated = 1;
@@ -379,20 +380,49 @@
379380
@ vertical-align: top;
380381
@ text-align: right;
381382
@ padding: 0.2ex 2ex;
382383
@ }
383384
;
384
-
385
+const char zTdTimelineTimeStampCell[] =
386
+@ /* The time column in timeline tables */
387
+@ td.timelineTimeStampCell {
388
+@ valign: top;
389
+@ text-align: right;
390
+@}
391
+;
392
+const char zTdTimelineOmitted[] =
393
+@ /* The omitted line in timeline tables */
394
+@ td.timelineOmitted {
395
+@ font-size: small;
396
+@ font-style: italic;
397
+@ }
398
+;
399
+const char zTdTimelineComment[] =
400
+@ /* The comment cell in timeline tables */
401
+@ td.timelineComment {
402
+@ valign: top;
403
+@ text-align: left;
404
+@ }
405
+;
406
+
385407
/*
386408
** WEBPAGE: style.css
387409
*/
388410
void page_style_css(void){
389411
char *zCSS = 0;
390412
391413
cgi_set_content_type("text/css");
392414
zCSS = db_get("css",(char*)zDefaultCSS);
393415
cgi_append_content(zCSS, -1);
416
+ cgi_append_content("\n", -1);
417
+ /* append internal classes, if not already in style sheet */
418
+ if (!strstr(zCSS,"timelineTimeStampCell"))
419
+ cgi_append_content(zTdTimelineTimeStampCell,-1);
420
+ if (!strstr(zCSS,"timelineOmitted"))
421
+ cgi_append_content(zTdTimelineOmitted,-1);
422
+ if (!strstr(zCSS,"timelineComment"))
423
+ cgi_append_content(zTdTimelineComment,-1);
394424
g.isConst = 1;
395425
}
396426
397427
/*
398428
** WEBPAGE: test_env
399429
--- src/style.c
+++ src/style.c
@@ -101,10 +101,11 @@
101 if( g.zLogin ){
102 Th_Store("login", g.zLogin);
103 }
104 if( g.thTrace ) Th_Trace("BEGIN_HEADER_SCRIPT<br />\n", -1);
105 Th_Render(zHeader);
 
106 if( g.thTrace ) Th_Trace("END_HEADER<br />\n", -1);
107 Th_Unstore("title"); /* Avoid collisions with ticket field names */
108 cgi_destination(CGI_BODY);
109 g.cgiOutput = 1;
110 headerHasBeenGenerated = 1;
@@ -379,20 +380,49 @@
379 @ vertical-align: top;
380 @ text-align: right;
381 @ padding: 0.2ex 2ex;
382 @ }
383 ;
384
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
385 /*
386 ** WEBPAGE: style.css
387 */
388 void page_style_css(void){
389 char *zCSS = 0;
390
391 cgi_set_content_type("text/css");
392 zCSS = db_get("css",(char*)zDefaultCSS);
393 cgi_append_content(zCSS, -1);
 
 
 
 
 
 
 
 
394 g.isConst = 1;
395 }
396
397 /*
398 ** WEBPAGE: test_env
399
--- src/style.c
+++ src/style.c
@@ -101,10 +101,11 @@
101 if( g.zLogin ){
102 Th_Store("login", g.zLogin);
103 }
104 if( g.thTrace ) Th_Trace("BEGIN_HEADER_SCRIPT<br />\n", -1);
105 Th_Render(zHeader);
106 cgi_printf("%s","<link rel=\"stylesheet\" href=\"stdstyle.css\" type=\"text/css\">");
107 if( g.thTrace ) Th_Trace("END_HEADER<br />\n", -1);
108 Th_Unstore("title"); /* Avoid collisions with ticket field names */
109 cgi_destination(CGI_BODY);
110 g.cgiOutput = 1;
111 headerHasBeenGenerated = 1;
@@ -379,20 +380,49 @@
380 @ vertical-align: top;
381 @ text-align: right;
382 @ padding: 0.2ex 2ex;
383 @ }
384 ;
385 const char zTdTimelineTimeStampCell[] =
386 @ /* The time column in timeline tables */
387 @ td.timelineTimeStampCell {
388 @ valign: top;
389 @ text-align: right;
390 @}
391 ;
392 const char zTdTimelineOmitted[] =
393 @ /* The omitted line in timeline tables */
394 @ td.timelineOmitted {
395 @ font-size: small;
396 @ font-style: italic;
397 @ }
398 ;
399 const char zTdTimelineComment[] =
400 @ /* The comment cell in timeline tables */
401 @ td.timelineComment {
402 @ valign: top;
403 @ text-align: left;
404 @ }
405 ;
406
407 /*
408 ** WEBPAGE: style.css
409 */
410 void page_style_css(void){
411 char *zCSS = 0;
412
413 cgi_set_content_type("text/css");
414 zCSS = db_get("css",(char*)zDefaultCSS);
415 cgi_append_content(zCSS, -1);
416 cgi_append_content("\n", -1);
417 /* append internal classes, if not already in style sheet */
418 if (!strstr(zCSS,"timelineTimeStampCell"))
419 cgi_append_content(zTdTimelineTimeStampCell,-1);
420 if (!strstr(zCSS,"timelineOmitted"))
421 cgi_append_content(zTdTimelineOmitted,-1);
422 if (!strstr(zCSS,"timelineComment"))
423 cgi_append_content(zTdTimelineComment,-1);
424 g.isConst = 1;
425 }
426
427 /*
428 ** WEBPAGE: test_env
429
+9 -8
--- src/timeline.c
+++ src/timeline.c
@@ -218,13 +218,13 @@
218218
}
219219
}
220220
}
221221
prevTagid = tagid;
222222
if( suppressCnt ){
223
- @ <tr><td><td><td>
224
- @ <small><i>... %d(suppressCnt) similar
225
- @ event%s(suppressCnt>1?"s":"") omitted.</i></small></tr>
223
+ @ <tr><td><td><td class="timelineOmitted">
224
+ @ ... %d(suppressCnt) similar event%s(suppressCnt>1?"s":"") omitted.
225
+ @ </tr>
226226
suppressCnt = 0;
227227
}
228228
if( strcmp(zType,"div")==0 ){
229229
@ <tr><td colspan=3><hr></td></tr>
230230
continue;
@@ -236,11 +236,11 @@
236236
@ </td></tr>
237237
}
238238
memcpy(zTime, &zDate[11], 5);
239239
zTime[5] = 0;
240240
@ <tr>
241
- @ <td valign="top" align="right">%s(zTime)</td>
241
+ @ <td class="timelineTimeStampCell">%s(zTime)</td>
242242
@ <td width="20" align="left" valign="top">
243243
if( pGraph && zType[0]=='c' ){
244244
int nParent = 0;
245245
int aParent[32];
246246
const char *zBr;
@@ -268,13 +268,13 @@
268268
gidx = graph_add_row(pGraph, rid, nParent, aParent, zBr, zBgClr);
269269
db_reset(&qbranch);
270270
@ <div id="m%d(gidx)"></div>
271271
}
272272
if( zBgClr && zBgClr[0] ){
273
- @ <td valign="top" align="left" bgcolor="%h(zBgClr)">
273
+ @ <td class="timelineComment" bgcolor="%h(zBgClr)">
274274
}else{
275
- @ <td valign="top" align="left">
275
+ @ <td class="timelineComment">
276276
}
277277
if( zType[0]=='c' ){
278278
hyperlink_to_uuid(zUuid);
279279
if( isLeaf ){
280280
if( db_exists("SELECT 1 FROM tagxref"
@@ -310,12 +310,13 @@
310310
}
311311
@ </td></tr>
312312
}
313313
if( suppressCnt ){
314314
@ <tr><td><td><td>
315
- @ <small><i>... %d(suppressCnt) similar
316
- @ event%s(suppressCnt>1?"s":"") omitted.</i></small></tr>
315
+ @ <tr><td><td><td class="timelineOmitted">
316
+ @ ... %d(suppressCnt) similar event%s(suppressCnt>1?"s":"") omitted.
317
+ @ </tr>
317318
suppressCnt = 0;
318319
}
319320
if( pGraph ){
320321
graph_finish(pGraph, (tmFlags & TIMELINE_DISJOINT)!=0);
321322
if( pGraph->nErr ){
322323
--- src/timeline.c
+++ src/timeline.c
@@ -218,13 +218,13 @@
218 }
219 }
220 }
221 prevTagid = tagid;
222 if( suppressCnt ){
223 @ <tr><td><td><td>
224 @ <small><i>... %d(suppressCnt) similar
225 @ event%s(suppressCnt>1?"s":"") omitted.</i></small></tr>
226 suppressCnt = 0;
227 }
228 if( strcmp(zType,"div")==0 ){
229 @ <tr><td colspan=3><hr></td></tr>
230 continue;
@@ -236,11 +236,11 @@
236 @ </td></tr>
237 }
238 memcpy(zTime, &zDate[11], 5);
239 zTime[5] = 0;
240 @ <tr>
241 @ <td valign="top" align="right">%s(zTime)</td>
242 @ <td width="20" align="left" valign="top">
243 if( pGraph && zType[0]=='c' ){
244 int nParent = 0;
245 int aParent[32];
246 const char *zBr;
@@ -268,13 +268,13 @@
268 gidx = graph_add_row(pGraph, rid, nParent, aParent, zBr, zBgClr);
269 db_reset(&qbranch);
270 @ <div id="m%d(gidx)"></div>
271 }
272 if( zBgClr && zBgClr[0] ){
273 @ <td valign="top" align="left" bgcolor="%h(zBgClr)">
274 }else{
275 @ <td valign="top" align="left">
276 }
277 if( zType[0]=='c' ){
278 hyperlink_to_uuid(zUuid);
279 if( isLeaf ){
280 if( db_exists("SELECT 1 FROM tagxref"
@@ -310,12 +310,13 @@
310 }
311 @ </td></tr>
312 }
313 if( suppressCnt ){
314 @ <tr><td><td><td>
315 @ <small><i>... %d(suppressCnt) similar
316 @ event%s(suppressCnt>1?"s":"") omitted.</i></small></tr>
 
317 suppressCnt = 0;
318 }
319 if( pGraph ){
320 graph_finish(pGraph, (tmFlags & TIMELINE_DISJOINT)!=0);
321 if( pGraph->nErr ){
322
--- src/timeline.c
+++ src/timeline.c
@@ -218,13 +218,13 @@
218 }
219 }
220 }
221 prevTagid = tagid;
222 if( suppressCnt ){
223 @ <tr><td><td><td class="timelineOmitted">
224 @ ... %d(suppressCnt) similar event%s(suppressCnt>1?"s":"") omitted.
225 @ </tr>
226 suppressCnt = 0;
227 }
228 if( strcmp(zType,"div")==0 ){
229 @ <tr><td colspan=3><hr></td></tr>
230 continue;
@@ -236,11 +236,11 @@
236 @ </td></tr>
237 }
238 memcpy(zTime, &zDate[11], 5);
239 zTime[5] = 0;
240 @ <tr>
241 @ <td class="timelineTimeStampCell">%s(zTime)</td>
242 @ <td width="20" align="left" valign="top">
243 if( pGraph && zType[0]=='c' ){
244 int nParent = 0;
245 int aParent[32];
246 const char *zBr;
@@ -268,13 +268,13 @@
268 gidx = graph_add_row(pGraph, rid, nParent, aParent, zBr, zBgClr);
269 db_reset(&qbranch);
270 @ <div id="m%d(gidx)"></div>
271 }
272 if( zBgClr && zBgClr[0] ){
273 @ <td class="timelineComment" bgcolor="%h(zBgClr)">
274 }else{
275 @ <td class="timelineComment">
276 }
277 if( zType[0]=='c' ){
278 hyperlink_to_uuid(zUuid);
279 if( isLeaf ){
280 if( db_exists("SELECT 1 FROM tagxref"
@@ -310,12 +310,13 @@
310 }
311 @ </td></tr>
312 }
313 if( suppressCnt ){
314 @ <tr><td><td><td>
315 @ <tr><td><td><td class="timelineOmitted">
316 @ ... %d(suppressCnt) similar event%s(suppressCnt>1?"s":"") omitted.
317 @ </tr>
318 suppressCnt = 0;
319 }
320 if( pGraph ){
321 graph_finish(pGraph, (tmFlags & TIMELINE_DISJOINT)!=0);
322 if( pGraph->nErr ){
323

Keyboard Shortcuts

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