Skip to content

Commit

Permalink
Fixes for when to display the quicksearch box
Browse files Browse the repository at this point in the history
  • Loading branch information
slusarz committed Jan 30, 2015
1 parent 0f2e99e commit e3e8db0
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 14 deletions.
17 changes: 8 additions & 9 deletions imp/js/base.js
Expand Up @@ -273,6 +273,9 @@ var ImpBase = {

this.highlightSidebar();
this.setTitle(ImpCore.text.search);

$('horde-search').hide();

$('impbase_iframe').insert(
new Element('IFRAME', {
src: HordeCore.addURLParam(ImpCore.conf.URI_SEARCH, data)
Expand Down Expand Up @@ -724,6 +727,10 @@ var ImpBase = {

this.updateTitle();

[ $('horde-search') ].compact().invoke(
(!this.isSearch() || this.isQSearch() || this.isFSearch()) ? 'show' : 'hide'
);

if (this.viewswitch) {
if (this.selectedCount()) {
if (ImpCore.getPref('preview')) {
Expand All @@ -734,15 +741,7 @@ var ImpBase = {
this.resetSelected();
}

tmp = $('filter');
if (this.isSearch()) {
tmp.hide();
if (!this.search || !this.search.qsearch) {
$('horde-search').hide();
}
} else if (tmp) {
tmp.show();
}
[ $('filter') ].compact().invoke(this.isSearch() ? 'hide' : 'show');

if (this.viewport.getMetaData('drafts')) {
$('button_resume').up().show();
Expand Down
2 changes: 1 addition & 1 deletion imp/js/search.js
Expand Up @@ -546,7 +546,7 @@ var ImpSearch = {
this.resetMailboxes();
return;

case 'search_dynamic_return':
case 'search_return':
e.memo.hordecore_stop = true;
window.parent.ImpBase.go('mbox', this.data.searchmbox);
break;
Expand Down
4 changes: 1 addition & 3 deletions imp/lib/Basic/Search.php
Expand Up @@ -505,9 +505,7 @@ protected function _init()
)), array('onload' => true));

if ($dynamic_view) {
if (!$this->vars->edit_query) {
$view->return_mailbox_val = sprintf(_("Return to %s"), $default_mailbox->display_html);
}
$view->return_mailbox_val = sprintf(_("Return to %s"), $default_mailbox->display_html);
$page_output->topbar = $page_output->sidebar = false;
$this->header_params = array(
'html_id' => 'htmlAllowScroll'
Expand Down
2 changes: 1 addition & 1 deletion imp/templates/search/search.html.php
Expand Up @@ -110,7 +110,7 @@
<input type="button" id="search_reset" value="<?php echo _("Reset") ?>" />
<?php endif; ?>
<?php if ($this->return_mailbox_val): ?>
<input type="button" id="search_dynamic_return" value="<?php echo $this->return_mailbox_val ?>" />
<input type="button" id="search_return" value="<?php echo $this->return_mailbox_val ?>" />
<?php endif; ?>
</div>
</form>
Expand Down

0 comments on commit e3e8db0

Please sign in to comment.