From 727d48cf7284bfbd41593cf7e21da7083bbfbde6 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Thu, 30 Jul 2009 12:52:52 -0600 Subject: [PATCH] Disable dimp quicksearch on pop servers --- imp/js/src/DimpBase.js | 10 +++++++--- imp/templates/index/index-dimp.inc | 4 ++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/imp/js/src/DimpBase.js b/imp/js/src/DimpBase.js index ad0d28d51..a276f169f 100644 --- a/imp/js/src/DimpBase.js +++ b/imp/js/src/DimpBase.js @@ -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. */ diff --git a/imp/templates/index/index-dimp.inc b/imp/templates/index/index-dimp.inc index 28bf8b256..b37d45578 100644 --- a/imp/templates/index/index-dimp.inc +++ b/imp/templates/index/index-dimp.inc @@ -174,6 +174,7 @@ function _simpleButton($id, $text, $image, $imagedir = null)
+
@@ -183,6 +184,7 @@ function _simpleButton($id, $text, $image, $imagedir = null) 'qsearch_close', 'style' => 'display:none', 'title' => _("Clear Search")), $hordeimg) ?>
+ @@ -440,12 +442,14 @@ function _simpleButton($id, $text, $image, $imagedir = null)
+ +
-- 2.11.0