Fossil

Check-in [396eceb9]
Login

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

Overview
Comment:When sided by side make the text area small so it will always fit in the column. After page loaded enlarge the text area with Javascript. But leave a little room (40px) as a margin between the two columns. This insurers that side by side always succeeds.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | side-by-side-edit
Files: files | file ages | folders
SHA1: 396eceb9e41290e37b4c07817bdcce46e7f60ccf
User & Date: renez 2012-04-30 09:33:53.082
Context
2012-04-30
09:33
When sided by side make the text area small so it will always fit in the column. After page loaded enlarge the text area with Javascript. But leave a little room (40px) as a margin between the two columns. This insurers that side by side always succeeds. ... (Closed-Leaf check-in: 396eceb9 user: renez tags: side-by-side-edit)
2012-04-29
13:07
Put wrap="virtual" back in textarea Increase the height of the textarea to the height of the preview div. ... (check-in: ead316f3 user: renez tags: side-by-side-edit)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/wiki.c.
373
374
375
376
377
378
379



380

381
382
383
384
385
386
387
    @ <div id="colleft" style="width:50%%;">
  }
  @ <form method="POST" action="%s(g.zTop)/wikiedit">
  login_insert_csrf_secret();
  @ <input type="hidden" name="name" value="%h(zPageName)" />
  @ <div>  <input type="submit" id="ssb" name="ssb" value="Toggle Side-by-side" />
  @ </div><input type="hidden" name="ss" value="%d(ss)" />



  @ <textarea id="w" name="w" class="wikiedit" cols="60" rows="%d(n)"

  @   wrap="virtual">%h(zBody)</textarea>
  @ <br />
  if(!ss){
    @ <input type="submit" name="preview" value="Preview Your Changes" />
  }
  @ <input type="submit" name="submit" value="Apply These Changes" />
  @ <input type="submit" name="cancel" value="Cancel" />







>
>
>
|
>







373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
    @ <div id="colleft" style="width:50%%;">
  }
  @ <form method="POST" action="%s(g.zTop)/wikiedit">
  login_insert_csrf_secret();
  @ <input type="hidden" name="name" value="%h(zPageName)" />
  @ <div>  <input type="submit" id="ssb" name="ssb" value="Toggle Side-by-side" />
  @ </div><input type="hidden" name="ss" value="%d(ss)" />
  if(ss){
    @ <textarea id="w" name="w" class="wikiedit" cols="20" rows="5"
  } else {
    @ <textarea id="w" name="w" class="wikiedit" cols="60" rows="%d(n)"
  }
  @   wrap="virtual">%h(zBody)</textarea>
  @ <br />
  if(!ss){
    @ <input type="submit" name="preview" value="Preview Your Changes" />
  }
  @ <input type="submit" name="submit" value="Apply These Changes" />
  @ <input type="submit" name="cancel" value="Cancel" />
482
483
484
485
486
487
488



489
490
491
492
493
494
495
    @   if(window.isChanged){
    @     window.isChanged =0
    @     x.send("w="+encodeURIComponent(window.ta.value))
    @   }
    @   setTimeout(preview,sto)
    @ }
    @ function pageLoaded(e){



    @   if( window.ta.offsetHeight<window.prvw.offsetHeight ){
    @     window.ta.style.height=window.prvw.offsetHeight+"px"
    @   }
    @   window.isChanged =0
    @   setTimeout(preview,sto)
    @ }
    @ function changed(e){







>
>
>







486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
    @   if(window.isChanged){
    @     window.isChanged =0
    @     x.send("w="+encodeURIComponent(window.ta.value))
    @   }
    @   setTimeout(preview,sto)
    @ }
    @ function pageLoaded(e){
    @   if( window.ta.offsetWidth<window.prvw.offsetWidth ){
    @     window.ta.style.width=(window.prvw.offsetWidth-40)+"px"
    @   }
    @   if( window.ta.offsetHeight<window.prvw.offsetHeight ){
    @     window.ta.style.height=window.prvw.offsetHeight+"px"
    @   }
    @   window.isChanged =0
    @   setTimeout(preview,sto)
    @ }
    @ function changed(e){