function _getListMessages($mbox, $change)
{
$args = array(
+ 'applyfilter' => Horde_Util::getPost('applyfilter'),
'cached' => Horde_Util::getPost('cached'),
'cacheid' => Horde_Util::getPost('cacheid'),
'mbox' => $mbox,
v5.0-git
--------
+[mms] Allow on-demand filter application (if filter backend supports) in DIMP.
[mms] Add full IMAP subscription support to DIMP.
[mms] Add message information to preview screen (DIMP).
[mms] Add Alt + PGUP/PGDN shortcut to scroll through preview message (DIMP).
if (this.folderswitch) {
this.folderswitch = false;
+ tmp = $('applyfilterlink');
+ if (tmp) {
+ if (this.isSearch() ||
+ (!DIMP.conf.filter_any &&
+ this.folder.toUpperCase() != 'INBOX')) {
+ tmp.hide();
+ } else {
+ tmp.show();
+ }
+ }
+
if (this.folder == DIMP.conf.spam_mbox) {
if (!DIMP.conf.spam_spammbox && $('button_spam')) {
[ $('button_spam').up(), $('ctx_message_spam') ].invoke('hide');
e.stop();
return;
+ case 'applyfilterlink':
+ if (this.viewport) {
+ this.viewport.reload({ applyfilter: 1 });
+ }
+ e.stop();
+ return;
+
case 'appportal':
case 'appoptions':
this.go(id.substring(3));
/**
* Returns a list of messages for use with ViewPort.
*
- * @var array $args TODO
+ * @var array $args TODO (applyfilter)
*
* @return array TODO
*/
/* Run filters now. */
if (!empty($_SESSION['imp']['filteravail']) &&
- ($mbox == 'INBOX') &&
- $GLOBALS['prefs']->getValue('filter_on_display')) {
+ !empty($args['applyfilter']) ||
+ (($mbox == 'INBOX') &&
+ $GLOBALS['prefs']->getValue('filter_on_display'))) {
$imp_filter = new IMP_Filter();
$imp_filter->filter($mbox);
}
<?php echo _simpleButton('fetchmaillink', _("_Fetch Mail"), 'fetchmail.png') ?>
<?php endif; ?>
<?php echo _simpleButton('alertsloglink', _("Alerts _Log"), 'info_icon.png', $hordeimg) ?>
+<?php if (!empty($_SESSION['imp']['filteravail'])): ?>
+ <?php echo _simpleButton('applyfilterlink', _("Apply Filter"), 'filters.png') ?>
+<?php endif; ?>
</ul>
<div class="sepfull" style="width:<?php echo $sidebar_width ?>"></div>
<ul id="serviceActions">
'buffer_pages' => intval($GLOBALS['conf']['dimp']['viewport']['buffer_pages']),
'debug' => intval(!empty($GLOBALS['conf']['dimp']['js']['debug'])),
'disable_compose' => intval(!empty($GLOBALS['conf']['hooks']['disable_compose']) && Horde::callHook('_imp_hook_disable_compose', array(), 'imp')),
+ 'filter_any' => intval($GLOBALS['prefs']->getValue('filter_any_mailbox')),
'fixed_folders' => empty($GLOBALS['conf']['server']['fixed_folders'])
? array()
: array_map(array('DIMP', '_appendedFolderPref'), $GLOBALS['conf']['server']['fixed_folders']),