Fossil SCM

slightly simpler/more readable

jan.nijtmans 2013-12-05 21:27 hidden-tag
Commit 9a8380d2cde60b3bcc2f17c8669af9ae8056fd0c
1 file changed +8 -7
+8 -7
--- src/info.c
+++ src/info.c
@@ -2208,16 +2208,16 @@
22082208
zUuid[10] = 0;
22092209
style_header("Edit Check-in [%s]", zUuid);
22102210
/*
22112211
** Javascript functions to assist in modifying hidden branch options.
22122212
** stcbi: sets the textContent for the given element id to val
2213
- ** hcbxbi: hids the checkbox and unchecks for the given element id
2213
+ ** hcbxbi: hides the checkbox and unchecks for the given element id
22142214
** hauc: hides and unchecks the checkbox when needed
22152215
*/
22162216
@ <script>
22172217
@ function stcbi(id,val){
2218
- @ id.textContent = val;
2218
+ @ if( id ) id.textContent = val;
22192219
@ }
22202220
@ function hcbxbi(id,toggle){
22212221
@ if( toggle ){
22222222
@ id.disabled = true;
22232223
@ id.checked = false;
@@ -2226,18 +2226,19 @@
22262226
@ }
22272227
@ }
22282228
@ function hauc(cbxid,zdef,formid,toggle){
22292229
@ if( cbxid ) hcbxbi(cbxid,toggle);
22302230
@ hidbrid = gebi('hbranch');
2231
- @ cidbrid = document.getElementById('cbranch') ? gebi('cbranch') : null;
2231
+ @ cidbrid = document.getElementById('cbranch');
22322232
@ if( toggle ){
22332233
@ stcbi(hidbrid,zdef);
2234
- @ if(cidbrid) stcbi(cidbrid,zdef);
2234
+ @ stcbi(cidbrid,zdef);
22352235
@ }else{
2236
- @ if( gebi(formid).value ){
2237
- @ stcbi(hidbrid,gebi(formid).value);
2238
- @ if(cidbrid) stcbi(cidbrid,gebi(formid).value);
2236
+ @ newvalue = gebi(formid).value;
2237
+ @ if( newvalue ){
2238
+ @ stcbi(hidbrid,newvalue);
2239
+ @ stcbi(cidbrid,newvalue);
22392240
@ }
22402241
@ }
22412242
@ }
22422243
@ </script>
22432244
if( P("preview") ){
22442245
--- src/info.c
+++ src/info.c
@@ -2208,16 +2208,16 @@
2208 zUuid[10] = 0;
2209 style_header("Edit Check-in [%s]", zUuid);
2210 /*
2211 ** Javascript functions to assist in modifying hidden branch options.
2212 ** stcbi: sets the textContent for the given element id to val
2213 ** hcbxbi: hids the checkbox and unchecks for the given element id
2214 ** hauc: hides and unchecks the checkbox when needed
2215 */
2216 @ <script>
2217 @ function stcbi(id,val){
2218 @ id.textContent = val;
2219 @ }
2220 @ function hcbxbi(id,toggle){
2221 @ if( toggle ){
2222 @ id.disabled = true;
2223 @ id.checked = false;
@@ -2226,18 +2226,19 @@
2226 @ }
2227 @ }
2228 @ function hauc(cbxid,zdef,formid,toggle){
2229 @ if( cbxid ) hcbxbi(cbxid,toggle);
2230 @ hidbrid = gebi('hbranch');
2231 @ cidbrid = document.getElementById('cbranch') ? gebi('cbranch') : null;
2232 @ if( toggle ){
2233 @ stcbi(hidbrid,zdef);
2234 @ if(cidbrid) stcbi(cidbrid,zdef);
2235 @ }else{
2236 @ if( gebi(formid).value ){
2237 @ stcbi(hidbrid,gebi(formid).value);
2238 @ if(cidbrid) stcbi(cidbrid,gebi(formid).value);
 
2239 @ }
2240 @ }
2241 @ }
2242 @ </script>
2243 if( P("preview") ){
2244
--- src/info.c
+++ src/info.c
@@ -2208,16 +2208,16 @@
2208 zUuid[10] = 0;
2209 style_header("Edit Check-in [%s]", zUuid);
2210 /*
2211 ** Javascript functions to assist in modifying hidden branch options.
2212 ** stcbi: sets the textContent for the given element id to val
2213 ** hcbxbi: hides the checkbox and unchecks for the given element id
2214 ** hauc: hides and unchecks the checkbox when needed
2215 */
2216 @ <script>
2217 @ function stcbi(id,val){
2218 @ if( id ) id.textContent = val;
2219 @ }
2220 @ function hcbxbi(id,toggle){
2221 @ if( toggle ){
2222 @ id.disabled = true;
2223 @ id.checked = false;
@@ -2226,18 +2226,19 @@
2226 @ }
2227 @ }
2228 @ function hauc(cbxid,zdef,formid,toggle){
2229 @ if( cbxid ) hcbxbi(cbxid,toggle);
2230 @ hidbrid = gebi('hbranch');
2231 @ cidbrid = document.getElementById('cbranch');
2232 @ if( toggle ){
2233 @ stcbi(hidbrid,zdef);
2234 @ stcbi(cidbrid,zdef);
2235 @ }else{
2236 @ newvalue = gebi(formid).value;
2237 @ if( newvalue ){
2238 @ stcbi(hidbrid,newvalue);
2239 @ stcbi(cidbrid,newvalue);
2240 @ }
2241 @ }
2242 @ }
2243 @ </script>
2244 if( P("preview") ){
2245

Keyboard Shortcuts

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