Fossil

Check-in [ec093ff275]
Login

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

Overview
Comment:Tweaks to the "divider" display in the www timeline.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: ec093ff2751c8c095aa0153c885c774b83690abf
User & Date: drh 2011-05-15 11:19:27.138
Context
2011-05-16
16:33
Move www2.fossil-scm.org from Atlanta to Newark. ... (check-in: b75bb1dc16 user: drh tags: trunk)
2011-05-15
11:19
Tweaks to the "divider" display in the www timeline. ... (check-in: ec093ff275 user: drh tags: trunk)
2011-05-13
15:25
This is the correct fix for the blog-timeline problem. ... (check-in: 9b26d1e9a2 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/timeline.c.
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
** "timeline" table to cause <hr> to be inserted before and after
** entries of that date.  If zDate==NULL then put dividers around
** the event identified by rid.
*/
static void timeline_add_dividers(const char *zDate, int rid){
  char *zToDel = 0;
  if( zDate==0 ){
    zToDel = db_text(0,"SELECT datetime(mtime,'localtime') FROM event"
                       " WHERE objid=%d", rid);
    zDate = zToDel;
    if( zDate==0 ) zDate = "1";
  }
  db_multi_exec(
    "INSERT INTO timeline(rid,sortby,etype)"
    "VALUES(-1,julianday(%Q,'utc')-5.0e-6,'div')",
    zDate
  );
  db_multi_exec(
    "INSERT INTO timeline(rid,sortby,etype)"
    "VALUES(-2,julianday(%Q,'utc')+5.0e-6,'div')",
     zDate
  );
  fossil_free(zToDel);
}


/*







|






|




|







724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
** "timeline" table to cause <hr> to be inserted before and after
** entries of that date.  If zDate==NULL then put dividers around
** the event identified by rid.
*/
static void timeline_add_dividers(const char *zDate, int rid){
  char *zToDel = 0;
  if( zDate==0 ){
    zToDel = db_text(0,"SELECT julianday(mtime,'localtime') FROM event"
                       " WHERE objid=%d", rid);
    zDate = zToDel;
    if( zDate==0 ) zDate = "1";
  }
  db_multi_exec(
    "INSERT INTO timeline(rid,sortby,etype)"
    "VALUES(-1,julianday(%Q,'utc')-1.0e-5,'div')",
    zDate
  );
  db_multi_exec(
    "INSERT INTO timeline(rid,sortby,etype)"
    "VALUES(-2,julianday(%Q,'utc')+1.0e-5,'div')",
     zDate
  );
  fossil_free(zToDel);
}


/*