More tweaking of various config options
authorMichael M Slusarz <slusarz@curecanti.org>
Wed, 7 Oct 2009 04:43:51 +0000 (22:43 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Wed, 7 Oct 2009 04:43:51 +0000 (22:43 -0600)
19 files changed:
imp/config/conf.xml
imp/config/prefs.php.dist
imp/docs/UPGRADING
imp/js/flagprefs.js
imp/lib/Contents.php
imp/lib/Mime/Viewer/Images.php
imp/lib/Views/ShowMessage.php
imp/mailbox.php
imp/message.php
imp/rss.php
imp/smime.php
imp/templates/pgp/pgp.html
imp/templates/prefs/flagmanagement.inc
imp/templates/prefs/soundselect.inc
imp/templates/smime/smime.html
imp/themes/ie6_or_less.css
imp/themes/ie7.css
imp/themes/screen.css
imp/themes/silver/screen.css

index 8c90122..be0fe8c 100644 (file)
   </configsection>
  </configtab>
 
- <configtab name="mailbox" desc="Mailbox">
-  <configsection name="mailbox">
-   <configheader>Mailbox Settings</configheader>
-   <configboolean name="show_preview" desc="Should we allow users to display
-   message previews in the mailbox index? This is disabled by default
-   as it can be performance intensive, especially without mailbox
-   caching. Note that this option only determines whether or not users
-   are allowed to show previews - each user can still turn previews on
-   or off in their preferences.">false</configboolean>
-  </configsection>
- </configtab>
-
  <configtab name="msgsettings" desc="Message and Spam">
   <configheader>Message Settings</configheader>
   <configsection name="msgsettings">
index f97c944..a6e44c2 100644 (file)
@@ -127,15 +127,6 @@ $prefGroups['newmail'] = array(
     'members' => array('refresh_time', 'nav_poll_all', 'nav_popup', 'soundselect')
 );
 
-if (!empty($GLOBALS['conf']['mailbox']['show_preview'])) {
-    $prefGroups['mailpreview'] = array(
-        'column' => _("Message Options"),
-        'label' => _("Mail Previews"),
-        'desc' => _("Configure mail preview options."),
-        'members' => array('preview_enabled', 'preview_maxlen', 'preview_strip_nl', 'preview_show_unread', 'preview_show_tooltip')
-    );
-}
-
 if (!$is_pop3) {
     $prefGroups['flags'] = array(
         'column' => _("Message Options"),
@@ -204,6 +195,13 @@ $prefGroups['mimp'] = array(
     'members' => array('mimp_preview_msg')
 );
 
+$prefGroups['standard'] = array(
+    'column' => _("Other Options"),
+    'label' => _("Standard View Options"),
+    'desc' => _("Configure options for the standard view."),
+    'members' => array('preview_enabled', 'preview_maxlen', 'preview_strip_nl', 'preview_show_unread', 'preview_show_tooltip')
+);
+
 $prefGroups['dimp'] = array(
     'column' => _("Other Options"),
     'label' => _("Dynamic View Options"),
@@ -809,7 +807,7 @@ $_prefs['auto_delete_drafts'] = array(
 // filter message content?
 $_prefs['filtering'] = array(
     'value' => 0,
-    'locked' => false,
+    'locked' => true,
     'shared' => false,
     'type' => 'checkbox',
     'desc' => _("Filter message content for profanity?"));
@@ -932,7 +930,7 @@ $_prefs['mail_hdr'] = array(
     'locked' => false,
     'shared' => false,
     'type' => 'textarea',
-    'desc' => _("Additional headers to display when viewing: <em>(optional, enter each header on a new line)</em>"));
+    'desc' => _("Additional headers to display when viewing: <em>(enter each header on a new line)</em>"));
 
 // default message character set
 $_prefs['default_msg_charset'] = array(
@@ -1064,57 +1062,6 @@ $_prefs['soundselect'] = array('type' => 'special');
 // End New Mail preferences
 
 
-// Message Preview Preferences
-
-$_prefs['preview_enabled'] = array(
-    'value' => '0',
-    'locked' => false,
-    'shared' => false,
-    'type' => 'checkbox',
-    'desc' => _("Enable message previews?")
-);
-
-$_prefs['preview_maxlen'] = array(
-    'value' => 250,
-    'locked' => false,
-    'shared' => false,
-    'type' => 'enum',
-    'enum' => array(
-        100 => _("100 characters"),
-        250 => _("250 characters"),
-        500 => _("500 characters"),
-        1000 => _("1000 characters")
-    ),
-    'desc' => _("Characters to display:")
-);
-
-$_prefs['preview_strip_nl'] = array(
-    'value' => 1,
-    'locked' => false,
-    'shared' => false,
-    'type' => 'checkbox',
-    'desc' => _("Strip linebreaks?")
-);
-
-$_prefs['preview_show_unread'] = array(
-    'value' => 1,
-    'locked' => false,
-    'shared' => false,
-    'type' => 'checkbox',
-    'desc' => _("Show previews for unread messages only?")
-);
-
-$_prefs['preview_show_tooltip'] = array(
-    'value' => 0,
-    'locked' => false,
-    'shared' => false,
-    'type' => 'checkbox',
-    'desc' => _("Show previews in tooltips?")
-);
-
-// End Message Preview
-
-
 // IMAP Flag preferences
 
 // UI for flag management.
@@ -1623,7 +1570,7 @@ $_prefs['smime_additional_cert'] = array(
 
 // End S/MIME Options
 
-// MIMP Options
+// Minimalist View Options
 
 // display only the first 250 characters of a message on first message view?
 $_prefs['mimp_preview_msg'] = array(
@@ -1634,9 +1581,66 @@ $_prefs['mimp_preview_msg'] = array(
     'desc' => _("Display only the first 250 characters of a message initially?")
 );
 
-// End MIMP Options
+// End Minimalist View Options
+
+// Standard View Options
+
+// Previews are disabled by default as it can be performance intensive,
+// especially without caching.
+$_prefs['preview_enabled'] = array(
+    // Disabled and locked by default
+    'value' => 0,
+    'locked' => true,
+    'shared' => false,
+    'type' => 'checkbox',
+    'desc' => _("Enable message previews?")
+);
+
+$_prefs['preview_maxlen'] = array(
+    'value' => 250,
+    // Locked by default
+    'locked' => true,
+    'shared' => false,
+    'type' => 'enum',
+    'enum' => array(
+        100 => _("100 characters"),
+        250 => _("250 characters"),
+        500 => _("500 characters"),
+        1000 => _("1000 characters")
+    ),
+    'desc' => _("Characters to display:")
+);
+
+$_prefs['preview_strip_nl'] = array(
+    'value' => 1,
+    // Locked by default
+    'locked' => true,
+    'shared' => false,
+    'type' => 'checkbox',
+    'desc' => _("Strip linebreaks?")
+);
+
+$_prefs['preview_show_unread'] = array(
+    'value' => 1,
+    // Locked by default
+    'locked' => true,
+    'shared' => false,
+    'type' => 'checkbox',
+    'desc' => _("Show previews for unread messages only?")
+);
+
+$_prefs['preview_show_tooltip'] = array(
+    'value' => 0,
+    // Locked by default
+    'locked' => true,
+    'shared' => false,
+    'type' => 'checkbox',
+    'desc' => _("Show previews in tooltips?")
+);
+
+// End Standard View Options
 
-// DIMP Options
+// Dynamic View Options
 
 // Login preferences (dimp)
 $_prefs['dimp_login_view'] = array(
@@ -1651,7 +1655,7 @@ $_prefs['dimp_login_view'] = array(
     'desc' => _("The page to view immediately after login.")
 );
 
-// Other Implicit DIMP preferences
+// Other implicit dynamic view preferences
 $_prefs['dimp_qsearch_field'] = array(
     'value' => 'all',
     'locked' => false,
@@ -1676,7 +1680,7 @@ $_prefs['dimp_toggle_headers'] = array(
     'shared' => false,
     'type' => 'implicit');
 
-// End DIMP Options
+// End Dynamic View Options
 
 // Other entries (used internally in IMP)
 
index 7467fc7..17ff4bc 100644 (file)
@@ -23,6 +23,7 @@ supported.
 
 TODO
 ----
+* removed show_preview config (enabled via show_preview pref)
 * servers.php has changed
 * hooks.php has changed
 * imp_hook_vinfo has been removed - use preauth hook instead
index 466d32a..ad93bb0 100644 (file)
@@ -37,7 +37,9 @@ var ImpFlagPrefs = {
                 id = elt2.readAttribute('id');
                 new ColorPicker({
                     color: $F(elt2),
+                    draggable: true,
                     offsetParent: elt,
+                    resizable: true,
                     update: [[ id, 'value' ], [ id, 'background' ]]
                 });
                 e.stop();
index 4b7afa2..9ba9108 100644 (file)
@@ -653,7 +653,7 @@ class IMP_Contents
             (strpos($id, '.') === false)) {
             $url = Horde_Util::removeParameter(Horde::selfUrl(true), array('actionID', 'imapid', 'index'));
             $url = Horde_Util::addParameter($url, array('actionID' => 'strip_attachment', 'imapid' => $id, 'index' => $this->_index, 'message_token' => Horde::getRequestToken('imp.impcontents')));
-            $part['strip'] = Horde::link($url, _("Strip Attachment"), 'stripAtc', null, "return window.confirm('" . addslashes(_("Are you sure you wish to PERMANENTLY delete this attachment?")) . "');") . '</a>';
+            $part['strip'] = Horde::link($url, _("Strip Attachment"), 'deleteImg', null, "return window.confirm('" . addslashes(_("Are you sure you wish to PERMANENTLY delete this attachment?")) . "');") . '</a>';
         }
 
         return $part;
index ce7d179..ec4f582 100644 (file)
@@ -143,7 +143,7 @@ class IMP_Horde_Mime_Viewer_Images extends Horde_Mime_Viewer_Images
             return array();
         }
 
-        $status = array(sprintf(_("An image named %s is attached to this message. A thumbnail is below."), $this->_mimepart->getName(true)));
+        $status = array(sprintf(_("An image named %s is attached to this message."), $this->_mimepart->getName(true)));
 
         if ($GLOBALS['browser']->hasFeature('javascript')) {
             $status[] = $this->_params['contents']->linkViewJS($this->_mimepart, 'view_attach', $this->_outputImgTag('view_thumbnail', _("View Attachment")), null, null, null);
index ee553d3..80d0d39 100644 (file)
@@ -243,7 +243,7 @@ class IMP_Views_ShowMessage
             IMP_Contents::SUMMARY_DOWNLOAD_ZIP;
 
         $part_info = $part_info_display = array('icon', 'description', 'type', 'size', 'download', 'download_zip');
-        if ($show_parts != 'all') {
+        if ($show_parts == 'atc') {
             array_unshift($part_info, 'id');
         }
 
@@ -260,7 +260,8 @@ class IMP_Views_ShowMessage
             }
 
             if (!($render_mode = $imp_contents->canDisplay($mime_id, IMP_Contents::RENDER_INLINE | IMP_Contents::RENDER_INFO))) {
-                if (($show_parts == 'atc') && $imp_contents->isAttachment($mime_type)) {
+                if (($show_parts == 'atc') &&
+                    $imp_contents->isAttachment($mime_type)) {
                     $atc_parts[] = $mime_id;
                 }
                 continue;
index c322350..551725e 100644 (file)
@@ -228,7 +228,7 @@ if ($conf['user']['allow_folders']) {
 /* Build the list of messages in the mailbox. */
 $imp_mailbox = IMP_Mailbox::singleton($imp_mbox['mailbox']);
 $pageOb = $imp_mailbox->buildMailboxPage(Horde_Util::getFormData('page'), $start);
-$show_preview = ($conf['mailbox']['show_preview'] && $prefs->getValue('preview_enabled'));
+$show_preview = $prefs->getValue('preview_enabled');
 
 $overview_headers = array('x-priority');
 $mbox_info = $imp_mailbox->getMailboxArray(range($pageOb['begin'], $pageOb['end']), array('preview' => $show_preview, 'headers' => $overview_headers, 'structure' => $prefs->getValue('atc_flag')));
@@ -321,7 +321,9 @@ if (isset($filter_url)) {
 $sort_url = Horde_Util::addParameter($mailbox_imp_url, 'sortdir', ($sortpref['dir']) ? 0 : 1);
 
 /* Determine if we are showing previews. */
-$preview_tooltip = ($show_preview) ? $prefs->getValue('preview_show_tooltip') : false;
+$preview_tooltip = $show_preview
+    ? $prefs->getValue('preview_show_tooltip')
+    : false;
 if ($preview_tooltip) {
     Horde::addScriptFile('tooltips.js', 'horde');
 } else {
index 564465c..a963908 100644 (file)
@@ -663,10 +663,10 @@ if (!strlen($msgtext)) {
 
 /* Build the Attachments menu. */
 $a_template->set('atc', Horde::widget('#', _("Attachments"), 'widget hasmenu', '', '', _("Attachments"), true));
-if ($show_parts != 'all') {
+if ($show_parts == 'atc') {
     $a_template->set('show_parts_all', Horde::widget(Horde_Util::addParameter($headersURL, array('show_parts' => 'all')), _("Show All Message Parts"), 'widget', '', '', _("Show All Message Parts"), true));
 }
-if ($show_parts != 'atc') {
+if ($show_parts == 'all') {
     $a_template->set('show_parts_atc', Horde::widget(Horde_Util::addParameter($headersURL, array('show_parts' => 'atc')), _("Show Attachments Only"), 'widget', '', '', _("Show Attachments Only"), true));
 }
 if (count($display_ids) > 2) {
index fa21056..b719ef9 100644 (file)
@@ -59,7 +59,7 @@ $ids = $imp_search->runSearchQuery($query, $mailbox, Horde_Imap_Client::SORT_DAT
 if (!empty($ids)) {
     $imp_ui = new IMP_UI_Mailbox($imp_mbox['mailbox']);
 
-    $overview = $imp_mailbox->getMailboxArray(array_slice($ids, 0, 20), array('preview' => $conf['mailbox']['show_preview'] && $prefs->getValue('preview_enabled')));
+    $overview = $imp_mailbox->getMailboxArray(array_slice($ids, 0, 20), array('preview' => $prefs->getValue('preview_enabled')));
 
     foreach ($overview['overview'] as $ob) {
         $from_addr = $imp_ui->getFrom($ob['envelope'], array('fullfrom' => true));
index d5b5a0b..677e1ae 100644 (file)
@@ -144,6 +144,7 @@ case 'info_public_key':
 case 'view_personal_public_key':
     _textWindowOutput('S/MIME Personal Public Key', $imp_smime->getPersonalPublicKey());
     exit;
+
 case 'info_personal_public_key':
     _printKeyInfo($imp_smime->getPersonalPublicKey());
     exit;
index 6f0816b..3084917 100644 (file)
@@ -1,7 +1,7 @@
 <if:pgpactive>
  <input type="checkbox" id="use_pgp" name="use_pgp" checked="checked" /> <label for="use_pgp"><gettext>Enable PGP functionality?</gettext></label>&nbsp;<tag:overview-help />
  <br />
- <em style="color:red"><gettext>NOTE:</gettext></em> <gettext>PGP support requires popup windows to be used.  If your browser is currently set to disable popup windows, you must change this setting or else the PGP features will not work correctly.</gettext>
+ <em class="redText"><gettext>NOTE:</gettext></em> <gettext>PGP support requires popup windows to be used.  If your browser is currently set to disable popup windows, you must change this setting or else the PGP features will not work correctly.</gettext>
  <br />
 <if:attach_pubkey_notlocked>
  <input type="checkbox" id="pgp_attach_pubkey" name="pgp_attach_pubkey"<if:attach_pubkey> checked="checked"</if:attach_pubkey> /> <label for="pgp_attach_pubkey"><gettext>Should your PGP public key to be attached to your messages by default?</gettext></label>&nbsp;<tag:attach_pubkey-help />
@@ -44,7 +44,7 @@
 </else:empty_pubkey_list></if:empty_pubkey_list>
 
 <if:no_file_upload>
- <br /><span style="color:red"><gettext>Key import is not available. File upload is not enabled on this server.</gettext></span><br />
+ <br /><span class="redText"><gettext>Key import is not available. File upload is not enabled on this server.</gettext></span><br />
 <else:no_file_upload>
 <if:no_source>
  <br /><em><gettext>Key import is not available. You have no address book defined to add your contacts.</gettext></em><br />
index 20d899b..e70da8d 100644 (file)
@@ -5,7 +5,6 @@ $flaglist = $imp_flags->getList(array('div' => true, 'fgcolor' => true));
 
 /* Get the graphics. */
 $picker_img = Horde::img('colorpicker.png', _("Color Picker"), '', $registry->getImageDir('horde'));
-$delete_img = Horde::img('delete.png');
 
 ?>
 <input type="hidden" name="flag_action" id="flag_action" />
@@ -46,7 +45,7 @@ $delete_img = Horde::img('delete.png');
     <input size="7" style="<?php echo $bgstyle ?>;color:<?php echo $fgcolor ?>" id="<?php echo $bgid ?>" name="<?php echo $bgid ?>" value="<?php echo $color ?>" />
     <a class="flagcolorpicker" href="#"><?php echo $picker_img ?></a>
 <?php if (!empty($val['d'])): ?>
-    <a class="flagdelete" href="#"><?php echo $delete_img ?></a>
+    <a class="flagdelete" href="#"><span class="deleteImg"></span></a>
 <?php endif; ?>
    </td>
   </tr>
index c3e2180..58bea09 100644 (file)
@@ -1,6 +1,6 @@
 <?php if (!$prefs->isLocked('nav_audio')): ?>
 <?php $nav_audio = $prefs->getValue('nav_audio') ?>
-<p><?php echo _("Play a sound on new mail?  This requires your browser to support embedded sound files.  Almost all do on Windows and Mac, but other platforms may require a plugin.") ?></p>
+<p><?php echo _("Play a sound on new mail? Although most browsers support embedded sound files, some may require a plugin.") ?></p>
 <ul class="sound-list">
  <li><label><input type="radio" name="nav_audio" value=""<?php if (!$nav_audio) echo ' checked="checked"' ?> /> <?php echo _("No Sound") ?></label></li>
 <?php foreach (glob($registry->get('themesfs') . '/graphics/audio/*.wav') as $sound): $sound = basename($sound); ?>
index 36dd343..c7fa66b 100644 (file)
@@ -1,7 +1,7 @@
 <if:smimeactive>
  <input type="checkbox" id="use_smime" name="use_smime" checked="checked" /> <label for="use_smime"><gettext>Enable S/MIME functionality?</gettext></label>&nbsp;<tag:use_smime_help />
  <br />
- <em style="color:red"><gettext>NOTE:</gettext></em> <gettext>S/MIME support requires popup windows to be used.  If your browser is currently set to disable popup windows, you must change this setting or else the S/MIME features will not work correctly.</gettext>
+ <em class="redText"><gettext>NOTE:</gettext></em> <gettext>S/MIME support requires popup windows to be used.  If your browser is currently set to disable popup windows, you must change this setting or else the S/MIME features will not work correctly.</gettext>
  <br />
 <if:verify_notlocked>
  <input type="checkbox" id="smime_verify" name="smime_verify"<if:smime_verify> checked="checked"</if:smime_verify> /> <label for="smime_verify"><gettext>Should S/MIME signed messages automatically be verified when viewed?</gettext></label>&nbsp;<tag:smime_verify-help />
@@ -36,7 +36,7 @@
 </else:empty_pubkey_list></if:empty_pubkey_list>
 
 <if:no_file_upload>
- <em style="color:red"><gettext>Key import is not available. File upload is not enabled on this server.</gettext></em>
+ <em class="redText"><gettext>Key import is not available. File upload is not enabled on this server.</gettext></em>
 <else:no_file_upload>
 <if:no_source>
  <em><gettext>Key import is not available. You have no address book defined to add your contacts.</gettext></em>
@@ -50,7 +50,7 @@
 
 <div class="header">
  <ul><li><tag:personalkey-help /></li></ul>
- <gettext>Your S/MIME Public/Private Certificates</gettext>
+ <gettext>Your S/MIME Public/Private Certificate</gettext>
 </div>
 
 <div class="prefsContainer item">
@@ -73,8 +73,9 @@
  <tag:personalkey-delete-help /></p>
 <else:has_key>
 <if:no_file_upload>
- <em style="color:red"><gettext>Certificate import is not available. File upload is not enabled on this server.</gettext></em>
+ <em class="redText"><gettext>Certificate import is not available. File upload is not enabled on this server.</gettext></em>
 <else:no_file_upload>
+ <em class="redText"><gettext>No certificate available.</gettext></em>
  <p><input type="submit" name="save" class="button" onclick="<tag:personal_import_url />return false;" value="<gettext>Import Keypair</gettext>" /> <tag:import-cert-help /></p>
 </else:no_file_upload></if:no_file_upload>
 </else:has_key></if:has_key></else:secure_check></if:secure_check>
index 1707fbb..a91d2a7 100644 (file)
@@ -3,7 +3,7 @@
  */
 
 /* Fixes broken inline-block. */
-div.msgflags, span.spellcheckPopdownImg, span.treeImg, .downloadAtc, .downloadZipAtc, .saveImgAtc, .stripAtc, span.mimePartInfo, .mimeStatusMessage {
+div.msgflags, span.spellcheckPopdownImg, span.treeImg, .downloadAtc, .downloadZipAtc, .saveImgAtc, .deleteImg, span.mimePartInfo, .mimeStatusMessage {
     zoom: 1;
     *display: inline;
 }
index 856791a..5762fcb 100644 (file)
@@ -3,7 +3,7 @@
  */
 
 /* Fixes broken inline-block. */
-div.msgflags, span.spellcheckPopdownImg, span.treeImg, .downloadAtc, .downloadZipAtc, .saveImgAtc, .stripAtc, span.mimePartInfo, .mimeStatusMessage {
+div.msgflags, span.spellcheckPopdownImg, span.treeImg, .downloadAtc, .downloadZipAtc, .saveImgAtc, .deleteImg, span.mimePartInfo, .mimeStatusMessage {
     zoom: 1;
     *display: inline;
 }
index 253a3f4..f3d14d0 100644 (file)
@@ -349,6 +349,11 @@ table.accountsmanagement td.noneconfigured {
     font-style: italic;
 }
 
+/* PGP & S/MIME prefs styles. */
+.redText {
+    color: red;
+}
+
 .folderunsub {
     background: #bbb;
     font-style: italic;
@@ -585,7 +590,7 @@ td.addressTr span.loadingImg {
     white-space: nowrap;
 }
 
-.downloadAtc, .downloadZipAtc, .saveImgAtc, .closeImg, .stripAtc, .foldersImg, .searchuiImg {
+.downloadAtc, .downloadZipAtc, .saveImgAtc, .closeImg, .deleteImg, .foldersImg, .searchuiImg {
     display: -moz-inline-stack;
     display: inline-block;
     height: 16px;
@@ -603,7 +608,7 @@ td.addressTr span.loadingImg {
 .saveImgAtc {
     background-image: url("graphics/gallery.png");
 }
-.stripAtc {
+.deleteImg {
     background-image: url("graphics/delete.png");
 }
 .closeImg, .searchuiDelete {
index ec3b0ff..a0c4832 100644 (file)
@@ -86,3 +86,6 @@ span.trashImg {
 .searchuiCalendar {
     background-image: url("graphics/calendar.png");
 }
+.deleteImg {
+    background-image: url("graphics/delete.png");
+}