Fossil: Check-in [c033389140]

Fossil SCM

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

Overview
Comment:Tune the SVG image data URI for IE: remove the (invalid) encoding tag, and URL-encode the smaller than and greater than signs.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | tooltip-copyhash
Files: files | file ages | folders
SHA3-256:c03338914090cfa93366c827840981d527cdb2265727b8627e8ad10928bb421f
User & Date: florian 2019-05-28 08:35:00
Wiki:tooltip-copyhash
Context
2019-05-28
12:32
Cherry-pick [ac199e7a8a]: Explicitly query the client mouse coordinates, to fix the positioning of tooltips for nodes in IE. Leaf check-in: 3b5e74c4ca user: florian tags: tooltip-copyhash
08:35
Tune the SVG image data URI for IE: remove the (invalid) encoding tag, and URL-encode the smaller than and greater than signs. check-in: c033389140 user: florian tags: tooltip-copyhash
08:11
Move the code to setup the "Copy Hash" icon to a separate function, and link the icon to the target element through a "data-copytarget" attribute, so that "Copy Hash" icons could be added in other places than just tooltips. check-in: 54f0ae7813 user: florian tags: tooltip-copyhash
Changes

Changes to src/graph.js.

   755    755   
   756    756   /* Create the image for the "Copy Hash" icon. */
   757    757   function createCopyHashImg(imgRecycled,idCopyTarget){
   758    758     var img = imgRecycled;
   759    759     if( img==null ){
   760    760       img = document.createElement("img");
   761    761       img.src =
   762         -"data:image/svg+xml;utf8,"+
   763         -"<svg xmlns='http:"+"/"+"/www.w3.org/2000/svg' viewBox='0 0 14 16'>"+
   764         -"<path style='fill: black; opacity:0' d='M 14 16 H 0 V 0 h 14 v 16 z'/> <path "+
   765         -"style='fill:rgb(240,240,240)' d='M 1 0 h 6.6 l 2 2 h 1 l 3.4 3.4 v 8.6 h -10 "+
   766         -"v -2 h -3 z'/><path style='fill:rgb(64,64,64)' d='M 2 1 h 5 l 3 3 v 7 h -8 "+
   767         -"z'/><path style='fill:rgb(248,248,248)' d='M 3 2 h 3.6 l 2.4 2.4 v 5.6 h -6 "+
   768         -"z'/><path style='fill:rgb(80,128,208)' d='M 4 5 h 4 v 1 h -4 z m 0 2 h 4 v 1 "+
   769         -"h -4 z'/><path style='fill:rgb(64,64,64)' d='M 5 3 h 5 l 3 3 v 7 h -8 "+
   770         -"z'/><path style='fill:rgb(248,248,248)' d='M 10 4.4 v 1.6 h 1.6 z m -4 -0.6 "+
   771         -"h 3 v 3 h -3 z m 0 3 h 6 v 5.4 h -6 z'/><path style= 'fill:rgb(80,128,208)' "+
   772         -"d='M 7 8 h 4 v 1 h -4 z m 0 2 h 4 v 1 h -4 z'/> "+
   773         -"</svg>";
          762  +"data:image/svg+xml,"+
          763  +"%3Csvg xmlns='http:"+"/"+"/www.w3.org/2000/svg' viewBox='0 0 14 16'%3E"+
          764  +"%3Cpath style='fill: black; opacity:0' d='M 14 16 H 0 V 0 h 14 v 16 z'/%3E"+
          765  +"%3Cpath style='fill:rgb(240,240,240)' d='M 1 0 h 6.6 l 2 2 h 1 l 3.4 3.4 v "+
          766  +"8.6 h -10 v -2 h -3 z'/%3E%3Cpath style='fill:rgb(64,64,64)' d='M 2 1 h 5 l "+
          767  +"3 3 v 7 h -8 z'/%3E%3Cpath style='fill:rgb(248,248,248)' d='M 3 2 h 3.6 l "+
          768  +"2.4 2.4 v 5.6 h -6 z'/%3E%3Cpath style='fill:rgb(80,128,208)' d='M 4 5 h 4 v "+
          769  +"1 h -4 z m 0 2 h 4 v 1 h -4 z'/%3E%3Cpath style='fill:rgb(64,64,64)' d='M 5 "+
          770  +"3 h 5 l 3 3 v 7 h -8 z'/%3E%3Cpath style='fill:rgb(248,248,248)' d='M 10 4.4 "+
          771  +"v 1.6 h 1.6 z m -4 -0.6 h 3 v 3 h -3 z m 0 3 h 6 v 5.4 h -6 z'/%3E%3Cpath "+
          772  +"style= 'fill:rgb(80,128,208)' d='M 7 8 h 4 v 1 h -4 z m 0 2 h 4 v 1 h -4 "+
          773  +"z'/%3E%3C/svg%3E";
   774    774       img.width = 14;
   775    775       img.height = 16;
   776    776     }
   777    777     img.style.verticalAlign = "middle";
   778    778     img.style.cursor = "pointer";
   779    779     img.setAttribute("data-copytarget",idCopyTarget);
   780    780     img.onclick = clickCopyHash;