summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-11-22 09:18:55 +0100
committerAleksander Machniak <alec@alec.pl>2013-11-22 09:18:55 +0100
commit3ab616c7425afed0e4462f89d3bde1723ac471e5 (patch)
tree0051d1e8ab884893ca654a2771b31f0c03777dad
parentb7fb20af3a5c98f291204befdb616fdf5daa22fb (diff)
Fix rowcount when list element contains bot only tr/li elements but also text nodes
-rw-r--r--program/js/list.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/program/js/list.js b/program/js/list.js
index 4ae6c0c66..6f54dd77c 100644
--- a/program/js/list.js
+++ b/program/js/list.js
@@ -91,8 +91,7 @@ init: function()
var r, len, rows = this.tbody.childNodes;
for (r=0, len=rows.length; r<len; r++) {
- this.init_row(rows[r]);
- this.rowcount++;
+ this.rowcount += this.init_row(rows[r]) ? 1 : 0;
}
this.init_header();
@@ -148,6 +147,8 @@ init_row: function(row)
this.row_init(this.rows[uid]); // legacy support
this.triggerEvent('initrow', this.rows[uid]);
+
+ return true;
}
},