From 9242ad14ca88a475162b2ce47cc73ca4e38fc040 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Sat, 11 Apr 2009 17:05:12 -0600 Subject: [PATCH] Remove search-as-you-type and revert to more expected search-on-ENTER --- imp/js/src/DimpBase.js | 22 ++++------------------ imp/templates/index/index-dimp.inc | 4 ++-- 2 files changed, 6 insertions(+), 20 deletions(-) diff --git a/imp/js/src/DimpBase.js b/imp/js/src/DimpBase.js index ed0c1ad13..6b2e5bb8f 100644 --- a/imp/js/src/DimpBase.js +++ b/imp/js/src/DimpBase.js @@ -11,7 +11,7 @@ var DimpBase = { // Vars used and defaulting to null/false: // cfolderaction, filter_on, filtertoggle, fl_visible, folder, // folderswitch, fspecial, isvisible, message_list_template, offset, - // pollPE, pp, searchobserve, uid, viewport + // pollPE, pp, uid, viewport bcache: $H(), cacheids: {}, lastrow: -1, @@ -1254,10 +1254,6 @@ var DimpBase = { } this.filter_on = false; - if (this.searchobserve) { - clearTimeout(this.searchobserve); - this.searchobserve = null; - } this._setFilterText(true); Effect.SlideUp($('qoptions').up(), { duration: 0.5, afterFinish: this.onResize.bind(this, reset) }); this.filtertoggle = 2; @@ -1394,6 +1390,9 @@ var DimpBase = { if (form.readAttribute('id') == 'RB_folder') { this.cfolderaction(e); e.stop(); + } else if (elt.readAttribute('id') == 'msgList_filter') { + this.searchfilterRun(); + e.stop(); } break; } @@ -1487,18 +1486,6 @@ var DimpBase = { } }, - keyupHandler: function(e) - { - if (e.element().readAttribute('id') == 'msgList_filter') { - if (this.searchobserve) { - clearTimeout(this.searchobserve); - } - if (this.filter_on) { - this.searchobserve = (this.bcache.get('searchfilterR') || this.bcache.set('searchfilterR', this.searchfilterRun.bind(this))).delay(0.5); - } - } - }, - dblclickHandler: function(e) { if (e.isRightClick()) { @@ -2310,7 +2297,6 @@ var DimpBase = { /* Register global handlers now. */ document.observe('keydown', this.keydownHandler.bindAsEventListener(this)); - document.observe('keyup', this.keyupHandler.bindAsEventListener(this)); document.observe('mouseover', this.mouseHandler.bindAsEventListener(this, 'over')); document.observe('dblclick', this.dblclickHandler.bindAsEventListener(this)); Event.observe(window, 'resize', this.onResize.bind(this, false, false)); diff --git a/imp/templates/index/index-dimp.inc b/imp/templates/index/index-dimp.inc index 0e7d564e9..a9c88cfaf 100644 --- a/imp/templates/index/index-dimp.inc +++ b/imp/templates/index/index-dimp.inc @@ -174,8 +174,8 @@ function _simpleButton($id, $text, $image, $imagedir = null)
-
- + +
-- 2.11.0