From d162cf20c84815f53dcf376c3c849ada10f4cf48 Mon Sep 17 00:00:00 2001 From: Alex Sanford Date: Wed, 13 Jul 2011 22:53:05 -0300 Subject: [PATCH] Mostly fixed issue #121 Made the text show up but now the select won't update when options are added or deleted --- public/javascripts/admin/custom_fields/has_many.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public/javascripts/admin/custom_fields/has_many.js b/public/javascripts/admin/custom_fields/has_many.js index e749a36b..1023471c 100644 --- a/public/javascripts/admin/custom_fields/has_many.js +++ b/public/javascripts/admin/custom_fields/has_many.js @@ -27,7 +27,11 @@ $(document).ready(function() { if (size > 0) context.select.append(optgroup); } else { if ($.inArray(obj[1], context.data.taken_ids) == -1) - context.select.append(new Option(obj[0], obj[1], true, true)); + { + var option = new Option("", obj[1], true, true); + $(option).text(obj[0]); + context.select.append(option); + } } }