Fossil

Check-in [8dfed953]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:format timeline page via css
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | stv-skinning
Files: files | file ages | folders
SHA1:8dfed953f75304420782640246fe82bfd07947af
User & Date: Ratte 2010-09-04 19:20:23
Context
2010-09-04
19:41
format timeline page via css check-in: 2ade2d4e user: Ratte tags: stv-skinning
19:20
format timeline page via css check-in: 8dfed953 user: Ratte tags: stv-skinning
15:19
Create new branch named "stv-skinning" check-in: ba1c75ad user: Ratte tags: stv-skinning
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/setup.c.

907
908
909
910
911
912
913



914
915
916
917
918
919
920
  @ <hr>
  @ The default CSS is shown below for reference.  Other examples
  @ of CSS files can be seen on the <a href="setup_skin">skins page</a>.
  @ See also the <a href="setup_header">header</a> and
  @ <a href="setup_footer">footer</a> editing screens.
  @ <blockquote><pre>
  @ %h(zDefaultCSS)



  @ </pre></blockquote>
  style_footer();
  db_end_transaction(0);
}

/*
** WEBPAGE: setup_header







>
>
>







907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
  @ <hr>
  @ The default CSS is shown below for reference.  Other examples
  @ of CSS files can be seen on the <a href="setup_skin">skins page</a>.
  @ See also the <a href="setup_header">header</a> and
  @ <a href="setup_footer">footer</a> editing screens.
  @ <blockquote><pre>
  @ %h(zDefaultCSS)
  @ %h(zTdTimelineTimeStampCell)
  @ %h(zTdTimelineOmitted)
  @ %h(zTdTimelineComment)
  @ </pre></blockquote>
  style_footer();
  db_end_transaction(0);
}

/*
** WEBPAGE: setup_header

Changes to src/style.c.

99
100
101
102
103
104
105

106
107
108
109
110
111
112
...
377
378
379
380
381
382
383






384















385
386
387
388
389
390
391
392
393








394
395
396
397
398
399
400
  Th_Store("manifest_version", MANIFEST_VERSION);
  Th_Store("manifest_date", MANIFEST_DATE);
  if( g.zLogin ){
    Th_Store("login", g.zLogin);
  }
  if( g.thTrace ) Th_Trace("BEGIN_HEADER_SCRIPT<br />\n", -1);
  Th_Render(zHeader);

  if( g.thTrace ) Th_Trace("END_HEADER<br />\n", -1);
  Th_Unstore("title");   /* Avoid collisions with ticket field names */
  cgi_destination(CGI_BODY);
  g.cgiOutput = 1;
  headerHasBeenGenerated = 1;
}

................................................................................
@ /* The label/value pairs on (for example) the ci page */
@ table.label-value th {
@   vertical-align: top;
@   text-align: right;
@   padding: 0.2ex 2ex;
@ }
;






















/*
** WEBPAGE: style.css
*/
void page_style_css(void){
  char *zCSS = 0;

  cgi_set_content_type("text/css");
  zCSS = db_get("css",(char*)zDefaultCSS);
  cgi_append_content(zCSS, -1);








  g.isConst = 1;
}

/*
** WEBPAGE: test_env
*/
void page_test_env(void){







>







 







>
>
>
>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>









>
>
>
>
>
>
>
>







99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
...
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
  Th_Store("manifest_version", MANIFEST_VERSION);
  Th_Store("manifest_date", MANIFEST_DATE);
  if( g.zLogin ){
    Th_Store("login", g.zLogin);
  }
  if( g.thTrace ) Th_Trace("BEGIN_HEADER_SCRIPT<br />\n", -1);
  Th_Render(zHeader);
  cgi_printf("%s","<link rel=\"stylesheet\" href=\"stdstyle.css\" type=\"text/css\">");
  if( g.thTrace ) Th_Trace("END_HEADER<br />\n", -1);
  Th_Unstore("title");   /* Avoid collisions with ticket field names */
  cgi_destination(CGI_BODY);
  g.cgiOutput = 1;
  headerHasBeenGenerated = 1;
}

................................................................................
@ /* The label/value pairs on (for example) the ci page */
@ table.label-value th {
@   vertical-align: top;
@   text-align: right;
@   padding: 0.2ex 2ex;
@ }
;
const char zTdTimelineTimeStampCell[] = 
@ /* The time column in timeline tables */
@ td.timelineTimeStampCell {
@   valign: top;
@   text-align: right;
@}
;
const char zTdTimelineOmitted[] =
@ /* The omitted line in timeline tables */
@ td.timelineOmitted {
@   font-size: small;
@   font-style: italic;
@ }
;
const char zTdTimelineComment[] =
@ /* The comment cell in timeline tables */
@ td.timelineComment {
@   valign: top;
@   text-align: left;
@ }
;
 
/*
** WEBPAGE: style.css
*/
void page_style_css(void){
  char *zCSS = 0;

  cgi_set_content_type("text/css");
  zCSS = db_get("css",(char*)zDefaultCSS);
  cgi_append_content(zCSS, -1);
  cgi_append_content("\n", -1);
  /* append internal classes, if not already in style sheet */
  if (!strstr(zCSS,"timelineTimeStampCell"))
    cgi_append_content(zTdTimelineTimeStampCell,-1);
  if (!strstr(zCSS,"timelineOmitted"))
    cgi_append_content(zTdTimelineOmitted,-1);
  if (!strstr(zCSS,"timelineComment"))
    cgi_append_content(zTdTimelineComment,-1);
  g.isConst = 1;
}

/*
** WEBPAGE: test_env
*/
void page_test_env(void){

Changes to src/timeline.c.

216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
...
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
...
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
...
308
309
310
311
312
313
314
315
316

317
318
319
320
321
322
323
        }else{
          commentColumn = 10;
        }
      }
    }
    prevTagid = tagid;
    if( suppressCnt ){
      @ <tr><td><td><td>
      @ <small><i>... %d(suppressCnt) similar
      @ event%s(suppressCnt>1?"s":"") omitted.</i></small></tr>
      suppressCnt = 0;
    }
    if( strcmp(zType,"div")==0 ){
      @ <tr><td colspan=3><hr></td></tr>
      continue;
    }
    if( memcmp(zDate, zPrevDate, 10) ){
................................................................................
      @ <tr><td>
      @   <div class="divider"><nobr>%s(zPrevDate)</nobr></div>
      @ </td></tr>
    }
    memcpy(zTime, &zDate[11], 5);
    zTime[5] = 0;
    @ <tr>
    @ <td valign="top" align="right">%s(zTime)</td>
    @ <td width="20" align="left" valign="top">
    if( pGraph && zType[0]=='c' ){
      int nParent = 0;
      int aParent[32];
      const char *zBr;
      int gidx;
      static Stmt qparent;
................................................................................
        zBr = "trunk";
      }
      gidx = graph_add_row(pGraph, rid, nParent, aParent, zBr, zBgClr);
      db_reset(&qbranch);
      @ <div id="m%d(gidx)"></div>
    }
    if( zBgClr && zBgClr[0] ){
      @ <td valign="top" align="left" bgcolor="%h(zBgClr)">
    }else{
      @ <td valign="top" align="left">
    }
    if( zType[0]=='c' ){
      hyperlink_to_uuid(zUuid);
      if( isLeaf ){
        if( db_exists("SELECT 1 FROM tagxref"
                      " WHERE rid=%d AND tagid=%d AND tagtype>0",
                      rid, TAG_CLOSED) ){
................................................................................
    if( xExtra ){
      xExtra(rid);
    }
    @ </td></tr>
  }
  if( suppressCnt ){
    @ <tr><td><td><td>
    @ <small><i>... %d(suppressCnt) similar
    @ event%s(suppressCnt>1?"s":"") omitted.</i></small></tr>

    suppressCnt = 0;
  }
  if( pGraph ){
    graph_finish(pGraph, (tmFlags & TIMELINE_DISJOINT)!=0);
    if( pGraph->nErr ){
      graph_free(pGraph);
      pGraph = 0;







|
|
|







 







|







 







|

|







 







|
|
>







216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
...
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
...
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
...
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
        }else{
          commentColumn = 10;
        }
      }
    }
    prevTagid = tagid;
    if( suppressCnt ){
      @ <tr><td><td><td class="timelineOmitted">
      @ ... %d(suppressCnt) similar event%s(suppressCnt>1?"s":"") omitted.
      @ </tr>
      suppressCnt = 0;
    }
    if( strcmp(zType,"div")==0 ){
      @ <tr><td colspan=3><hr></td></tr>
      continue;
    }
    if( memcmp(zDate, zPrevDate, 10) ){
................................................................................
      @ <tr><td>
      @   <div class="divider"><nobr>%s(zPrevDate)</nobr></div>
      @ </td></tr>
    }
    memcpy(zTime, &zDate[11], 5);
    zTime[5] = 0;
    @ <tr>
    @ <td class="timelineTimeStampCell">%s(zTime)</td>
    @ <td width="20" align="left" valign="top">
    if( pGraph && zType[0]=='c' ){
      int nParent = 0;
      int aParent[32];
      const char *zBr;
      int gidx;
      static Stmt qparent;
................................................................................
        zBr = "trunk";
      }
      gidx = graph_add_row(pGraph, rid, nParent, aParent, zBr, zBgClr);
      db_reset(&qbranch);
      @ <div id="m%d(gidx)"></div>
    }
    if( zBgClr && zBgClr[0] ){
      @ <td class="timelineComment" bgcolor="%h(zBgClr)">
    }else{
      @ <td class="timelineComment">
    }
    if( zType[0]=='c' ){
      hyperlink_to_uuid(zUuid);
      if( isLeaf ){
        if( db_exists("SELECT 1 FROM tagxref"
                      " WHERE rid=%d AND tagid=%d AND tagtype>0",
                      rid, TAG_CLOSED) ){
................................................................................
    if( xExtra ){
      xExtra(rid);
    }
    @ </td></tr>
  }
  if( suppressCnt ){
    @ <tr><td><td><td>
    @ <tr><td><td><td class="timelineOmitted">
    @ ... %d(suppressCnt) similar event%s(suppressCnt>1?"s":"") omitted.
    @ </tr>
    suppressCnt = 0;
  }
  if( pGraph ){
    graph_finish(pGraph, (tmFlags & TIMELINE_DISJOINT)!=0);
    if( pGraph->nErr ){
      graph_free(pGraph);
      pGraph = 0;