From 192cdcf506576a2d0743c4e6b79d3556cbf3fd6d Mon Sep 17 00:00:00 2001 From: pdontthink Date: Fri, 30 Jul 2004 13:04:52 +0000 Subject: [PATCH] Added 'no focus' option for compose screen git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@7783 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- ChangeLog | 2 ++ functions/page_header.php | 12 ++++++++++++ include/options/display.php | 3 ++- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 5c4239c8..c8a9efbe 100644 --- 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 -------------------- diff --git a/functions/page_header.php b/functions/page_header.php index 726cf000..134d8254 100644 --- a/functions/page_header.php +++ b/functions/page_header.php @@ -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". diff --git a/include/options/display.php b/include/options/display.php index 1f5c1aab..0ae31bd6 100644 --- a/include/options/display.php +++ b/include/options/display.php @@ -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( -- 2.25.1