Fossil

Check-in [d28f9e99]
Login

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

Overview
Comment:Restore background colors and clickable nodes for the Leaves web page.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | fix-timeline-view
Files: files | file ages | folders
SHA3-256: d28f9e99a06ac3264a462765d63cf09b928fdf5a8ec95ea6805bf919ac1b9c85
User & Date: florian 2018-12-24 06:40:00
References
2018-12-24
20:54
Revise and partially revert [d28f9e99a0] and [f174bfa157]: no need to remove the parents, TIMELINE_DISJOINT already does the magic. Related nodes now again have connecting rails for the /leaves, /brtimeline, and /tagtimeline web pages. check-in: 8f4b7e1f user: florian tags: fix-timeline-view
Context
2018-12-24
07:11
Show the option box to select the viewing mode for the Leaves web page. check-in: e03610b1 user: florian tags: fix-timeline-view
06:40
Restore background colors and clickable nodes for the Leaves web page. check-in: d28f9e99 user: florian tags: fix-timeline-view
06:32
Restore the Classic View mode for the File History web page. check-in: 33882ef8 user: florian tags: fix-timeline-view
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/descendants.c.

505
506
507
508
509
510
511
512

513
514
515
516
517
518
519
  if( showClosed ){
    blob_append_sql(&sql," AND %z", leaf_is_closed_sql("blob.rid"));
  }else if( !showAll ){
    blob_append_sql(&sql," AND NOT %z", leaf_is_closed_sql("blob.rid"));
  }
  db_prepare(&q, "%s ORDER BY event.mtime DESC", blob_sql_text(&sql));
  blob_reset(&sql);
  www_print_timeline(&q, TIMELINE_LEAFONLY, 0, 0, 0, 0);

  db_finalize(&q);
  @ <br />
  style_footer();
}

#if INTERFACE
/* Flag parameters to compute_uses_file() */







|
>







505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
  if( showClosed ){
    blob_append_sql(&sql," AND %z", leaf_is_closed_sql("blob.rid"));
  }else if( !showAll ){
    blob_append_sql(&sql," AND NOT %z", leaf_is_closed_sql("blob.rid"));
  }
  db_prepare(&q, "%s ORDER BY event.mtime DESC", blob_sql_text(&sql));
  blob_reset(&sql);
  www_print_timeline(
    &q, TIMELINE_LEAFONLY|TIMELINE_GRAPH|TIMELINE_NOSCROLL, 0, 0, 0, 0);
  db_finalize(&q);
  @ <br />
  style_footer();
}

#if INTERFACE
/* Flag parameters to compute_uses_file() */

Changes to src/timeline.c.

284
285
286
287
288
289
290





291
292
293
294
295
296
297
...
420
421
422
423
424
425
426

427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442





443
444
445
446
447
448
449
    zStyle = "Modern";
  }
  zDateFmt = P("datefmt");
  if( zDateFmt ) dateFormat = atoi(zDateFmt);
  if( tmFlags & TIMELINE_GRAPH ){
    pGraph = graph_init();
  }





  db_static_prepare(&qbranch,
    "SELECT value FROM tagxref WHERE tagid=%d AND tagtype>0 AND rid=:rid",
    TAG_BRANCH
  );

  @ <table id="timelineTable%d(iTableId)" class="timelineTable">
  blob_zero(&comment);
................................................................................
          zBgClr = 0;
        }else{
          zBgClr = hash_color(zBr);
        }
      }
    }
    if( zType[0]=='c' && pGraph ){

      int nParent = 0;
      int aParent[GR_MAX_RAIL];
      static Stmt qparent;
      db_static_prepare(&qparent,
        "SELECT pid FROM plink"
        " WHERE cid=:rid AND pid NOT IN phantom"
        " ORDER BY isprim DESC /*sort*/"
      );
      db_bind_int(&qparent, ":rid", rid);
      while( db_step(&qparent)==SQLITE_ROW && nParent<count(aParent) ){
        aParent[nParent++] = db_column_int(&qparent, 0);
      }
      db_reset(&qparent);
      gidx = graph_add_row(pGraph, rid, nParent, aParent, zBr, zBgClr,
                           zUuid, isLeaf);
      db_reset(&qbranch);





      @ <div id="m%d(gidx)" class="tl-nodemark"></div>
    }else if( zType[0]=='e' && pGraph && zBgClr && zBgClr[0] ){
      /* For technotes, make a graph node with nParent==(-1).  This will
      ** not actually draw anything on the graph, but it will set the
      ** background color of the timeline entry */
      gidx = graph_add_row(pGraph, rid, -1, 0, zBr, zBgClr, zUuid, 0);
      @ <div id="m%d(gidx)" class="tl-nodemark"></div>







>
>
>
>
>







 







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







284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
...
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
    zStyle = "Modern";
  }
  zDateFmt = P("datefmt");
  if( zDateFmt ) dateFormat = atoi(zDateFmt);
  if( tmFlags & TIMELINE_GRAPH ){
    pGraph = graph_init();
  }
  /* Always combine TIMELINE_LEAFONLY with TIMELINE_DISJOINT, or graph_finish()
  ** may fail because of too many descenders to (off-screen) parents. */
  if( tmFlags & TIMELINE_LEAFONLY ){
    tmFlags |= TIMELINE_DISJOINT;
  }
  db_static_prepare(&qbranch,
    "SELECT value FROM tagxref WHERE tagid=%d AND tagtype>0 AND rid=:rid",
    TAG_BRANCH
  );

  @ <table id="timelineTable%d(iTableId)" class="timelineTable">
  blob_zero(&comment);
................................................................................
          zBgClr = 0;
        }else{
          zBgClr = hash_color(zBr);
        }
      }
    }
    if( zType[0]=='c' && pGraph ){
      if( (tmFlags & TIMELINE_LEAFONLY)==0 ){
        int nParent = 0;
        int aParent[GR_MAX_RAIL];
        static Stmt qparent;
        db_static_prepare(&qparent,
          "SELECT pid FROM plink"
          " WHERE cid=:rid AND pid NOT IN phantom"
          " ORDER BY isprim DESC /*sort*/"
        );
        db_bind_int(&qparent, ":rid", rid);
        while( db_step(&qparent)==SQLITE_ROW && nParent<count(aParent) ){
          aParent[nParent++] = db_column_int(&qparent, 0);
        }
        db_reset(&qparent);
        gidx = graph_add_row(pGraph, rid, nParent, aParent, zBr, zBgClr,
                             zUuid, isLeaf);
        db_reset(&qbranch);
      }else{
        /* Omit parents if TIMELINE_LEAFONLY is set. */
        gidx = graph_add_row(pGraph, rid, 0, 0, zBr, zBgClr,
                             zUuid, isLeaf);
      }
      @ <div id="m%d(gidx)" class="tl-nodemark"></div>
    }else if( zType[0]=='e' && pGraph && zBgClr && zBgClr[0] ){
      /* For technotes, make a graph node with nParent==(-1).  This will
      ** not actually draw anything on the graph, but it will set the
      ** background color of the timeline entry */
      gidx = graph_add_row(pGraph, rid, -1, 0, zBr, zBgClr, zUuid, 0);
      @ <div id="m%d(gidx)" class="tl-nodemark"></div>