Fossil

Check-in [710229e7]
Login

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

Overview
Comment:Also use the now global hash_digits() function in src/info.c, and set the copy length limit to FOSSIL_HASH_DIGITS_URL for consistency with the copy buttons on the tooltips.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | copybtn.js-demonstration
Files: files | file ages | folders
SHA3-256: 710229e713b81fed2134695a144db4597ed56a1d6ee142bb95b55f73fadfb964
User & Date: florian 2019-06-01 07:07:00
Context
2019-06-01
07:12
Avoid line breaks between the copy button and the hash on the /info page. check-in: 8c7e2620 user: florian tags: copybtn.js-demonstration
07:07
Also use the now global hash_digits() function in src/info.c, and set the copy length limit to FOSSIL_HASH_DIGITS_URL for consistency with the copy buttons on the tooltips. check-in: 710229e7 user: florian tags: copybtn.js-demonstration
00:52
Use the longer hash prefix for the click-to-copy. check-in: 21965553 user: drh tags: copybtn.js-demonstration
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/info.c.

650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
...
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
  const char *zParent; /* UUID of the parent check-in (if any) */
  const char *zRe;     /* regex parameter */
  ReCompiled *pRe = 0; /* regex */
  const char *zW;      /* URL param for ignoring whitespace */
  const char *zPage = "vinfo";  /* Page that shows diffs */
  const char *zPageHide = "ci"; /* Page that hides diffs */

/* Preprocessor definitions copied from src\printf.c. */
#ifndef FOSSIL_HASH_DIGITS
# define FOSSIL_HASH_DIGITS 10
#endif
  int nDigitHuman = db_get_int("hash-digits", FOSSIL_HASH_DIGITS);

  login_check_credentials();
  if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
  zName = P("name");
  rid = name_to_rid_www("name");
  if( rid==0 ){
    style_header("Check-in Information Error");
    @ No such object: %h(g.argv[2])
................................................................................
    @   | %z(href("%R/fileage?name=%!S",zUuid))file ages</a>
    @   | %z(href("%R/tree?nofiles&type=tree&ci=%!S",zUuid))folders</a>
    @   </td>
    @ </tr>

    @ <tr><th>%s(hname_alg(nUuid)):</th><td>
    @ <span class="copy-button" id="copy-fullhash" data-copytarget="fullhash"
    @ data-copylength="%d(nDigitHuman)"></span>
    @ <span id="fullhash">%.32s(zUuid)<wbr>%s(zUuid+32)</span>
    if( g.perm.Setup ){
      @ (Record ID: %d(rid))
    }
    @ </td></tr>
    @ <tr><th>User&nbsp;&amp;&nbsp;Date:</th><td>
    hyperlink_to_user(zUser,zDate," on ");







<
<
<
<
<
<







 







|







650
651
652
653
654
655
656






657
658
659
660
661
662
663
...
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
  const char *zParent; /* UUID of the parent check-in (if any) */
  const char *zRe;     /* regex parameter */
  ReCompiled *pRe = 0; /* regex */
  const char *zW;      /* URL param for ignoring whitespace */
  const char *zPage = "vinfo";  /* Page that shows diffs */
  const char *zPageHide = "ci"; /* Page that hides diffs */







  login_check_credentials();
  if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
  zName = P("name");
  rid = name_to_rid_www("name");
  if( rid==0 ){
    style_header("Check-in Information Error");
    @ No such object: %h(g.argv[2])
................................................................................
    @   | %z(href("%R/fileage?name=%!S",zUuid))file ages</a>
    @   | %z(href("%R/tree?nofiles&type=tree&ci=%!S",zUuid))folders</a>
    @   </td>
    @ </tr>

    @ <tr><th>%s(hname_alg(nUuid)):</th><td>
    @ <span class="copy-button" id="copy-fullhash" data-copytarget="fullhash"
    @ data-copylength="%d(hash_digits(1))"></span>
    @ <span id="fullhash">%.32s(zUuid)<wbr>%s(zUuid+32)</span>
    if( g.perm.Setup ){
      @ (Record ID: %d(rid))
    }
    @ </td></tr>
    @ <tr><th>User&nbsp;&amp;&nbsp;Date:</th><td>
    hyperlink_to_user(zUser,zDate," on ");