Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/roundcube/roundcubemail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'program/js/list.js')
-rw-r--r--program/js/list.js18
1 files changed, 11 insertions, 7 deletions
diff --git a/program/js/list.js b/program/js/list.js
index ad0ae3dc9..20e85d413 100644
--- a/program/js/list.js
+++ b/program/js/list.js
@@ -356,20 +356,24 @@ insert_row: function(row, before)
// create a real dom node first
if (row.nodeName === undefined) {
// for performance reasons use DOM instead of jQuery here
- var domrow = document.createElement(this.row_tagname());
+ var i, e, domcell, col,
+ domrow = document.createElement(this.row_tagname());
if (row.id) domrow.id = row.id;
if (row.uid) domrow.uid = row.uid;
if (row.className) domrow.className = row.className;
if (row.style) $.extend(domrow.style, row.style);
- for (var e, domcell, col, i=0; row.cols && i < row.cols.length; i++) {
+ for (i=0; row.cols && i < row.cols.length; i++) {
col = row.cols[i];
- domcell = document.createElement(this.col_tagname());
- if (col.className) domcell.className = col.className;
- if (col.innerHTML) domcell.innerHTML = col.innerHTML;
- for (e in col.events)
- domcell['on' + e] = col.events[e];
+ domcell = col.dom;
+ if (!domcell) {
+ domcell = document.createElement(this.col_tagname());
+ if (col.className) domcell.className = col.className;
+ if (col.innerHTML) domcell.innerHTML = col.innerHTML;
+ for (e in col.events)
+ domcell['on' + e] = col.events[e];
+ }
domrow.appendChild(domcell);
}