Fossil SCM
Added JS to the /eventedit page to colorize the custom color's element (i.e. color preview).
Commit
cd029906920e76df166f9ac060befba1fa1195a8
Parent
d4aee31257322c0…
1 file changed
+3
-1
+3
-1
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -2106,11 +2106,13 @@ | ||
| 2106 | 2106 | } |
| 2107 | 2107 | @ %h(aColor[i].zCName)</label> |
| 2108 | 2108 | @ <input type="text" name="%s(zIdCustom)" |
| 2109 | 2109 | @ id="%s(zIdCustom)" class="checkinUserColor" |
| 2110 | 2110 | @ value="%h(stdClrFound?"":zDefaultColor)" |
| 2111 | - @ onfocus="this.form.elements['%s(zId)'][%d(nColor)].checked = true;" /> | |
| 2111 | + @ onfocus="this.form.elements['%s(zId)'][%d(nColor)].checked = true;" | |
| 2112 | + @ onload="this.blur();" | |
| 2113 | + @ onblur="this.parentElement.style.backgroundColor = this.value ? ('#'+this.value.replace('#','')) : '';" /> | |
| 2112 | 2114 | @ </td> |
| 2113 | 2115 | @ </tr> |
| 2114 | 2116 | @ </table> |
| 2115 | 2117 | } |
| 2116 | 2118 | |
| 2117 | 2119 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -2106,11 +2106,13 @@ | |
| 2106 | } |
| 2107 | @ %h(aColor[i].zCName)</label> |
| 2108 | @ <input type="text" name="%s(zIdCustom)" |
| 2109 | @ id="%s(zIdCustom)" class="checkinUserColor" |
| 2110 | @ value="%h(stdClrFound?"":zDefaultColor)" |
| 2111 | @ onfocus="this.form.elements['%s(zId)'][%d(nColor)].checked = true;" /> |
| 2112 | @ </td> |
| 2113 | @ </tr> |
| 2114 | @ </table> |
| 2115 | } |
| 2116 | |
| 2117 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -2106,11 +2106,13 @@ | |
| 2106 | } |
| 2107 | @ %h(aColor[i].zCName)</label> |
| 2108 | @ <input type="text" name="%s(zIdCustom)" |
| 2109 | @ id="%s(zIdCustom)" class="checkinUserColor" |
| 2110 | @ value="%h(stdClrFound?"":zDefaultColor)" |
| 2111 | @ onfocus="this.form.elements['%s(zId)'][%d(nColor)].checked = true;" |
| 2112 | @ onload="this.blur();" |
| 2113 | @ onblur="this.parentElement.style.backgroundColor = this.value ? ('#'+this.value.replace('#','')) : '';" /> |
| 2114 | @ </td> |
| 2115 | @ </tr> |
| 2116 | @ </table> |
| 2117 | } |
| 2118 | |
| 2119 |