Fossil

Check-in [b5bbad23]
Login

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

Overview
Comment:Remove unnecessary white space between the copy button and the branch name.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | copybtn.js-demonstration
Files: files | file ages | folders
SHA3-256: b5bbad23b49a25898af0bc81fc7db05d40bf6ff4c1d51dfeb0e371aa19c17974
User & Date: florian 2019-06-03 09:08:00
Context
2019-06-03
09:10
Cherry-pick [787650c36a]: Minimize impact of the SVG icon on line height. Closed-Leaf check-in: 0a9f12ce user: florian tags: copybtn.js-demonstration
09:08
Remove unnecessary white space between the copy button and the branch name. check-in: b5bbad23 user: florian tags: copybtn.js-demonstration
2019-06-02
12:36
Cherry-pick [6a54cf2939]: Trim leading and trailing white space from the text to be copied to clipboard (do this in Javascript, so no need to care about the extra white space when generating HTML elements). check-in: 698245db user: florian tags: copybtn.js-demonstration
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/info.c.

761
762
763
764
765
766
767
768
769
770
771

772
773
774
775
776
777
778
    db_prepare(&q2,"SELECT substr(tag.tagname,5) FROM tagxref, tag "
                   " WHERE rid=%d AND tagtype>0 "
                   "   AND tag.tagid=tagxref.tagid "
                   "   AND +tag.tagname GLOB 'sym-*'", rid);
    while( db_step(&q2)==SQLITE_ROW ){
      const char *zTagName = db_column_text(&q2, 0);
      if( fossil_strcmp(zTagName,zBrName)==0 ){
        @  | <span class="copy-button" id="copy-brname"
        @      data-copytarget="brname" data-copylength="0">
        @  </span>&nbsp;<span id="brname">
        @    %z(href("%R/timeline?r=%T&unhide",zTagName))%h(zTagName)</a></span>

        if( wiki_tagid2("branch",zTagName)!=0 ){
          blob_appendf(&wiki_read_links, " | %z%h</a>",
              href("%R/wiki?name=branch/%h",zTagName), zTagName);
        }else if( g.perm.Write && g.perm.WrWiki ){
          blob_appendf(&wiki_add_links, " | %z%h</a>",
              href("%R/wikiedit?name=branch/%h",zTagName), zTagName);
        }







|
|
|
|
>







761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
    db_prepare(&q2,"SELECT substr(tag.tagname,5) FROM tagxref, tag "
                   " WHERE rid=%d AND tagtype>0 "
                   "   AND tag.tagid=tagxref.tagid "
                   "   AND +tag.tagname GLOB 'sym-*'", rid);
    while( db_step(&q2)==SQLITE_ROW ){
      const char *zTagName = db_column_text(&q2, 0);
      if( fossil_strcmp(zTagName,zBrName)==0 ){
        @  | <span class="copy-button" id="copy-br0"
        @      data-copytarget="br0" data-copylength="0">
        @  </span>&nbsp;<span
        @  id="br0">%z(href("%R/timeline?r=%T&unhide",zTagName))%h(zTagName)</a>
        @  </span>
        if( wiki_tagid2("branch",zTagName)!=0 ){
          blob_appendf(&wiki_read_links, " | %z%h</a>",
              href("%R/wiki?name=branch/%h",zTagName), zTagName);
        }else if( g.perm.Write && g.perm.WrWiki ){
          blob_appendf(&wiki_add_links, " | %z%h</a>",
              href("%R/wikiedit?name=branch/%h",zTagName), zTagName);
        }