diff options
author | Aleksander Machniak <alec@alec.pl> | 2012-08-11 10:57:24 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2012-08-11 10:57:24 +0200 |
commit | e0efd8f5dc9bcdb7559c71386aa3c91c1230e8d3 (patch) | |
tree | fae2e6c0a49aee23348e1e305d2582114cab5f6e /skins/classic/functions.js | |
parent | c4a2264ae7a4f333116a558c104dbc0f98aab774 (diff) |
Added separate From and To columns apart from smart From/To column (#1486891)
Diffstat (limited to 'skins/classic/functions.js')
-rw-r--r-- | skins/classic/functions.js | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/skins/classic/functions.js b/skins/classic/functions.js index 48f9acd75..9b83b9044 100644 --- a/skins/classic/functions.js +++ b/skins/classic/functions.js @@ -298,22 +298,18 @@ listmenu: function(show) pos.left = pos.left - menuwidth; obj.css({ left:pos.left, top:(pos.top + ref.offsetHeight + 2)}); + // set form values $('input[name="sort_col"][value="'+rcmail.env.sort_col+'"]').prop('checked', true); $('input[name="sort_ord"][value="DESC"]').prop('checked', rcmail.env.sort_order == 'DESC'); $('input[name="sort_ord"][value="ASC"]').prop('checked', rcmail.env.sort_order != 'DESC'); $('input[name="view"][value="thread"]').prop('checked', rcmail.env.threading ? true : false); $('input[name="view"][value="list"]').prop('checked', rcmail.env.threading ? false : true); - // list columns - var found, cols = $('input[name="list_col[]"]'); - for (var i=0; i<cols.length; i++) { - if (cols[i].value != 'from') - found = jQuery.inArray(cols[i].value, rcmail.env.coltypes) != -1; - else - found = (jQuery.inArray('from', rcmail.env.coltypes) != -1 - || jQuery.inArray('to', rcmail.env.coltypes) != -1); - $(cols[i]).prop('checked', found); - } + + // set checkboxes + $('input[name="list_col[]"]').each(function() { + $(this).prop('checked', jQuery.inArray(this.value, rcmail.env.coltypes) != -1); + }); } obj[show?'show':'hide'](); |