From: Michael M Slusarz Date: Tue, 20 Oct 2009 22:16:11 +0000 (-0600) Subject: Remove basic search from DIMP X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=f814df011985d6896b4b73ad51952c0f38ddc56d;p=horde.git Remove basic search from DIMP --- diff --git a/imp/ajax.php b/imp/ajax.php index 1b26a768f..9e280ddba 100644 --- a/imp/ajax.php +++ b/imp/ajax.php @@ -826,15 +826,6 @@ case 'SMIMEPersonal': } break; - -case 'BasicSearch': - $result = new stdClass; - $imp_ui_search = new IMP_UI_Search(); - parse_str(Horde_Util::getPost('query'), $query); - /* parse_str() silently adds slash escaping to variables in $query. */ - $query = array_map('stripslashes', $query); - $result->view = $imp_search->createSearchID($imp_ui_search->processBasicSearch($query['search_basic_mbox'], $query['search_criteria'], $query['search_criteria_text'], !empty($query['search_criteria_not']), $query['search_flags'])); - break; } if ($check_uidvalidity) { diff --git a/imp/js/DimpBase.js b/imp/js/DimpBase.js index 2baa99b33..ffba8bfc4 100644 --- a/imp/js/DimpBase.js +++ b/imp/js/DimpBase.js @@ -792,12 +792,6 @@ var DimpBase = { this.purgeDeleted(); break; - case 'ctx_qsearchopts_basic': - RedBox.overlay = true; - RedBox.loading(); - new Ajax.Request(DIMP.conf.URI_SEARCH_BASIC, { parameters: DimpCore.addRequestParams($H({ search_mailbox: this.folder })), onComplete: function(r) { RedBox.showHtml(r.responseText); } }); - break; - case 'ctx_vfolder_edit': tmp = { edit_query: baseelt.up('LI').retrieve('mbox') }; // Fall through @@ -1393,15 +1387,6 @@ var DimpBase = { $('qsearch_close').hide(); }, - _basicSearchCallback: function(r) - { - r = r.response; - RedBox.close(); - this.sfolder = this.folder; - this._quicksearchDeactivate(); - this.go('folder:' + r.view); - }, - _quicksearchDeactivate: function() { $('qsearch_close').show(); @@ -1799,15 +1784,6 @@ var DimpBase = { this._closeRedBox(); e.stop(); return; - } else if (elt.hasClassName('basicSearchCancel')) { - RedBox.close(); - e.stop(); - return; - } else if (elt.hasClassName('basicSearchSubmit')) { - elt.disable(); - DimpCore.doAction('BasicSearch', { query: $('RB_window').down().serialize() }, null, this._basicSearchCallback.bind(this)); - e.stop(); - return; } } diff --git a/imp/search-basic.php b/imp/search-basic.php index 6d91190c8..4a08e8679 100644 --- a/imp/search-basic.php +++ b/imp/search-basic.php @@ -57,7 +57,6 @@ foreach ($imp_search->flagFields() as $key => $val) { /* Prepare the search template. */ $t = new Horde_Template(); $t->setOption('gettext', true); -$t->set('dimpview', $_SESSION['imp']['view'] == 'dimp'); $t->set('action', Horde::applicationUrl('search-basic.php')); $t->set('mbox', htmlspecialchars($search_mailbox)); @@ -65,22 +64,15 @@ $t->set('search_title', sprintf(_("Search %s"), htmlspecialchars(IMP::displayFol $t->set('s_fields', $s_fields); $t->set('f_fields', $f_fields); -if ($t->get('dimpview')) { - $t->set('hide_criteria', true); -} else { - $title = _("Search"); - IMP::prepareMenu(); - require IMP_TEMPLATES . '/common-header.inc'; - IMP::menu(); - IMP::status(); +$title = _("Search"); +IMP::prepareMenu(); +require IMP_TEMPLATES . '/common-header.inc'; +IMP::menu(); +IMP::status(); - if ($browser->hasFeature('javascript')) { - $t->set('advsearch', Horde::link(Horde_Util::addParameter(Horde::applicationUrl('search.php'), array('search_mailbox' => $search_mailbox)))); - } +if ($browser->hasFeature('javascript')) { + $t->set('advsearch', Horde::link(Horde_Util::addParameter(Horde::applicationUrl('search.php'), array('search_mailbox' => $search_mailbox)))); } echo $t->fetch(IMP_TEMPLATES . '/search/search-basic.html'); - -if (!$t->get('dimpview')) { - require $registry->get('templates', 'horde') . '/common-footer.inc'; -} +require $registry->get('templates', 'horde') . '/common-footer.inc'; diff --git a/imp/templates/index/index-dimp.inc b/imp/templates/index/index-dimp.inc index cf341fa6b..66fdb8afe 100644 --- a/imp/templates/index/index-dimp.inc +++ b/imp/templates/index/index-dimp.inc @@ -443,7 +443,6 @@ function _simpleButton($id, $text, $image) diff --git a/imp/templates/search/search-basic.html b/imp/templates/search/search-basic.html index e7ee193f9..f9a701f75 100644 --- a/imp/templates/search/search-basic.html +++ b/imp/templates/search/search-basic.html @@ -45,8 +45,5 @@
- - -