From ac50bf72862c5c859b6f8cf1c264be37509690ac Mon Sep 17 00:00:00 2001 From: ansuz Date: Mon, 18 Jul 2016 19:49:43 +0200 Subject: [PATCH] height and width of the table are unreliable because of multiple users. remove them --- www/poll/table.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/www/poll/table.js b/www/poll/table.js index 9aa0c680d..79f385c18 100644 --- a/www/poll/table.js +++ b/www/poll/table.js @@ -8,9 +8,6 @@ define([ var $body = $t.find('tbody'); var $foot = $t.find('tfoot'); - var width = $body.find('tr:first-of-type td').length; - var height = $body.find('tr').length; - var addRow = function (first, Rest, uid) { var $row = $('', { 'data-rt-uid': uid, @@ -22,7 +19,6 @@ define([ }); $body.append($row); - height++; return $row; }; @@ -31,15 +27,14 @@ define([ 'data-rt-uid': uid, }).append(first)); - $body.find('tr').each(function (i) { + var $width = $body.find('tr').each(function (i) { // each checkbox needs a uid corresponding to its role var rowId = $(this).data('rt-uid'); $(this).append($('').append(Rest(xy(uid, rowId)))); }); $foot.find('tr').append($('', { })); - width++; - return width; + return $width.length; }; return {