this.go('search', tmp);
break;
- case 'ctx_qsearchopts_all':
- case 'ctx_qsearchopts_body':
- case 'ctx_qsearchopts_from':
- case 'ctx_qsearchopts_to':
- case 'ctx_qsearchopts_subject':
- DIMP.conf.qsearchfield = id.substring(16);
+ case 'ctx_qsearchby_all':
+ case 'ctx_qsearchby_body':
+ case 'ctx_qsearchby_from':
+ case 'ctx_qsearchby_to':
+ case 'ctx_qsearchby_subject':
+ DIMP.conf.qsearchfield = id.substring(14);
this._updatePrefs('dimp_qsearch_field', DIMP.conf.qsearchfield);
if (!$('qsearch').hasClassName('qsearchActive')) {
this._setQsearchText(true);
tmp.compact().invoke(this.viewport.getSelected().size() ? 'show' : 'hide');
break;
- case 'ctx_qsearchopts':
+ case 'ctx_qsearchby':
$(ctx_id).descendants().invoke('removeClassName', 'contextSelected');
$(ctx_id + '_' + DIMP.conf.qsearchfield).addClassName('contextSelected');
break;
// d = (boolean) Deactivate quicksearch input?
_setQsearchText: function(d)
{
- $('qsearch_input').setValue(d ? DIMP.text.search + ' (' + $('ctx_qsearchopts_' + DIMP.conf.qsearchfield).getText() + ')' : '');
+ $('qsearch_input').setValue(d ? DIMP.text.search + ' (' + $('ctx_qsearchby_' + DIMP.conf.qsearchfield).getText() + ')' : '');
[ $('qsearch') ].invoke(d ? 'removeClassName' : 'addClassName', 'qsearchActive');
$('qsearch_close').hide();
},
if ($('qsearch')) {
$('qsearch_input').observe('blur', this._quicksearchOnBlur.bind(this));
this._addMouseEvents({ id: 'qsearch_icon', left: true, offset: 'qsearch', type: 'qsearchopts' });
+ DM.addSubMenu('ctx_qsearchopts_by', 'ctx_qsearchby');
}
/* Start message list loading as soon as possible. */
<?php if ($_SESSION['imp']['protocol'] != 'pop'): ?>
<div class="context" id="ctx_qsearchopts" style="display:none">
+ <a id="ctx_qsearchopts_by" class="sep"><?php echo _("Search By") ?></a>
<a id="ctx_qsearchopts_basic"><?php echo _("Basic Search...") ?></a>
- <a id="ctx_qsearchopts_advanced" class="sep"><?php echo _("Advanced Search...") ?></a>
- <a id="ctx_qsearchopts_all"><?php echo _("Entire Message") ?></a>
- <a id="ctx_qsearchopts_body"><?php echo _("Body") ?></a>
- <a id="ctx_qsearchopts_from"><?php echo _("From") ?></a>
- <a id="ctx_qsearchopts_to"><?php echo _("To") ?></a>
- <a id="ctx_qsearchopts_subject"><?php echo _("Subject") ?></a>
+ <a id="ctx_qsearchopts_advanced"><?php echo _("Advanced Search...") ?></a>
+</div>
+
+<div class="context" id="ctx_qsearchby" style="display:none">
+ <a id="ctx_qsearchby_all"><?php echo _("Entire Message") ?></a>
+ <a id="ctx_qsearchby_body"><?php echo _("Body") ?></a>
+ <a id="ctx_qsearchby_from"><?php echo _("From") ?></a>
+ <a id="ctx_qsearchby_to"><?php echo _("To") ?></a>
+ <a id="ctx_qsearchby_subject"><?php echo _("Subject") ?></a>
</div>
<?php endif; ?>