Fossil SCM
/ci_edit now auto-checks the Add Tag checkbox if the user types in the tag name field. Thanks to Nolan D. for the suggestion and Steve H. for the graceful solution.
Commit
542f989a27d923f99786dc8b47311aeeb2a772d2
Parent
0c0f268ff3fd2b0…
1 file changed
+2
-1
+2
-1
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -2007,11 +2007,12 @@ | ||
| 2007 | 2007 | |
| 2008 | 2008 | @ <tr><td align="right" valign="top"><b>Tags:</b></td> |
| 2009 | 2009 | @ <td valign="top"> |
| 2010 | 2010 | @ <input type="checkbox" name="newtag"%s(zNewTagFlag) /> |
| 2011 | 2011 | @ Add the following new tag name to this check-in: |
| 2012 | - @ <input type="text" style="width:15;" name="tagname" value="%h(zNewTag)" /> | |
| 2012 | + @ <input type="text" style="width:15;" name="tagname" value="%h(zNewTag)" | |
| 2013 | + @ onkeyup="var cb = document.getElementsByName('newtag'); cb=cb?cb[0]:false; if(cb) cb.checked = !!this.value"/> | |
| 2013 | 2014 | db_prepare(&q, |
| 2014 | 2015 | "SELECT tag.tagid, tagname FROM tagxref, tag" |
| 2015 | 2016 | " WHERE tagxref.rid=%d AND tagtype>0 AND tagxref.tagid=tag.tagid" |
| 2016 | 2017 | " ORDER BY CASE WHEN tagname GLOB 'sym-*' THEN substr(tagname,5)" |
| 2017 | 2018 | " ELSE tagname END /*sort*/", |
| 2018 | 2019 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -2007,11 +2007,12 @@ | |
| 2007 | |
| 2008 | @ <tr><td align="right" valign="top"><b>Tags:</b></td> |
| 2009 | @ <td valign="top"> |
| 2010 | @ <input type="checkbox" name="newtag"%s(zNewTagFlag) /> |
| 2011 | @ Add the following new tag name to this check-in: |
| 2012 | @ <input type="text" style="width:15;" name="tagname" value="%h(zNewTag)" /> |
| 2013 | db_prepare(&q, |
| 2014 | "SELECT tag.tagid, tagname FROM tagxref, tag" |
| 2015 | " WHERE tagxref.rid=%d AND tagtype>0 AND tagxref.tagid=tag.tagid" |
| 2016 | " ORDER BY CASE WHEN tagname GLOB 'sym-*' THEN substr(tagname,5)" |
| 2017 | " ELSE tagname END /*sort*/", |
| 2018 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -2007,11 +2007,12 @@ | |
| 2007 | |
| 2008 | @ <tr><td align="right" valign="top"><b>Tags:</b></td> |
| 2009 | @ <td valign="top"> |
| 2010 | @ <input type="checkbox" name="newtag"%s(zNewTagFlag) /> |
| 2011 | @ Add the following new tag name to this check-in: |
| 2012 | @ <input type="text" style="width:15;" name="tagname" value="%h(zNewTag)" |
| 2013 | @ onkeyup="var cb = document.getElementsByName('newtag'); cb=cb?cb[0]:false; if(cb) cb.checked = !!this.value"/> |
| 2014 | db_prepare(&q, |
| 2015 | "SELECT tag.tagid, tagname FROM tagxref, tag" |
| 2016 | " WHERE tagxref.rid=%d AND tagtype>0 AND tagxref.tagid=tag.tagid" |
| 2017 | " ORDER BY CASE WHEN tagname GLOB 'sym-*' THEN substr(tagname,5)" |
| 2018 | " ELSE tagname END /*sort*/", |
| 2019 |