LP#1154656 MARC Expert Search "Add Rows" adds duplicate row
authorMichael Peters <mpeters@emeralddata.net>
Tue, 9 Jun 2015 14:10:04 +0000 (10:10 -0400)
committerJason Stephenson <jstephenson@mvlc.org>
Fri, 12 Jun 2015 19:59:25 +0000 (15:59 -0400)
commit6f13a9314148d0f9eafbba3c4bf6f6e3c428cb86
tree61025cba8e0d541511b2ef160a908a82a2c46310
parent4b1ef85b61439be7a4b5b2fba8d1dbe63f7e1e86
LP#1154656 MARC Expert Search "Add Rows" adds duplicate row

This patch changes the behavior of the "Add Search Row" link
(JavaScript function from simple.js "addExpertRow()") so that
we are always cloning the initial "empty" row instead of
potentially cloning a row -- by way of cloneNode() -- with user
input in place, and causing duplicate search rows.

To reproduce the bug, go to Advanced Search, fill in all three
search fields with some text, click on Add Search Row.  You wil
see that the Title search row along with the data in the text
box is duplicated and added to the search.

After this patch, the new row should be added with an empty
text box.

Signed-off-by: Michael Peters <mpeters@emeralddata.net>
Signed-off-by: Rashma Kumaran <rkumaran@kcls.org>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Open-ILS/src/templates/opac/css/style.css.tt2
Open-ILS/web/js/ui/default/opac/simple.js