Fossil

Check-in [98fabd64]
Login

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

Overview
Comment:Fix the automatic Tags checkbox on the /ci_edit page.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:98fabd648dcea87122634eae138868387a087da04e2086e480f80b06d80397f3
User & Date: drh 2017-12-06 23:06:31
Context
2017-12-07
01:57
Fix minor script problems. Actually turn on CSP. check-in: e59a7fd3 user: drh tags: trunk
2017-12-06
23:06
Fix the automatic Tags checkbox on the /ci_edit page. check-in: 98fabd64 user: drh tags: trunk
22:38
Set the color of graph comment boxes using javascript, instead of in-line CSS. check-in: 5a6fe06c user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/ci_edit.js.

    18     18     var br = newbr.getAttribute('data-branch');
    19     19     if( !x ) x = br;
    20     20     newbr.checked = (x!=br);
    21     21     document.getElementById('hbranch').textContent = x;
    22     22     cidbrid = document.getElementById('cbranch');
    23     23     if( cidbrid ) cidbrid.textContent = x;
    24     24   }
           25  +function chgtn(){
           26  +  var newtag = document.getElementById('newtag');
           27  +  var tagname = document.getElementById('tagname');
           28  +  newtag.checked=!!tagname.value;
           29  +}
    25     30   (function(){
    26     31     document.getElementById('newbr').onchange = chgcbn;
    27     32     document.getElementById('brname').onkeyup = chgbn;
           33  +  document.getElementById('tagname').onkeyup = chgtn;
    28     34   }());

Changes to src/info.c.

  2747   2747     @ Propagate color to descendants</label></div>
  2748   2748     @ </td></tr>
  2749   2749   
  2750   2750     @ <tr><th align="right" valign="top">Tags:</th>
  2751   2751     @ <td valign="top">
  2752   2752     @ <label><input type="checkbox" id="newtag" name="newtag"%s(zNewTagFlag) />
  2753   2753     @ Add the following new tag name to this check-in:</label>
  2754         -  @ <input type="text" style="width:15;" name="tagname" value="%h(zNewTag)"
  2755         -  @ onkeyup="gebi('newtag').checked=!!this.value" />
         2754  +  @ <input type="text" size='15' name="tagname" value="%h(zNewTag)" \
         2755  +  @ id='tagname' />
  2756   2756     zBranchName = db_text(0, "SELECT value FROM tagxref, tag"
  2757   2757        " WHERE tagxref.rid=%d AND tagtype>0 AND tagxref.tagid=tag.tagid"
  2758   2758        " AND tagxref.tagid=%d", rid, TAG_BRANCH);
  2759   2759     db_prepare(&q,
  2760   2760        "SELECT tag.tagid, tagname, tagxref.value FROM tagxref, tag"
  2761   2761        " WHERE tagxref.rid=%d AND tagtype>0 AND tagxref.tagid=tag.tagid"
  2762   2762        " ORDER BY CASE WHEN tagname GLOB 'sym-*' THEN substr(tagname,5)"