Skip to content

Commit

Permalink
Merge pull request #524 from pretaweb/pretaweb-fix-picklist-js-error
Browse files Browse the repository at this point in the history
Fix the value to accept the value with space.
  • Loading branch information
ebrehault committed Feb 3, 2014
2 parents 366ce3e + 7bec4f4 commit 0039f50
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -70,8 +70,8 @@
function ${fieldid}_add_row(data) {
var tablebody = jQuery('#${fieldid}_table_result > tbody');
//if (tablebody.has('input[value=' + data[0] + ']').length == 0) {
if (jQuery('#${fieldid}_table_result > tbody:has(input[value=' + data[0] + '])').length == 0) {
//if (tablebody.has('input[value=\'' + data[0] + '\']').length == 0) {
if (jQuery('#${fieldid}_table_result > tbody:has(input[value=\'' + data[0] + '\'])').length == 0) {
//tablebody.children().has('input[value=]').remove()
jQuery('#${fieldid}_table_result > tbody > *:has(input[value=])').remove()
var row = jQuery('<tr><td><img alt=\'Remove\' src=\'list-remove.png\' style=\'cursor: pointer\' onclick=\'${fieldid}_delete_row(this)\' />' +
Expand Down

0 comments on commit 0039f50

Please sign in to comment.