Adding status bar to the compose window
[squirrelmail.git] / functions / page_header.php
index 726cf000e1904f449b4667ce4d6cb0861e2a5608..fd072dc954176397bdc3dd8fa116a00aa9f2831a 100644 (file)
@@ -49,7 +49,7 @@ function displayHtmlHeader( $title = 'SquirrelMail', $xtra = '', $do_hook = TRUE
     
     if ($squirrelmail_language == 'ja_JP') {
         echo "<!-- \xfd\xfe -->\n";
-        echo '<meta http-equiv="Content-type" content="text/html; charset=euc-jp">' . "\n";
+        echo '<meta http-equiv="Content-type" content="text/html; charset=euc-jp" />' . "\n";
     }
     
     if ($do_hook) {
@@ -166,7 +166,7 @@ function displayPageHeader($color, $mailbox, $xtra='', $session=false) {
                            '   var newwin = window.open(comp_uri' .
                            ', "_blank",'.
                            '"width='.$compose_width. ',height='.$compose_height.
-                           ',scrollbars=yes,resizable=yes");'."\n".
+                           ',scrollbars=yes,resizable=yes,status=yes");'."\n".
                            "}\n\n";
                     $js .= "function comp_in_new(comp_uri) {\n".
                            "       if (!comp_uri) {\n".
@@ -175,7 +175,7 @@ function displayPageHeader($color, $mailbox, $xtra='', $session=false) {
                            '    var newwin = window.open(comp_uri' .
                            ', "_blank",'.
                            '"width='.$compose_width. ',height='.$compose_height.
-                           ',scrollbars=yes,resizable=yes");'."\n".
+                           ',scrollbars=yes,resizable=yes,status=yes");'."\n".
                            "}\n\n";
                 }
 
@@ -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".
@@ -266,13 +272,13 @@ function displayPageHeader($color, $mailbox, $xtra='', $session=false) {
                         $compose_height = '550';
                     }
                     $js .= "function comp_in_new(comp_uri) {\n".
-                 "       if (!comp_uri) {\n".
-                 '           comp_uri = "'.$compose_uri."\";\n".
-                 '       }'. "\n".
+                         "       if (!comp_uri) {\n".
+                         '           comp_uri = "'.$compose_uri."\";\n".
+                         '       }'. "\n".
                          '    var newwin = window.open(comp_uri' .
                          ', "_blank",'.
                          '"width='.$compose_width. ',height='.$compose_height.
-                         ',scrollbars=yes,resizable=yes");'."\n".
+                         ',scrollbars=yes,resizable=yes,status=yes");'."\n".
                          "}\n\n";
 
                 }
@@ -341,7 +347,7 @@ function displayPageHeader($color, $mailbox, $xtra='', $session=false) {
         echo "</td>\n";
     }
     echo "   </tr>\n".
-        "</table><br>\n\n";
+        "</table><br />\n\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".