Fossil

Check-in [11e8a48e]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Use Javascript to hide the branch hiding checkbox when necessary. Also update the branch name in the branch hiding text when a branch is specified.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | hidden-tag
Files: files | file ages | folders
SHA1:11e8a48e4d5cd9014f7c260e15965a2eba925e12
User & Date: andybradford 2013-12-05 08:15:19
Context
2013-12-05
08:36
Use different format specifier for and textContent to avoid unwanted display issues. check-in: 439f18e8 user: andybradford tags: hidden-tag
08:15
Use Javascript to hide the branch hiding checkbox when necessary. Also update the branch name in the branch hiding text when a branch is specified. check-in: 11e8a48e user: andybradford tags: hidden-tag
2013-12-04
09:58
"this branch" -> <branchname> check-in: b0bf6582 user: jan.nijtmans tags: hidden-tag
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/info.c.

2205
2206
2207
2208
2209
2210
2211



























2212
2213
2214
2215
2216
2217
2218
....
2328
2329
2330
2331
2332
2333
2334
2335










2336
2337


2338








2339
2340
2341
2342
2343
2344
2345






2346
2347
2348
2349
2350
2351
2352
2353
    }
    cgi_redirectf("ci?name=%s", zUuid);
  }
  blob_zero(&comment);
  blob_append(&comment, zNewComment, -1);
  zUuid[10] = 0;
  style_header("Edit Check-in [%s]", zUuid);



























  if( P("preview") ){
    Blob suffix;
    int nTag = 0;
    @ <b>Preview:</b>
    @ <blockquote>
    @ <table border=0>
    if( zNewColor && zNewColor[0] ){
................................................................................
    }
  }
  db_finalize(&q);
  @ </td></tr>

  @ <tr><th align="right" valign="top">Branching:</th>
  @ <td valign="top">
  @ <label><input id="newbr" type="checkbox" name="newbr"%s(zNewBrFlag) />










  @ Make this check-in the start of a new branch named:</label>
  @ <input type="text" style="width:15;" name="brname" value="%h(zNewBranch)"


  @ onkeyup="gebi('newbr').checked=!!this.value" />








  @ </td></tr>

  if( !fHasHidden && zBranchName ){
    @ <tr><th align="right" valign="top">Branch Hiding:</th>
    @ <td valign="top">
    @ <label><input type="checkbox" name="hide"%s(zHideFlag) />
    @ Hide branch <b>%s(zBranchName)</b> from the timeline starting from this






    @ check-in</label>
    @ </td></tr>
  }


  if( !fHasClosed ){
    if( is_a_leaf(rid) ){
      @ <tr><th align="right" valign="top">Leaf Closure:</th>







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 







|
>
>
>
>
>
>
>
>
>
>

|
>
>
|
>
>
>
>
>
>
>
>





|
|
>
>
>
>
>
>
|







2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
....
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
    }
    cgi_redirectf("ci?name=%s", zUuid);
  }
  blob_zero(&comment);
  blob_append(&comment, zNewComment, -1);
  zUuid[10] = 0;
  style_header("Edit Check-in [%s]", zUuid);
  /*
  ** Javascript functions to assist in modifying hidden branch options
  ** sihbi: sets the innerHTML for the given element id to val
  ** hcbxbi: hids the checkbox and unchecks for the given element id
  ** hauc: hides and unchecks the checkbox when needed
  */
  @ <script>
  @ function sihbi(id,val){
  @   id.innerHTML = val;
  @ }
  @ function hcbxbi(id,toggle){
  @   if( toggle ){
  @     id.style.visibility = "hidden";
  @     id.checked = false;
  @   }else{
  @     id.style.visibility = "visible";
  @   }
  @ }
  @ function hauc(cbxid,hidbrid,zdef,formid,toggle){
  @   if( cbxid ) hcbxbi(cbxid,toggle);
  @   if( toggle ){
  @     sihbi(hidbrid,zdef);
  @   }else{
  @     if( gebi(formid).value ) sihbi(hidbrid,gebi(formid).value);
  @   }
  @ }
  @ </script>
  if( P("preview") ){
    Blob suffix;
    int nTag = 0;
    @ <b>Preview:</b>
    @ <blockquote>
    @ <table border=0>
    if( zNewColor && zNewColor[0] ){
................................................................................
    }
  }
  db_finalize(&q);
  @ </td></tr>

  @ <tr><th align="right" valign="top">Branching:</th>
  @ <td valign="top">
  @ <label><input id="newbr" type="checkbox" name="newbr"%s(zNewBrFlag)
  if( !fHasHidden && zBranchName ){
    if( fossil_strcmp(zBranchName, "trunk")==0 ){
      @ onclick="hauc(gebi('hidebr'),gebi('hbranch'),'%s(zBranchName)',
      @ 'brname',this.value)"
    }else{
      @ onclick="hauc(null,gebi('hbranch'),'%s(zBranchName)',
      @ 'brname',this.value)"
    }
  }
  @ />
  @ Make this check-in the start of a new branch named:</label>
  @ <input type="text" style="width:15;" id="brname" name="brname"
  @ value="%h(zNewBranch)"
  if( !fHasHidden && zBranchName ){
    @ onkeyup="gebi('newbr').checked=!!this.value;
    if( fossil_strcmp(zBranchName, "trunk")==0 ){
      @ hauc(gebi('hidebr'),gebi('hbranch'),'%s(zBranchName)',
      @ 'brname',!this.value)"
    }else{
      @ hauc(null,gebi('hbranch'),'%s(zBranchName)','brname',!this.value)"
    }
  }
  @ />
  @ </td></tr>

  if( !fHasHidden && zBranchName ){
    @ <tr><th align="right" valign="top">Branch Hiding:</th>
    @ <td valign="top">
    @ <label><input type="checkbox" id="hidebr" name="hide"%s(zHideFlag) 
    if( fossil_strcmp(zBranchName, "trunk")==0 ){
      @ style="visibility: hidden" />
    }else{
      @ />
    }
    @ Hide branch 
    @ <span style="font-weight:bold" id="hbranch">%s(zBranchName)</span>
    @ from the timeline starting from this check-in</label>
    @ </td></tr>
  }


  if( !fHasClosed ){
    if( is_a_leaf(rid) ){
      @ <tr><th align="right" valign="top">Leaf Closure:</th>