From: Michael M Slusarz Date: Sat, 5 Dec 2009 02:43:05 +0000 (-0700) Subject: Make sure search criteria is opened up if recent search is selected X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=f8e28dd834dbe07f5927e8c41ee6b35887adbd66;p=horde.git Make sure search criteria is opened up if recent search is selected --- diff --git a/imp/js/search.js b/imp/js/search.js index 60147ff02..e4534ec93 100644 --- a/imp/js/search.js +++ b/imp/js/search.js @@ -122,6 +122,9 @@ var ImpSearch = { switch (elt.readAttribute('id')) { case 'recent_searches': this.updateSearchCriteria(this.saved_searches[$F(elt)]); + if (!$('search_criteria_table').up().visible()) { + this._toggleHeader($('search_criteria_table').up().previous()); + } elt.clear(); break; @@ -407,10 +410,7 @@ var ImpSearch = { default: if (elt.hasClassName('arrowExpanded') || elt.hasClassName('arrowCollapsed')) { - elt.up().down().toggle().next().toggle().up().next().toggle(); - if (elt.descendantOf('search_folders_hdr')) { - elt.next('SPAN.searchuiFoldersActions').toggle(); - } + this._toggleHeader(elt.up()); } else if (elt.hasClassName('searchuiDelete')) { this.deleteCriteria(elt.up('TR')); e.stop(); @@ -428,6 +428,14 @@ var ImpSearch = { } }, + _toggleHeader: function(elt) + { + elt.down().toggle().next().toggle().up().next().toggle(); + if (elt.descendantOf('search_folders_hdr')) { + elt.next('SPAN.searchuiFoldersActions').toggle(); + } + }, + _showFoldersCallback: function(flist, r) { this.updateFolderList(r.responseJSON);