Fossil SCM

timeline css skinned

wolfgang 2010-09-09 20:12 wolfgangFormat2CSS
Commit dc8a247e749f180b5aeb1b26410f20b7efa063e0
3 files changed +48 -1 +15 -9 +1 -1
+48 -1
--- src/style.c
+++ src/style.c
@@ -424,19 +424,61 @@
424424
@ span.timelineDisabled {
425425
@ font-style: italic;
426426
@ font-size: small;
427427
@ }
428428
@
429
+;
430
+const char zTableTimelineTable[] =
431
+@ /* the format for the timeline data table */
432
+@ table.timelineTable {
433
+@ cellspacing: 0;
434
+@ border: 0;
435
+@ cellpadding: 0
436
+@ }
437
+@
438
+;
439
+const char zTdTimelineTableCell[] =
440
+@ /* the format for the timeline data cells */
441
+@ td.timelineTableCell {
442
+@ valign: top;
443
+@ align: left;
444
+@ }
445
+@
446
+;
447
+const char zSpanTimelineLeaf[] =
448
+@ /* the format for the timeline leaf marks */
449
+@ span.timelineLeaf {
450
+@ font-weight: bold;
451
+@ }
452
+@
453
+;
454
+const char zATimelineHistLink[] =
455
+@ /* the format for the timeline version links */
456
+@ a.timelineHistLink {
457
+@ }
458
+@
459
+;
460
+const char zSpanTimelineHistDsp[] =
461
+@ /* the format for the timeline version display(no history permission!) */
462
+@ span.timelineHistDsp {
463
+@ font-weight: bold;
464
+@ }
465
+@
429466
;
430467
typedef enum cssDefaultItems {
431468
cssOthers = 0,
432469
tableLabelValue,
433470
divSidebox,
434471
divSideboxTitle,
435472
divSideboxDescribed,
436473
spanDisabled,
437474
spanTimelineSuppressed,
475
+ tableTimelineTable,
476
+ tdTimelineTableCell,
477
+ spanTimelineLeaf,
478
+ aTimelineHistLink,
479
+ spanTimelineHistDsp,
438480
cssDefaultCount
439481
};
440482
const struct strctCssDefaults {
441483
char const * const name;
442484
char const * const value;
@@ -445,11 +487,16 @@
445487
{ "table.label-value", zTableLabelValueCSS },
446488
{ "div.sidebox", zDivSidebox },
447489
{ "div.sideboxTitle", zDivSideboxTitle },
448490
{ "div.sideboxDescribed", zDivSideboxDescribed },
449491
{ "span.disabled", zSpanDisabled },
450
- { "span.timelineDisabled", zSpanTimelineSuppressed }
492
+ { "span.timelineDisabled", zSpanTimelineSuppressed },
493
+ { "table.timelineTable", zTableTimelineTable },
494
+ { "td.timelineTableCell", zTdTimelineTableCell },
495
+ { "span.timelineLeaf", zSpanTimelineLeaf },
496
+ { "a.timelineHistLink", zATimelineHistLink },
497
+ { "span.timelineHistDsp", zSpanTimelineHistDsp }
451498
};
452499
453500
void cgi_append_default_css(void) {
454501
enum cssDefaultItems i;
455502
456503
--- src/style.c
+++ src/style.c
@@ -424,19 +424,61 @@
424 @ span.timelineDisabled {
425 @ font-style: italic;
426 @ font-size: small;
427 @ }
428 @
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
429 ;
430 typedef enum cssDefaultItems {
431 cssOthers = 0,
432 tableLabelValue,
433 divSidebox,
434 divSideboxTitle,
435 divSideboxDescribed,
436 spanDisabled,
437 spanTimelineSuppressed,
 
 
 
 
 
438 cssDefaultCount
439 };
440 const struct strctCssDefaults {
441 char const * const name;
442 char const * const value;
@@ -445,11 +487,16 @@
445 { "table.label-value", zTableLabelValueCSS },
446 { "div.sidebox", zDivSidebox },
447 { "div.sideboxTitle", zDivSideboxTitle },
448 { "div.sideboxDescribed", zDivSideboxDescribed },
449 { "span.disabled", zSpanDisabled },
450 { "span.timelineDisabled", zSpanTimelineSuppressed }
 
 
 
 
 
451 };
452
453 void cgi_append_default_css(void) {
454 enum cssDefaultItems i;
455
456
--- src/style.c
+++ src/style.c
@@ -424,19 +424,61 @@
424 @ span.timelineDisabled {
425 @ font-style: italic;
426 @ font-size: small;
427 @ }
428 @
429 ;
430 const char zTableTimelineTable[] =
431 @ /* the format for the timeline data table */
432 @ table.timelineTable {
433 @ cellspacing: 0;
434 @ border: 0;
435 @ cellpadding: 0
436 @ }
437 @
438 ;
439 const char zTdTimelineTableCell[] =
440 @ /* the format for the timeline data cells */
441 @ td.timelineTableCell {
442 @ valign: top;
443 @ align: left;
444 @ }
445 @
446 ;
447 const char zSpanTimelineLeaf[] =
448 @ /* the format for the timeline leaf marks */
449 @ span.timelineLeaf {
450 @ font-weight: bold;
451 @ }
452 @
453 ;
454 const char zATimelineHistLink[] =
455 @ /* the format for the timeline version links */
456 @ a.timelineHistLink {
457 @ }
458 @
459 ;
460 const char zSpanTimelineHistDsp[] =
461 @ /* the format for the timeline version display(no history permission!) */
462 @ span.timelineHistDsp {
463 @ font-weight: bold;
464 @ }
465 @
466 ;
467 typedef enum cssDefaultItems {
468 cssOthers = 0,
469 tableLabelValue,
470 divSidebox,
471 divSideboxTitle,
472 divSideboxDescribed,
473 spanDisabled,
474 spanTimelineSuppressed,
475 tableTimelineTable,
476 tdTimelineTableCell,
477 spanTimelineLeaf,
478 aTimelineHistLink,
479 spanTimelineHistDsp,
480 cssDefaultCount
481 };
482 const struct strctCssDefaults {
483 char const * const name;
484 char const * const value;
@@ -445,11 +487,16 @@
487 { "table.label-value", zTableLabelValueCSS },
488 { "div.sidebox", zDivSidebox },
489 { "div.sideboxTitle", zDivSideboxTitle },
490 { "div.sideboxDescribed", zDivSideboxDescribed },
491 { "span.disabled", zSpanDisabled },
492 { "span.timelineDisabled", zSpanTimelineSuppressed },
493 { "table.timelineTable", zTableTimelineTable },
494 { "td.timelineTableCell", zTdTimelineTableCell },
495 { "span.timelineLeaf", zSpanTimelineLeaf },
496 { "a.timelineHistLink", zATimelineHistLink },
497 { "span.timelineHistDsp", zSpanTimelineHistDsp }
498 };
499
500 void cgi_append_default_css(void) {
501 enum cssDefaultItems i;
502
503
+15 -9
--- src/timeline.c
+++ src/timeline.c
@@ -48,13 +48,13 @@
4848
*/
4949
void hyperlink_to_uuid(const char *zUuid){
5050
char zShortUuid[UUID_SIZE+1];
5151
shorten_uuid(zShortUuid, zUuid);
5252
if( g.okHistory ){
53
- @ <a href="%s(g.zBaseURL)/info/%s(zShortUuid)">[%s(zShortUuid)]</a>
53
+ @ <a class="timelineHistLink" href="%s(g.zBaseURL)/info/%s(zShortUuid)">[%s(zShortUuid)]</a>
5454
}else{
55
- @ <b>[%s(zShortUuid)]</b>
55
+ @ <span class="timelineHistDsp">[%s(zShortUuid)]</span>
5656
}
5757
}
5858
5959
/*
6060
** Generate a hyperlink that invokes javascript to highlight
@@ -189,14 +189,17 @@
189189
}else{
190190
wikiFlags = WIKI_INLINE | WIKI_NOBLOCK;
191191
}
192192
if( tmFlags & TIMELINE_GRAPH ){
193193
pGraph = graph_init();
194
+ /* style is not moved to css, because this is
195
+ ** a technical div for the timeline graph
196
+ */
194197
@ <div id="canvas" style="position:relative;width:1px;height:1px;"></div>
195198
}
196199
197
- @ <table cellspacing=0 border=0 cellpadding=0>
200
+ @ <table class="timelineTable">
198201
blob_zero(&comment);
199202
while( db_step(pQuery)==SQLITE_ROW ){
200203
int rid = db_column_int(pQuery, 0);
201204
const char *zUuid = db_column_text(pQuery, 1);
202205
int isLeaf = db_column_int(pQuery, 5);
@@ -268,23 +271,23 @@
268271
gidx = graph_add_row(pGraph, rid, nParent, aParent, zBr, zBgClr);
269272
db_reset(&qbranch);
270273
@ <div id="m%d(gidx)"></div>
271274
}
272275
if( zBgClr && zBgClr[0] ){
273
- @ <td valign="top" align="left" bgcolor="%h(zBgClr)">
276
+ @ <td class="timelineTableCell" bgcolor="%h(zBgClr)">
274277
}else{
275
- @ <td valign="top" align="left">
278
+ @ <td class="timelineTableCell">
276279
}
277280
if( zType[0]=='c' ){
278281
hyperlink_to_uuid(zUuid);
279282
if( isLeaf ){
280283
if( db_exists("SELECT 1 FROM tagxref"
281284
" WHERE rid=%d AND tagid=%d AND tagtype>0",
282285
rid, TAG_CLOSED) ){
283
- @ <b>Closed-Leaf:</b>
286
+ @ <span class="timelineLeaf">Closed-Leaf:</span>
284287
}else{
285
- @ <b>Leaf:</b>
288
+ @ <span class="timelineLeaf">Leaf:</span>
286289
}
287290
}
288291
}else if( (tmFlags & TIMELINE_ARTID)!=0 ){
289292
hyperlink_to_uuid(zUuid);
290293
}
@@ -310,20 +313,23 @@
310313
}
311314
@ </td></tr>
312315
}
313316
if( suppressCnt ){
314317
@ <tr><td><td><td>
315
- @ <small><i>... %d(suppressCnt) similar
316
- @ event%s(suppressCnt>1?"s":"") omitted.</i></small></tr>
318
+ @ <span class="timelineDisabled">... %d(suppressCnt) similar
319
+ @ event%s(suppressCnt>1?"s":"") omitted.</span></tr>
317320
suppressCnt = 0;
318321
}
319322
if( pGraph ){
320323
graph_finish(pGraph, (tmFlags & TIMELINE_DISJOINT)!=0);
321324
if( pGraph->nErr ){
322325
graph_free(pGraph);
323326
pGraph = 0;
324327
}else{
328
+ /* style is not moved to css, because this is
329
+ ** a technical div for the timeline graph
330
+ */
325331
@ <tr><td><td>
326332
@ <div id="grbtm" style="width:%d(pGraph->mxRail*20+30)px;"></div>
327333
}
328334
}
329335
@ </table>
330336
--- src/timeline.c
+++ src/timeline.c
@@ -48,13 +48,13 @@
48 */
49 void hyperlink_to_uuid(const char *zUuid){
50 char zShortUuid[UUID_SIZE+1];
51 shorten_uuid(zShortUuid, zUuid);
52 if( g.okHistory ){
53 @ <a href="%s(g.zBaseURL)/info/%s(zShortUuid)">[%s(zShortUuid)]</a>
54 }else{
55 @ <b>[%s(zShortUuid)]</b>
56 }
57 }
58
59 /*
60 ** Generate a hyperlink that invokes javascript to highlight
@@ -189,14 +189,17 @@
189 }else{
190 wikiFlags = WIKI_INLINE | WIKI_NOBLOCK;
191 }
192 if( tmFlags & TIMELINE_GRAPH ){
193 pGraph = graph_init();
 
 
 
194 @ <div id="canvas" style="position:relative;width:1px;height:1px;"></div>
195 }
196
197 @ <table cellspacing=0 border=0 cellpadding=0>
198 blob_zero(&comment);
199 while( db_step(pQuery)==SQLITE_ROW ){
200 int rid = db_column_int(pQuery, 0);
201 const char *zUuid = db_column_text(pQuery, 1);
202 int isLeaf = db_column_int(pQuery, 5);
@@ -268,23 +271,23 @@
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"
281 " WHERE rid=%d AND tagid=%d AND tagtype>0",
282 rid, TAG_CLOSED) ){
283 @ <b>Closed-Leaf:</b>
284 }else{
285 @ <b>Leaf:</b>
286 }
287 }
288 }else if( (tmFlags & TIMELINE_ARTID)!=0 ){
289 hyperlink_to_uuid(zUuid);
290 }
@@ -310,20 +313,23 @@
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 graph_free(pGraph);
323 pGraph = 0;
324 }else{
 
 
 
325 @ <tr><td><td>
326 @ <div id="grbtm" style="width:%d(pGraph->mxRail*20+30)px;"></div>
327 }
328 }
329 @ </table>
330
--- src/timeline.c
+++ src/timeline.c
@@ -48,13 +48,13 @@
48 */
49 void hyperlink_to_uuid(const char *zUuid){
50 char zShortUuid[UUID_SIZE+1];
51 shorten_uuid(zShortUuid, zUuid);
52 if( g.okHistory ){
53 @ <a class="timelineHistLink" href="%s(g.zBaseURL)/info/%s(zShortUuid)">[%s(zShortUuid)]</a>
54 }else{
55 @ <span class="timelineHistDsp">[%s(zShortUuid)]</span>
56 }
57 }
58
59 /*
60 ** Generate a hyperlink that invokes javascript to highlight
@@ -189,14 +189,17 @@
189 }else{
190 wikiFlags = WIKI_INLINE | WIKI_NOBLOCK;
191 }
192 if( tmFlags & TIMELINE_GRAPH ){
193 pGraph = graph_init();
194 /* style is not moved to css, because this is
195 ** a technical div for the timeline graph
196 */
197 @ <div id="canvas" style="position:relative;width:1px;height:1px;"></div>
198 }
199
200 @ <table class="timelineTable">
201 blob_zero(&comment);
202 while( db_step(pQuery)==SQLITE_ROW ){
203 int rid = db_column_int(pQuery, 0);
204 const char *zUuid = db_column_text(pQuery, 1);
205 int isLeaf = db_column_int(pQuery, 5);
@@ -268,23 +271,23 @@
271 gidx = graph_add_row(pGraph, rid, nParent, aParent, zBr, zBgClr);
272 db_reset(&qbranch);
273 @ <div id="m%d(gidx)"></div>
274 }
275 if( zBgClr && zBgClr[0] ){
276 @ <td class="timelineTableCell" bgcolor="%h(zBgClr)">
277 }else{
278 @ <td class="timelineTableCell">
279 }
280 if( zType[0]=='c' ){
281 hyperlink_to_uuid(zUuid);
282 if( isLeaf ){
283 if( db_exists("SELECT 1 FROM tagxref"
284 " WHERE rid=%d AND tagid=%d AND tagtype>0",
285 rid, TAG_CLOSED) ){
286 @ <span class="timelineLeaf">Closed-Leaf:</span>
287 }else{
288 @ <span class="timelineLeaf">Leaf:</span>
289 }
290 }
291 }else if( (tmFlags & TIMELINE_ARTID)!=0 ){
292 hyperlink_to_uuid(zUuid);
293 }
@@ -310,20 +313,23 @@
313 }
314 @ </td></tr>
315 }
316 if( suppressCnt ){
317 @ <tr><td><td><td>
318 @ <span class="timelineDisabled">... %d(suppressCnt) similar
319 @ event%s(suppressCnt>1?"s":"") omitted.</span></tr>
320 suppressCnt = 0;
321 }
322 if( pGraph ){
323 graph_finish(pGraph, (tmFlags & TIMELINE_DISJOINT)!=0);
324 if( pGraph->nErr ){
325 graph_free(pGraph);
326 pGraph = 0;
327 }else{
328 /* style is not moved to css, because this is
329 ** a technical div for the timeline graph
330 */
331 @ <tr><td><td>
332 @ <div id="grbtm" style="width:%d(pGraph->mxRail*20+30)px;"></div>
333 }
334 }
335 @ </table>
336
+1 -1
--- src/update.c
+++ src/update.c
@@ -24,11 +24,11 @@
2424
2525
/*
2626
** Return true if artifact rid is a version
2727
*/
2828
int is_a_version(int rid){
29
- return db_exists("SELECT 1 FROM event WHERE objid=%d AND type='ci'", rid);
29
+ return db_exists("SELECT 1 FROM event WHERE objid=%d AND type='ci'", rid);
3030
}
3131
3232
/*
3333
** COMMAND: update
3434
**
3535
--- src/update.c
+++ src/update.c
@@ -24,11 +24,11 @@
24
25 /*
26 ** Return true if artifact rid is a version
27 */
28 int is_a_version(int rid){
29 return db_exists("SELECT 1 FROM event WHERE objid=%d AND type='ci'", rid);
30 }
31
32 /*
33 ** COMMAND: update
34 **
35
--- src/update.c
+++ src/update.c
@@ -24,11 +24,11 @@
24
25 /*
26 ** Return true if artifact rid is a version
27 */
28 int is_a_version(int rid){
29 return db_exists("SELECT 1 FROM event WHERE objid=%d AND type='ci'", rid);
30 }
31
32 /*
33 ** COMMAND: update
34 **
35

Keyboard Shortcuts

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