PiRSquared17 / activescaffold

Automatically exported from code.google.com/p/activescaffold
MIT License
0 stars 0 forks source link

Clicking "Add Existing" multiple times causes spurious text fields to be displayed. #695

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a model with a singular association
2. Create a column using the CRUD form_ui
3. When you edit an object, click on "Add Existing" multiple times

What is the expected output? What do you see instead?
When editing the association, it should be replacing the text field on the
form.  This happens correctly the first time you edit the association. 
However, during the replace, the class attribute "association-record" that
identifies the element is deleted.  Therefore the second time you hit the
button, it can't properly find the element to replace it.

It appears that the core problem here is using the Prototype function
Element.replace instead of Element.update.  I have patched it in my
environment with update, and it seems to work fine.  I can submit the patch.

Original issue reported on code.google.com by dan%summ...@gtempaccount.com on 4 Aug 2009 at 8:37

GoogleCodeExporter commented 9 years ago
Fix submitted to my github repository

git://github.com/summitpush/active_scaffold.git
fix_695

Original comment by dan%summ...@gtempaccount.com on 4 Aug 2009 at 8:48

GoogleCodeExporter commented 9 years ago
Fixed in commit 4e6ad0d

Original comment by sergio.c...@gmail.com on 5 Aug 2009 at 7:23

GoogleCodeExporter commented 9 years ago

Original comment by sergio.c...@gmail.com on 14 Sep 2009 at 4:03