function displayPageHeader($color, $mailbox, $xtra='') {
- global $delimiter, $hide_sm_attributions, $base_uri, $PHP_SELF, $frame_top, $compose_new_win, $username, $datadir;
+ global $delimiter, $hide_sm_attributions, $base_uri, $PHP_SELF, $frame_top,
+ $compose_new_win, $username, $datadir, $compose_width, $compose_height;
$module = substr( $PHP_SELF, ( strlen( $PHP_SELF ) - strlen( $base_uri ) ) * -1 );
if (!isset($frame_top)) {
"$xtra\n".
"}\n";
if ($compose_new_win == '1') {
- $width= getPref($username, $datadir, 'editor_size', 76);
- if ($width < 65) {
- $pix_width = 560;
+ if (!preg_match("/^[0-9]{3,4}$/", $compose_width)) {
+ $compose_width = '640';
}
- else {
- $width = (.9*$width);
- $pix_width = intval($width).'0';
+ if (!preg_match("/^[0-9]{3,4}$/", $compose_height)) {
+ $compose_height = '550';
}
$js .= "function comp_in_new() {\n".
" var newwin = window.open(\"".$base_uri."src/compose.php\"".
- ", \"compose_window\", \"width=".$pix_width.",height=650".
+ ", \"compose_window\",
+ \"width=".$compose_width.",height=$compose_height".
",scrollbars=yes,resizable=yes\");\n".
"}\n";
}
}
echo '<TABLE WIDTH="100%" ALIGN=center CELLSPACING=0 BORDER=0>' . "\n";
if ($compose_new_win == '1') {
+ echo '<TABLE ALIGN=CENTER BGCOLOR="'.$color[0].'" WIDTH="100%" BORDER=0>'."\n";
echo ' <TR><TD></TD><TD ALIGN="RIGHT"><INPUT TYPE="BUTTON" NAME="Close" onClick="return self.close()" VALUE='._("Close").'></TD></TR>'."\n";
}
if ($location_of_buttons == 'top') {
'</td></tr>';
}
/* End of attachment code */
-
+ if ($compose_new_win == '1') {
+ echo '</TABLE>'."\n";
+ }
echo '</TABLE>' . "\n";
if ($reply_id) {
echo '<input type=hidden name=reply_id value=' . $reply_id . ">\n";
/* compose in new window setting */
$compose_new_win = getPref($data_dir, $username, 'compose_new_win', 0);
+$compose_height = getPref($data_dir, $username, 'compose_height', 550);
+$compose_width = getPref($data_dir, $username, 'compose_width', 640);
+
/* signature placement settings */
$sig_first = getPref($data_dir, $username, 'sig_first', 0);
/* Define the optpage load function for the display options page. */
function load_optpage_data_display() {
global $theme, $language, $languages, $js_autodetect_results,
- $default_use_mdn, $squirrelmail_language, $allow_thread_sort;
+ $compose_new_win, $default_use_mdn, $squirrelmail_language, $allow_thread_sort;
/* Build a simple array into which we will build options. */
$optgrps = array();
SMPREF_LOC_BOTTOM => _("After message body"))
);
+
$optvals[SMOPT_GRP_MESSAGE][] = array(
'name' => 'use_javascript_addr_book',
'caption' => _("Addressbook Display Format"),
'type' => SMOPT_TYPE_BOOLEAN,
'refresh' => SMOPT_REFRESH_NONE
);
+
if ($default_use_mdn) {
$optvals[SMOPT_GRP_MESSAGE][] = array(
'name' => 'mdn_user_support',
'refresh' => SMOPT_REFRESH_NONE
);
}
+
$optvals[SMOPT_GRP_MESSAGE][] = array(
'name' => 'compose_new_win',
'caption' => _("Always compose in a new window"),
'type' => SMOPT_TYPE_BOOLEAN,
'refresh' => SMOPT_REFRESH_ALL
);
+
+ $optvals[SMOPT_GRP_MESSAGE][] = array(
+ 'name' => 'compose_width',
+ 'caption' => _("Width of compose window"),
+ 'type' => SMOPT_TYPE_INTEGER,
+ 'refresh' => SMOPT_REFRESH_ALL,
+ 'size' => SMOPT_SIZE_TINY
+ );
+
+ $optvals[SMOPT_GRP_MESSAGE][] = array(
+ 'name' => 'compose_height',
+ 'caption' => _("Height of compose window"),
+ 'type' => SMOPT_TYPE_INTEGER,
+ 'refresh' => SMOPT_REFRESH_ALL,
+ 'size' => SMOPT_SIZE_TINY
+ );
+
$optvals[SMOPT_GRP_MESSAGE][] = array(
'name' => 'sig_first',
'caption' => _("Append signature before reply/forward text"),
'type' => SMOPT_TYPE_BOOLEAN,
'refresh' => SMOPT_REFRESH_NONE
);
+
$optvals[SMOPT_GRP_MESSAGE][] = array(
'name' => 'internal_date_sort',
'caption' => _("Use receive date for sort"),