Fossil

Check-in [1d23109d]
Login

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

Overview
Comment:Also add a copy button for the artifact hash on the /artifact page in hex-dump mode.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | copybtn.js-tweaks
Files: files | file ages | folders
SHA3-256: 1d23109d8c87bdf6ef6884e25673d7cfc6b0addaef09041358fa6984b8961ad1
User & Date: florian 2019-06-05 07:58:00
Context
2019-06-05
08:06
Enable closing tooltips by pressing ESC. check-in: fc639a0a user: florian tags: copybtn.js-tweaks
07:58
Also add a copy button for the artifact hash on the /artifact page in hex-dump mode. check-in: 1d23109d user: florian tags: copybtn.js-tweaks
07:47
Define the spacing between copy buttons and adjacent elements by CSS rules, so that (0) no additional white space (nbsp) needs to be inserted into the HTML document, (1) the spacing can be modified by CSS rules, and (2) the copy buttons can be hidden by CSS rules. check-in: 63ebcafb user: florian tags: copybtn.js-tweaks
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/info.c.

1917
1918
1919
1920
1921
1922
1923

1924



1925
1926

1927
1928

1929
1930
1931
1932
1933
1934
1935
      style_submenu_element("Unshun", "%s/shun?accept=%s&sub=1#delshun",
            g.zTop, zUuid);
    }else{
      style_submenu_element("Shun", "%s/shun?shun=%s#addshun", g.zTop, zUuid);
    }
  }
  style_header("Hex Artifact Content");

  zUuid = db_text("?","SELECT uuid FROM blob WHERE rid=%d", rid);



  if( g.perm.Setup ){
    @ <h2>Artifact %s(zUuid) (%d(rid)):</h2>

  }else{
    @ <h2>Artifact %s(zUuid):</h2>

  }
  blob_zero(&downloadName);
  if( P("verbose")!=0 ) objdescFlags |= OBJDESC_DETAIL;
  object_description(rid, objdescFlags, &downloadName);
  style_submenu_element("Download", "%s/raw/%T?name=%s",
        g.zTop, blob_str(&downloadName), zUuid);
  @ <hr />







>

>
>
>

<
>

<
>







1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929

1930
1931

1932
1933
1934
1935
1936
1937
1938
1939
      style_submenu_element("Unshun", "%s/shun?accept=%s&sub=1#delshun",
            g.zTop, zUuid);
    }else{
      style_submenu_element("Shun", "%s/shun?shun=%s#addshun", g.zTop, zUuid);
    }
  }
  style_header("Hex Artifact Content");
  style_copy_button();
  zUuid = db_text("?","SELECT uuid FROM blob WHERE rid=%d", rid);
  @ <h2>Artifact
  @ <span class="copy-button" id="copy-hash-ar"
  @   data-copytarget="hash-ar" data-copylength="%d(hash_digits(1))">
  if( g.perm.Setup ){

    @ </span><span id="hash-ar">%s(zUuid)</span> (%d(rid)):</h2>
  }else{

    @ </span><span id="hash-ar">%s(zUuid)</span>:</h2>
  }
  blob_zero(&downloadName);
  if( P("verbose")!=0 ) objdescFlags |= OBJDESC_DETAIL;
  object_description(rid, objdescFlags, &downloadName);
  style_submenu_element("Download", "%s/raw/%T?name=%s",
        g.zTop, blob_str(&downloadName), zUuid);
  @ <hr />