From 9429087f67d5babe32ff496eadca52788e9f2547 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Fri, 18 Apr 2014 16:53:12 +0200 Subject: Add multi-folder search capabilities to classic skin (#1485234) --- skins/classic/functions.js | 43 +++++++++++++++++++++++---------------- skins/classic/mail.css | 10 +++++++++ skins/classic/templates/mail.html | 6 +++++- 3 files changed, 40 insertions(+), 19 deletions(-) (limited to 'skins/classic') diff --git a/skins/classic/functions.js b/skins/classic/functions.js index 144923d0d..7445dba80 100644 --- a/skins/classic/functions.js +++ b/skins/classic/functions.js @@ -202,11 +202,13 @@ searchmenu: function(show) var n, all, list = $('input:checkbox[name="s_mods[]"]', obj), mbox = rcmail.env.mailbox, - mods = rcmail.env.search_mods; + mods = rcmail.env.search_mods, + scope = rcmail.env.search_scope || 'base'; if (rcmail.env.task == 'mail') { mods = mods[mbox] ? mods[mbox] : mods['*']; all = 'text'; + $('input:radio[name="s_scope"]').prop('checked', false).filter('#s_scope_'+scope).prop('checked', true); } else { all = '*'; @@ -231,7 +233,11 @@ set_searchmod: function(elem) { var all, m, task = rcmail.env.task, mods = rcmail.env.search_mods, - mbox = rcmail.env.mailbox; + mbox = rcmail.env.mailbox, + scope = $('input[name="s_scope"]:checked').val(); + + if (scope == 'all') + mbox = '*'; if (!mods) mods = {}; @@ -253,23 +259,24 @@ set_searchmod: function(elem) m[elem.value] = 1; // mark all fields - if (elem.value != all) - return; - - $('input:checkbox[name="s_mods[]"]').map(function() { - if (this == elem) - return; + if (elem.value == all) { + $('input:checkbox[name="s_mods[]"]').map(function() { + if (this == elem) + return; + + this.checked = true; + if (elem.checked) { + this.disabled = true; + delete m[this.value]; + } + else { + this.disabled = false; + m[this.value] = 1; + } + }); + } - this.checked = true; - if (elem.checked) { - this.disabled = true; - delete m[this.value]; - } - else { - this.disabled = false; - m[this.value] = 1; - } - }); + rcmail.set_searchmods(m); }, listmenu: function(show) diff --git a/skins/classic/mail.css b/skins/classic/mail.css index b1c8a0ea9..fc066e023 100644 --- a/skins/classic/mail.css +++ b/skins/classic/mail.css @@ -1010,6 +1010,16 @@ table.messagelist.fixedcopy padding: 0 2px; } +.messagelist tr td.folder +{ + width: 135px; +} + +.messagelist tr td.hidden +{ + display: none; +} + .messagelist tr.message { background-color: #FFF; diff --git a/skins/classic/templates/mail.html b/skins/classic/templates/mail.html index e760eb4fd..7a169c8ab 100644 --- a/skins/classic/templates/mail.html +++ b/skins/classic/templates/mail.html @@ -114,6 +114,10 @@
  • +
  • +
  • +
  • +
  • @@ -138,7 +142,7 @@ -- cgit v1.2.3