# HG changeset patch # User luisf # Date 1368183040 -3600 # Node ID 20a6b12d1aba5efbfb772608326d0b748fb1fc24 # Parent 1194982f28bacd045a35dd140a1b8c0ecd1529f5 Fixed test that was checking if an element belonged to the array. Correctly showing/hiding the Bibtex fields. diff -r 1194982f28ba -r 20a6b12d1aba plugins/redmine_bibliography/app/views/publications/show_bibtex_fields.js.erb --- a/plugins/redmine_bibliography/app/views/publications/show_bibtex_fields.js.erb Thu May 09 18:47:05 2013 +0100 +++ b/plugins/redmine_bibliography/app/views/publications/show_bibtex_fields.js.erb Fri May 10 11:50:40 2013 +0100 @@ -6,7 +6,10 @@ input_id = $this.children('input').attr('id'); name = input_id.split('_')[4]; - if ($.inArray(name, fields)){ + if ($.inArray(name, fields) !== -1){ $this.show(); } + else{ + $this.hide(); + } }); \ No newline at end of file