Disable dimp quicksearch on pop servers
authorMichael M Slusarz <slusarz@curecanti.org>
Thu, 30 Jul 2009 18:52:52 +0000 (12:52 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Thu, 30 Jul 2009 20:13:22 +0000 (14:13 -0600)
imp/js/src/DimpBase.js
imp/templates/index/index-dimp.inc

index ad0d28d..a276f16 100644 (file)
@@ -88,7 +88,9 @@ var DimpBase = {
         // from the search input, because the user may immediately start
         // keyboard navigation after that. Thus, we need to ensure that a
         // message click loses focus on the search input.
-        $('qsearch_input').blur();
+        if ($('qsearch')) {
+            $('qsearch_input').blur();
+        }
 
         if (opts.shift) {
             if (selcount) {
@@ -2451,7 +2453,6 @@ var DimpBase = {
         /* Add popdown menus. Check for disabled compose at the same time. */
         this._addMouseEvents({ id: 'button_other', type: 'otheractions' }, $('button_other'));
         this._addMouseEvents({ id: 'folderopts', type: 'folderopts' }, $('folderopts').down(1));
-        this._addMouseEvents({ id: 'qsearch_icon', left: true, offset: 'qsearch', type: 'qsearchopts' });
 
         DM.addSubMenu('ctx_message_reply', 'ctx_reply');
         [ 'ctx_message_', 'oa_', 'ctx_draft_' ].each(function(i) {
@@ -2485,7 +2486,10 @@ var DimpBase = {
         this.setPoll();
 
         /* Init quicksearch. */
-        $('qsearch_input').observe('blur', this._quicksearchOnBlur.bind(this));
+        if ($('qsearch')) {
+            $('qsearch_input').observe('blur', this._quicksearchOnBlur.bind(this));
+            this._addMouseEvents({ id: 'qsearch_icon', left: true, offset: 'qsearch', type: 'qsearchopts' });
+        }
 
         if (DimpCore.is_ie6) {
             /* Disable text selection in preview pane for IE 6. */
index 28bf8b2..b37d455 100644 (file)
@@ -174,6 +174,7 @@ function _simpleButton($id, $text, $image, $imagedir = null)
      </div>
 
      <div class="dimpActions">
+<?php if ($_SESSION['imp']['protocol'] != 'pop'): ?>
       <div id="qsearch">
        <span id="qsearch_icon"></span>
        <form action="#" method="post">
@@ -183,6 +184,7 @@ function _simpleButton($id, $text, $image, $imagedir = null)
         <?php echo Horde::img('close.png', '', array('id' => 'qsearch_close', 'style' => 'display:none', 'title' => _("Clear Search")), $hordeimg) ?>
        </span>
       </div>
+<?php endif; ?>
       <span>
        <?php _createDA(_("Reply"), 'Reply', 'button_reply', 'noselectDisable', $show_text) ?>
       </span>
@@ -440,12 +442,14 @@ function _simpleButton($id, $text, $image, $imagedir = null)
  <a id="ctx_contacts_add"><span class="contextImg"></span><?php echo _("Add to Address Book") ?></a>
 </div>
 
+<?php if ($_SESSION['imp']['protocol'] != 'pop'): ?>
 <div class="context" id="ctx_qsearchopts" style="display:none">
  <a id="ctx_qsearchopts_all"><?php echo _("Entire Message") ?></a>
  <a id="ctx_qsearchopts_body"><?php echo _("Body") ?></a>
  <a id="ctx_qsearchopts_from"><?php echo _("From") ?></a>
  <a id="ctx_qsearchopts_subject"><?php echo _("Subject") ?></a>
 </div>
+<?php endif; ?>
 
 <div style="display:none">
  <span id="largeaddrspan">