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:58:41 +0000 (15:58 -0400)
commit7903e32468a78250b640d6983ba8321c3ec653c1
tree8ab1446c7f864f66df309e4094ea432ea7deb30a
parent7ae48c804dfdea12a9e9f8284cde8dd3167f6855
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