Fossil SCM

Added JS to the /eventedit page to colorize the custom color's element (i.e. color preview).

stephan 2014-08-04 19:22 trunk
Commit cd029906920e76df166f9ac060befba1fa1195a8
1 file changed +3 -1
+3 -1
--- src/info.c
+++ src/info.c
@@ -2106,11 +2106,13 @@
21062106
}
21072107
@ %h(aColor[i].zCName)</label>&nbsp;
21082108
@ <input type="text" name="%s(zIdCustom)"
21092109
@ id="%s(zIdCustom)" class="checkinUserColor"
21102110
@ 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('#','')) : '';" />
21122114
@ </td>
21132115
@ </tr>
21142116
@ </table>
21152117
}
21162118
21172119
--- src/info.c
+++ src/info.c
@@ -2106,11 +2106,13 @@
2106 }
2107 @ %h(aColor[i].zCName)</label>&nbsp;
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>&nbsp;
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

Keyboard Shortcuts

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