From 628706acdcb973154161b5862c30ce706a08455a Mon Sep 17 00:00:00 2001 From: Thomas Date: Wed, 9 Oct 2013 12:04:17 +0200 Subject: Prepare message list to display IMAP folder --- program/js/app.js | 4 +++- program/js/list.js | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) (limited to 'program/js') diff --git a/program/js/app.js b/program/js/app.js index 654faa024..55387c0ed 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -6399,8 +6399,10 @@ function rcube_webmail() if ((n = $.inArray('status', this.env.coltypes)) >= 0) this.env.status_col = n; - if (list) + if (list) { + list.hide_column('folder', !(this.env.search_request || this.env.search_id)); list.init_header(); + } }; // replace content of row count display diff --git a/program/js/list.js b/program/js/list.js index 022ed3180..319807eae 100644 --- a/program/js/list.js +++ b/program/js/list.js @@ -381,6 +381,20 @@ blur: function() }, +/** + * Set/unset the given column as hidden + */ +hide_column: function(col, hide) +{ + var method = hide ? 'addClass' : 'removeClass'; + + if (this.fixed_header) + $(this.row_tagname()+' '+this.col_tagname()+'.'+col, this.fixed_header)[method]('hidden'); + + $(this.row_tagname()+' '+this.col_tagname()+'.'+col, this.list)[method]('hidden'); +}, + + /** * onmousedown-handler of message list column */ -- cgit v1.2.3