X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=include%2Foptions%2Fdisplay.php;h=744432887f8b08276eb36258db2c9ca8698f7062;hb=1ae2832e6f59962f785e0416c81d18797f4442c0;hp=f452009a1005d47ab28591890224fbb41694036d;hpb=3e3b60e3e412b565121878ad868d902840213df5;p=squirrelmail.git diff --git a/include/options/display.php b/include/options/display.php index f452009a..74443288 100644 --- a/include/options/display.php +++ b/include/options/display.php @@ -19,7 +19,8 @@ define('SMOPT_GRP_MESSAGE', 2); /* Define the optpage load function for the display options page. */ function load_optpage_data_display() { global $theme, $language, $languages, $js_autodetect_results, - $compose_new_win, $default_use_mdn, $squirrelmail_language, $allow_thread_sort; + $compose_new_win, $default_use_mdn, $squirrelmail_language, $allow_thread_sort, + $optmode; /* Build a simple array into which we will build options. */ $optgrps = array(); @@ -58,7 +59,7 @@ function load_optpage_data_display() { } closedir($handle); - if ( count( $css_values > 1 ) ) { + if ( count( $css_values ) > 1 ) { $optvals[SMOPT_GRP_GENERAL][] = array( 'name' => 'custom_css', @@ -99,17 +100,18 @@ function load_optpage_data_display() { SMPREF_JS_OFF => _("Never")) ); - $js_autodetect_script = - "\n"; - $js_autodetect_results = SMPREF_JS_OFF; + + if ($optmode != 'submit') + $onLoadScript = 'document.forms[0].new_js_autodetect_results.value = \'' . SMPREF_JS_ON . '\''; + else + $onLoadScript = ''; + $optvals[SMOPT_GRP_GENERAL][] = array( 'name' => 'js_autodetect_results', 'caption' => '', 'type' => SMOPT_TYPE_HIDDEN, 'refresh' => SMOPT_REFRESH_NONE, - 'post_script' => $js_autodetect_script, + //'post_script' => $js_autodetect_script, 'save' => 'save_option_javascript_autodetect' ); @@ -154,6 +156,31 @@ function load_optpage_data_display() { 'refresh' => SMOPT_REFRESH_NONE ); + $optvals[SMOPT_GRP_MAILBOX][] = array( + 'name' => 'truncate_sender', + 'caption' => _("Length of From/To Field (0 for full)"), + 'type' => SMOPT_TYPE_INTEGER, + 'refresh' => SMOPT_REFRESH_NONE, + 'size' => SMOPT_SIZE_TINY + ); + + $optvals[SMOPT_GRP_MAILBOX][] = array( + 'name' => 'truncate_subject', + 'caption' => _("Length of Subject Field (0 for full)"), + 'type' => SMOPT_TYPE_INTEGER, + 'refresh' => SMOPT_REFRESH_NONE, + 'size' => SMOPT_SIZE_TINY + ); + + $optvals[SMOPT_GRP_MAILBOX][] = array( + 'name' => 'show_recipient_instead', + 'caption' => _("Show recipient name if the message is from your default identity"), + 'type' => SMOPT_TYPE_BOOLEAN, + 'refresh' => SMOPT_REFRESH_NONE, + 'size' => SMOPT_SIZE_TINY + ); + + /*** Load the General Options into the array ***/ $optgrps[SMOPT_GRP_MESSAGE] = _("Message Display and Composition"); $optvals[SMOPT_GRP_MESSAGE] = array(); @@ -282,6 +309,13 @@ function load_optpage_data_display() { 'refresh' => SMOPT_REFRESH_NONE ); + $optvals[SMOPT_GRP_MESSAGE][] = array( + 'name' => 'strip_sigs', + 'caption' => _("Strip signature when replying"), + 'type' => SMOPT_TYPE_BOOLEAN, + 'refresh' => SMOPT_REFRESH_NONE + ); + $optvals[SMOPT_GRP_MESSAGE][] = array( 'name' => 'internal_date_sort', 'caption' => _("Enable Sort by of Receive Date"), @@ -299,7 +333,8 @@ function load_optpage_data_display() { /* Assemble all this together and return it as our result. */ $result = array( 'grps' => $optgrps, - 'vals' => $optvals + 'vals' => $optvals, + 'xtra' => $onLoadScript ); return ($result); }