Browse Source

Made compose textarea height configurable

pdontthink 21 years ago
parent
commit
7ff016b53d
3 changed files with 15 additions and 6 deletions
  1. 1 0
      include/load_prefs.php
  2. 9 1
      include/options/display.php
  3. 5 5
      src/compose.php

+ 1 - 0
include/load_prefs.php

@@ -143,6 +143,7 @@ if ($left_size == '') {
 }
 }
 
 
 $editor_size = getPref($data_dir, $username, 'editor_size', 76 );
 $editor_size = getPref($data_dir, $username, 'editor_size', 76 );
+$editor_height = getPref($data_dir, $username, 'editor_height', 20 );
 $use_signature = getPref($data_dir, $username, 'use_signature', SMPREF_OFF );
 $use_signature = getPref($data_dir, $username, 'use_signature', SMPREF_OFF );
 $prefix_sig = getPref($data_dir, $username, 'prefix_sig');
 $prefix_sig = getPref($data_dir, $username, 'prefix_sig');
 
 

+ 9 - 1
include/options/display.php

@@ -235,7 +235,15 @@ function load_optpage_data_display() {
 
 
     $optvals[SMOPT_GRP_MESSAGE][] = array(
     $optvals[SMOPT_GRP_MESSAGE][] = array(
         'name'    => 'editor_size',
         'name'    => 'editor_size',
-        'caption' => _("Size of Editor Window"),
+        'caption' => _("Width of Editor Window"),
+        'type'    => SMOPT_TYPE_INTEGER,
+        'refresh' => SMOPT_REFRESH_NONE,
+        'size'    => SMOPT_SIZE_TINY
+    );
+
+    $optvals[SMOPT_GRP_MESSAGE][] = array(
+        'name'    => 'editor_height',
+        'caption' => _("Height of Editor Window"),
         'type'    => SMOPT_TYPE_INTEGER,
         'type'    => SMOPT_TYPE_INTEGER,
         'refresh' => SMOPT_REFRESH_NONE,
         'refresh' => SMOPT_REFRESH_NONE,
         'size'    => SMOPT_SIZE_TINY
         'size'    => SMOPT_SIZE_TINY

+ 5 - 5
src/compose.php

@@ -896,7 +896,7 @@ function getMessage_RFC822_Attachment($message, $composeMessage, $passed_id,
 function showInputForm ($session, $values=false) {
 function showInputForm ($session, $values=false) {
     global $send_to, $send_to_cc, $body, $startMessage,
     global $send_to, $send_to_cc, $body, $startMessage,
            $passed_body, $color, $use_signature, $signature, $prefix_sig,
            $passed_body, $color, $use_signature, $signature, $prefix_sig,
-           $editor_size, $attachments, $subject, $newmail,
+           $editor_size, $editor_height, $attachments, $subject, $newmail,
            $use_javascript_addr_book, $send_to_bcc, $passed_id, $mailbox,
            $use_javascript_addr_book, $send_to_bcc, $passed_id, $mailbox,
            $from_htmladdr_search, $location_of_buttons, $attachment_dir,
            $from_htmladdr_search, $location_of_buttons, $attachment_dir,
            $username, $data_dir, $identity, $idents, $draft_id, $delete_draft,
            $username, $data_dir, $identity, $idents, $draft_id, $delete_draft,
@@ -1029,14 +1029,14 @@ function showInputForm ($session, $values=false) {
     if ($compose_new_win == '1') {
     if ($compose_new_win == '1') {
         echo '   <TR>' . "\n" .
         echo '   <TR>' . "\n" .
              '      <TD BGCOLOR="' . $color[0] . '" COLSPAN=2 ALIGN=CENTER>' . "\n" .
              '      <TD BGCOLOR="' . $color[0] . '" COLSPAN=2 ALIGN=CENTER>' . "\n" .
-             '         <TEXTAREA NAME=body ID=body ROWS=20 COLS="' .
-                       $editor_size . '" WRAP="VIRTUAL">';
+             '         <TEXTAREA NAME="body" ID="body" ROWS="' . $editor_height .
+             '" COLS="' . $editor_size . '" WRAP="VIRTUAL">';
     }
     }
     else {
     else {
         echo '   <TR>' . "\n" .
         echo '   <TR>' . "\n" .
             '      <TD BGCOLOR="' . $color[4] . '" COLSPAN=2>' . "\n" .
             '      <TD BGCOLOR="' . $color[4] . '" COLSPAN=2>' . "\n" .
-            '         &nbsp;&nbsp;<TEXTAREA NAME=body ID=body ROWS=20 COLS="' .
-                      $editor_size . '" WRAP="VIRTUAL">';
+            '         &nbsp;&nbsp;<TEXTAREA NAME="body" ID="body" ROWS="' . $editor_height .
+            '" COLS="' . $editor_size . '" WRAP="VIRTUAL">';
     }
     }
 
 
     if ($use_signature == true && $newmail == true && !isset($from_htmladdr_search)) {
     if ($use_signature == true && $newmail == true && !isset($from_htmladdr_search)) {