From 6c7b735eb2479c3ca3c3cccf03f77c1f927f04de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Wed, 27 May 2015 11:43:42 +0200 Subject: [PATCH] misc: fix "add row" javascript handling for multiline tables (#7374) --- wcs/qommon/static/js/widget_list.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wcs/qommon/static/js/widget_list.js b/wcs/qommon/static/js/widget_list.js index b39468f..99eb91e 100644 --- a/wcs/qommon/static/js/widget_list.js +++ b/wcs/qommon/static/js/widget_list.js @@ -10,6 +10,10 @@ function prepare_widget_list_elements() { if (row.tagName == 'BR') { row = $(row).prev()[0]; } + if (row.tagName == 'TABLE') { + row = $(row).find('tr:last'); + console.log('row:', row); + } if ($(row).find('input[name$=add_element]').length > 0) { /* this has several levels of widget lists, don't use -- 2.1.4