Fossil

Check-in [b799891b]
Login

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

Overview
Comment:Remove the last bits of in-line javascript from the timelines.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:b799891b82d6876da0a5287105e3cfa6c61ad05d833538cc3064bc6ad4c42576
User & Date: drh 2017-12-06 13:48:28
Context
2017-12-06
15:37
Use an HTML5 color chooser dialog in the check-in comment editor. check-in: f8bc3ce8 user: drh tags: trunk
13:48
Remove the last bits of in-line javascript from the timelines. check-in: b799891b user: drh tags: trunk
11:14
Move all inline javascript associated with the login screen into a separate script file. check-in: c6785fab user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/finfo.c.

514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
    if( zBgClr && zBgClr[0] ){
      @ <td class="timeline%s(zStyle)Cell" \
      @  style="background-color: %h(zBgClr);">
    }else{
      @ <td class="timeline%s(zStyle)Cell">
    }
    if( tmFlags & TIMELINE_COMPACT ){
      @ <span class='timelineCompactComment' onclick='toggleDetail(%d(frid))'>
    }else{
      @ <span class='timeline%s(zStyle)Comment'>
      if( (tmFlags & TIMELINE_VERBOSE)!=0 && zUuid ){
        hyperlink_to_uuid(zUuid);
        @ part of check-in \
        hyperlink_to_uuid(zCkin);
      }
    }
    @ %W(zCom)</span>
    if( (tmFlags & TIMELINE_COMPACT)!=0 ){
      @ <span class='timelineEllipsis anticlutter' id='ellipsis-%d(frid)' \
      @  onclick='toggleDetail(%d(frid))'>...</span>
      @ <span class='clutter timelineCompactDetail'
    }
    if( tmFlags & TIMELINE_COLUMNAR ){
      if( zBgClr && zBgClr[0] ){
        @ <td class="timelineDetailCell" style="background-color: %h(zBgClr);">
      }else{
        @ <td class="timelineDetailCell">







|










|
|







514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
    if( zBgClr && zBgClr[0] ){
      @ <td class="timeline%s(zStyle)Cell" \
      @  style="background-color: %h(zBgClr);">
    }else{
      @ <td class="timeline%s(zStyle)Cell">
    }
    if( tmFlags & TIMELINE_COMPACT ){
      @ <span class='timelineCompactComment' data-id='%d(frid)'>
    }else{
      @ <span class='timeline%s(zStyle)Comment'>
      if( (tmFlags & TIMELINE_VERBOSE)!=0 && zUuid ){
        hyperlink_to_uuid(zUuid);
        @ part of check-in \
        hyperlink_to_uuid(zCkin);
      }
    }
    @ %W(zCom)</span>
    if( (tmFlags & TIMELINE_COMPACT)!=0 ){
      @ <span class='timelineEllipsis' data-id='%d(frid)' \
      @ id='ellipsis-%d(frid)'>...</span>
      @ <span class='clutter timelineCompactDetail'
    }
    if( tmFlags & TIMELINE_COLUMNAR ){
      if( zBgClr && zBgClr[0] ){
        @ <td class="timelineDetailCell" style="background-color: %h(zBgClr);">
      }else{
        @ <td class="timelineDetailCell">

Changes to src/graph.js.

300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321

322
323
324
325
326
327
328
...
348
349
350
351
352
353
354














  }
}
function changeDisplay(selector,value){
  var x = document.getElementsByClassName(selector);
  var n = x.length;
  for(var i=0; i<n; i++) {x[i].style.display = value;}
}
function declutter(){
  changeDisplay('clutter','none');
  changeDisplay('anticlutter','inline');
  checkHeight();
}
function reclutter(){
  changeDisplay('clutter','inline');
  changeDisplay('anticlutter','none');
  checkHeight();
}
function changeDisplayById(id,value){
  var x = document.getElementById(id);
  if(x) x.style.display=value;
}
function toggleDetail(id){

  var x = gebi("detail-"+id);
  if( x.style.display=="inline" ){
    x.style.display="none";
    changeDisplayById("ellipsis-"+id,"inline");
    changeDisplayById("links-"+id,"none");
  }else{
    x.style.display="inline";
................................................................................
    lastY = h;
  }
  setTimeout(checkHeight, 1000);
}
initGraph();
checkHeight();
scrollToSelected();





















<
<
<
<
<
<
<
<
<
<




|
>







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
300
301
302
303
304
305
306










307
308
309
310
311
312
313
314
315
316
317
318
319
...
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
  }
}
function changeDisplay(selector,value){
  var x = document.getElementsByClassName(selector);
  var n = x.length;
  for(var i=0; i<n; i++) {x[i].style.display = value;}
}










function changeDisplayById(id,value){
  var x = document.getElementById(id);
  if(x) x.style.display=value;
}
function toggleDetail(){
  var id = parseInt(this.getAttribute('data-id'))
  var x = gebi("detail-"+id);
  if( x.style.display=="inline" ){
    x.style.display="none";
    changeDisplayById("ellipsis-"+id,"inline");
    changeDisplayById("links-"+id,"none");
  }else{
    x.style.display="inline";
................................................................................
    lastY = h;
  }
  setTimeout(checkHeight, 1000);
}
initGraph();
checkHeight();
scrollToSelected();

/* Set the onclick= attributes for elements of the "Compact" display
** mode so that clicking turns the details on and off. */
(function(){
  var lx = document.getElementsByClassName('timelineEllipsis');
  var i;
  for(i=0; i<lx.length; i++){
    if( lx[i].hasAttribute('data-id') ) lx[i].onclick = toggleDetail;
  }
  var lx = document.getElementsByClassName('timelineCompactComment');
  for(i=0; i<lx.length; i++){
    if( lx[i].hasAttribute('data-id') ) lx[i].onclick = toggleDetail;
  }
}())

Changes to src/timeline.c.

455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
...
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
        @ (%d(db_column_int(&bisectQuery,0)))
      }
      db_reset(&bisectQuery);
    }
    drawDetailEllipsis = (tmFlags & TIMELINE_COMPACT)!=0;
    db_column_blob(pQuery, commentColumn, &comment);
    if( tmFlags & TIMELINE_COMPACT ){
      @ <span class='timelineCompactComment' onclick='toggleDetail(%d(rid))'>
    }else{
      @ <span class='timeline%s(zStyle)Comment'>
    }
    if( (tmFlags & TIMELINE_VERBOSE)!=0 ){
      if( zType[0]=='c' ){
        hyperlink_to_uuid(zUuid);
        if( isLeaf ){
................................................................................
    @ </span>
    blob_reset(&comment);

    /* Generate extra information and hyperlinks to follow the comment.
    ** Example:  "(check-in: [abcdefg], user: drh, tags: trunk)"
    */
    if( drawDetailEllipsis ){
      @ <span class='timelineEllipsis anticlutter' id='ellipsis-%d(rid)' \
      @  onclick='toggleDetail(%d(rid))'>...</span>
    }
    if( tmFlags & TIMELINE_COLUMNAR ){
      if( zBgClr && zBgClr[0] && rid!=selectedRid ){
        @ <td class="timelineDetailCell" style="background-color: %h(zBgClr);">
      }else{
        @ <td class="timelineDetailCell">
      }







|







 







|
<







455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
...
522
523
524
525
526
527
528
529

530
531
532
533
534
535
536
        @ (%d(db_column_int(&bisectQuery,0)))
      }
      db_reset(&bisectQuery);
    }
    drawDetailEllipsis = (tmFlags & TIMELINE_COMPACT)!=0;
    db_column_blob(pQuery, commentColumn, &comment);
    if( tmFlags & TIMELINE_COMPACT ){
      @ <span class='timelineCompactComment' data-id='%d(rid)'>
    }else{
      @ <span class='timeline%s(zStyle)Comment'>
    }
    if( (tmFlags & TIMELINE_VERBOSE)!=0 ){
      if( zType[0]=='c' ){
        hyperlink_to_uuid(zUuid);
        if( isLeaf ){
................................................................................
    @ </span>
    blob_reset(&comment);

    /* Generate extra information and hyperlinks to follow the comment.
    ** Example:  "(check-in: [abcdefg], user: drh, tags: trunk)"
    */
    if( drawDetailEllipsis ){
      @ <span class='timelineEllipsis' id='ellipsis-%d(rid)' data-id='%d(rid)'>...</span>

    }
    if( tmFlags & TIMELINE_COLUMNAR ){
      if( zBgClr && zBgClr[0] && rid!=selectedRid ){
        @ <td class="timelineDetailCell" style="background-color: %h(zBgClr);">
      }else{
        @ <td class="timelineDetailCell">
      }