Added Length of Subject as Display Option (default 50, as before).
[squirrelmail.git] / include / options / display.php
index 7ee723c3e06b870ae9d26d63abd612ec5e743f9d..1235ca13496a69c11583d64b1a32a32f4d39d580 100644 (file)
@@ -99,17 +99,14 @@ function load_optpage_data_display() {
                            SMPREF_JS_OFF        => _("Never"))
     );
 
-    $js_autodetect_script =
-        "<SCRIPT LANGUAGE=\"JavaScript\" TYPE=\"text/javascript\"><!--\n".
-           "document.forms[0].new_js_autodetect_results.value = '" . SMPREF_JS_ON . "';\n".
-        "// --></SCRIPT>\n";
+    $onLoadScript = "document.forms[0].new_js_autodetect_results.value = '" . SMPREF_JS_ON . "'";
     $js_autodetect_results = SMPREF_JS_OFF;
     $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 +151,23 @@ 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
+    );
+
+
     /*** Load the General Options into the array ***/
     $optgrps[SMOPT_GRP_MESSAGE] = _("Message Display and Composition");
     $optvals[SMOPT_GRP_MESSAGE] = array();
@@ -306,7 +320,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);
 }