Added 'no focus' option for compose screen
authorpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 30 Jul 2004 13:04:52 +0000 (13:04 +0000)
committerpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 30 Jul 2004 13:04:52 +0000 (13:04 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@7783 7612ce4b-ef26-0410-bec9-ea0150e637f0

ChangeLog
functions/page_header.php
include/options/display.php

index 5c4239c..c8a9efb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -73,6 +73,8 @@ Version 1.5.1 -- CVS
   - Added "trailing text" for options built by SquirrelMail (text placed
     after text and select list inputs on options pages)
   - Custom option page values now repopulate correctly
+  - Added "no focus" option for compose page in display preferences (setting
+    reply focus to "No focus" also affects composing new messages)
 
 Version 1.5.0
 --------------------
index 726cf00..134d825 100644 (file)
@@ -206,6 +206,12 @@ function displayPageHeader($color, $mailbox, $xtra='', $session=false) {
             {
                 if ($reply_focus == 'select') $js .= "document.forms['compose'].body.select();}\n";
                 else if ($reply_focus == 'focus') $js .= "document.forms['compose'].body.focus();}\n";
+                else if ($reply_focus == 'none') $js .= "}\n";
+            }
+            // no reply focus also applies to composing new messages
+            else if ($reply_focus == 'none')
+            {
+                $js .= "}\n";
             }
             else
                 $js .= "var f = document.forms.length;\n".
@@ -380,6 +386,12 @@ function compose_Header($color, $mailbox) {
             {
                 if ($reply_focus == 'select') $js .= "document.forms['compose'].body.select();}\n";
                 else if ($reply_focus == 'focus') $js .= "document.forms['compose'].body.focus();}\n";
+                else if ($reply_focus == 'none') $js .= "}\n";
+            }
+            // no reply focus also applies to composing new messages
+            else if ($reply_focus == 'none')
+            {
+                $js .= "}\n";
             }
             else
                 $js .= "var f = document.forms.length;\n".
index 1f5c1aa..0ae31bd 100644 (file)
@@ -415,7 +415,8 @@ function load_optpage_data_display() {
         'refresh' => SMOPT_REFRESH_NONE,
         'posvals' => array('' => _("To: field"),
                            'focus' => _("Focus in body"),
-                           'select' => _("Select body"))
+                           'select' => _("Select body"),
+                           'none' => _("No focus"))
     );
 
     $optvals[SMOPT_GRP_MESSAGE][] = array(