summaryrefslogtreecommitdiff
path: root/roundcubemail/program
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-04-13 10:55:16 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-04-13 10:55:16 +0000
commit2aeb486b89a3afa16677d335b0b8245d5db4a8c0 (patch)
tree21d89521ed8d68c8f818f9cd0f5086310bdfdbfc /roundcubemail/program
parentad168849b694462dcc68734fedd3e9e84da0e46d (diff)
- Fixed possible js error occurance (#1487872)
git-svn-id: https://svn.roundcube.net/trunk@4651 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program')
-rw-r--r--roundcubemail/program/js/app.js20
1 files changed, 11 insertions, 9 deletions
diff --git a/roundcubemail/program/js/app.js b/roundcubemail/program/js/app.js
index 8d94e0206..5826636a7 100644
--- a/roundcubemail/program/js/app.js
+++ b/roundcubemail/program/js/app.js
@@ -4854,17 +4854,18 @@ function rcube_webmail()
// and for setting some message list global variables
this.set_message_coltypes = function(coltypes, repl)
{
- this.env.coltypes = coltypes;
+ var list = this.message_list,
+ thead = list ? list.list.tHead : null,
+ cell, col, n, len, th, tr;
- // set correct list titles
- var thead = this.gui_objects.messagelist ? this.gui_objects.messagelist.tHead : null,
- cell, col, n, len;
+ this.env.coltypes = coltypes;
// replace old column headers
if (thead) {
if (repl) {
- var th = document.createElement('thead'),
- tr = document.createElement('tr');
+ th = document.createElement('thead');
+ tr = document.createElement('tr');
+
for (c=0, len=repl.length; c < len; c++) {
cell = document.createElement('td');
cell.innerHTML = repl[c].html;
@@ -4898,15 +4899,16 @@ function rcube_webmail()
if ((n = $.inArray('subject', this.env.coltypes)) >= 0) {
this.set_env('subject_col', n);
- if (this.message_list)
- this.message_list.subject_col = n;
+ if (list)
+ list.subject_col = n;
}
if ((n = $.inArray('flag', this.env.coltypes)) >= 0)
this.set_env('flagged_col', n);
if ((n = $.inArray('status', this.env.coltypes)) >= 0)
this.set_env('status_col', n);
- this.message_list.init_header();
+ if (list)
+ list.init_header();
};
// replace content of row count display