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.

stephan 2012-07-19 18:41 trunk
Commit 542f989a27d923f99786dc8b47311aeeb2a772d2
1 file changed +2 -1
+2 -1
--- src/info.c
+++ src/info.c
@@ -2007,11 +2007,12 @@
20072007
20082008
@ <tr><td align="right" valign="top"><b>Tags:</b></td>
20092009
@ <td valign="top">
20102010
@ <input type="checkbox" name="newtag"%s(zNewTagFlag) />
20112011
@ 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"/>
20132014
db_prepare(&q,
20142015
"SELECT tag.tagid, tagname FROM tagxref, tag"
20152016
" WHERE tagxref.rid=%d AND tagtype>0 AND tagxref.tagid=tag.tagid"
20162017
" ORDER BY CASE WHEN tagname GLOB 'sym-*' THEN substr(tagname,5)"
20172018
" ELSE tagname END /*sort*/",
20182019
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button