diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-03-03 12:11:04 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-03-03 12:11:04 +0000 |
| commit | 39e347ed53c24c87c7d74266306c986830e09ade (patch) | |
| tree | 66f7f7cec2568ea798b197fb253a525fa2af83cd /roundcubemail/skins/default | |
| parent | be2f37f2eb8989dbc8823cc2d1919839926351a4 (diff) | |
Remember search modifiers in user prefs (#1486146) + bring back the old defaults
git-svn-id: https://svn.roundcube.net/trunk@3310 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/skins/default')
| -rw-r--r-- | roundcubemail/skins/default/functions.js | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/roundcubemail/skins/default/functions.js b/roundcubemail/skins/default/functions.js index 28af2e7e7..3a295decb 100644 --- a/roundcubemail/skins/default/functions.js +++ b/roundcubemail/skins/default/functions.js @@ -161,12 +161,12 @@ show_searchmenu: function(show) if (show && ref) { var pos = $(ref).offset(); this.searchmenu.css({ left:pos.left, top:(pos.top + ref.offsetHeight + 2)}); + this.searchmenu.find(":checked").attr('checked', false); if (rcmail.env.search_mods) { - for (var n in rcmail.env.search_mods) { - box = rcube_find_object('s_mod_' + n); - box.checked = 'checked'; - } + var search_mods = rcmail.env.search_mods[rcmail.env.mailbox] ? rcmail.env.search_mods[rcmail.env.mailbox] : rcmail.env.search_mods['*']; + for (var n in search_mods) + $('#s_mod_' + n).attr('checked', true); } } this.searchmenu[show?'show':'hide'](); @@ -177,10 +177,13 @@ set_searchmod: function(elem) if (!rcmail.env.search_mods) rcmail.env.search_mods = new Object(); + if (!rcmail.env.search_mods[rcmail.env.mailbox]) + rcmail.env.search_mods[rcmail.env.mailbox] = rcube_clone_object(rcmail.env.search_mods['*']); + if (!elem.checked) - delete(rcmail.env.search_mods[elem.value]); + delete(rcmail.env.search_mods[rcmail.env.mailbox][elem.value]); else - rcmail.env.search_mods[elem.value] = elem.value; + rcmail.env.search_mods[rcmail.env.mailbox][elem.value] = elem.value; }, body_mouseup: function(evt, p) |
