summaryrefslogtreecommitdiff
path: root/skins/default/functions.js
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-08-11 10:57:24 +0200
committerAleksander Machniak <alec@alec.pl>2012-08-11 14:53:14 +0200
commit51fcb01f0a86d148b470571c7e32dd089c9b090b (patch)
tree7f701085fa311400c2bfc6b720894ce7bc0b4d4e /skins/default/functions.js
parenta8e478c07cd0a954e2d061b49a18ee9fc1552f6e (diff)
Added separate From and To columns apart from smart From/To column (#1486891)
Conflicts: CHANGELOG program/steps/mail/check_recent.inc program/steps/mail/func.inc program/steps/mail/list.inc program/steps/mail/mark.inc program/steps/mail/move_del.inc program/steps/mail/pagenav.inc program/steps/mail/search.inc skins/larry/mail.css skins/larry/templates/mail.html skins/larry/ui.js
Diffstat (limited to 'skins/default/functions.js')
-rw-r--r--skins/default/functions.js16
1 files changed, 6 insertions, 10 deletions
diff --git a/skins/default/functions.js b/skins/default/functions.js
index 8482e375a..3faf9281f 100644
--- a/skins/default/functions.js
+++ b/skins/default/functions.js
@@ -285,22 +285,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']();