Added a little bit of clever JavaScript to make the TinyMCE window occupy
authorArt Cancro <ajc@citadel.org>
Wed, 27 Oct 2010 18:53:46 +0000 (14:53 -0400)
committerArt Cancro <ajc@citadel.org>
Wed, 27 Oct 2010 18:53:46 +0000 (14:53 -0400)
the full height of the browser window.

webcit/static/t/edit_message.html
webcit/static/t/richedit.html

index 26b783b91c6db9a5d91dcbe71d81e9d42ac19d83..3e9b2667115487bbaed71637afbdd559e3320ff0 100644 (file)
@@ -2,7 +2,7 @@
 <?=("important_msg")><?%("COND:LOGGEDIN", 1, 1, 1, "", ="paging")>
 <?ROOMBANNER>
 <div id="content">
-<div class="entmsg"><form name="enterform" accept-charset="UTF-8" enctype="multipart/form-data" method="POST" action="post">
+<div class="entmsg" id="entmsg"><form name="enterform" accept-charset="UTF-8" enctype="multipart/form-data" method="POST" action="post">
 <input type="hidden" name="postseq" value="<?DATE:NOW:NO>">
 <input type="hidden" name="return_to" value="<?BSTR("return_to")>">
 <input type="hidden" name="nonce" value="<?NONCE>">
@@ -66,7 +66,8 @@
     <input type="text" name="subject" id="subject_id" value="<?BSTR("subject", "H")>" size=45 maxlength=70>
   </td>
 </tr>
-<tr><td colspan="2">
+
+</td></tr></table>
 
 <div class="attachment buttons">
 <img src="static/diskette_24x.gif" class="imgedit" ><?_("Attachments:")>
 &nbsp;&nbsp;<input type="submit" name="attach_button" value="<?_("Add")>">
 &nbsp;&nbsp;<input type="submit" name="remove_attach_button" value="<?_("Remove")>">
 </div>
-</td></tr>
-<tr><td colspan="2">
 
 <input type="hidden" name="sig_inserted" value="yes">
 
-<textarea name="msgtext" cols="80" rows="15">
+<textarea name="msgtext" id="msgtext" cols="80" rows="15">
 <?BSTR("msgtext", "X")><?!("COND:BSTR", 1, "fwdquote")>&lt;br /&gt;
   &lt;div align=center&gt;
     &lt;i&gt;
 
 <?=("richedit")>
 
-</td></tr></table></form>
+</form>
 
 <div style="display:none" id="submit-o-matic"><ul>
 <li>
index 75fabbdd84d904583b06c6b5cc469e932929f256..d642d45ac7a76bab7b0f19ba746c76688f384f4d 100644 (file)
@@ -1,8 +1,10 @@
 <script type="text/javascript" src="tiny_mce/tiny_mce.js"></script>
 <script type="text/javascript">
+idealHeight = $('entmsg').offsetHeight - $('msgtext').offsetTop - 10;
 tinyMCE.init({
        mode : "textareas",
-       width : "99%",
+       width : "100%",
+       height : idealHeight,
        browsers : "msie,gecko,safari,opera",
        theme : "advanced",
        plugins : "iespell",