google-code-export / django-grappelli

Automatically exported from code.google.com/p/django-grappelli
0 stars 0 forks source link

addhandler work is not correctly woth more than one inline groups #53

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. I have three inline form groups,
when i am click addhandler, the form appending to last inline form.

Please provide any additional information below.

Inline.js:48
var new_item =
inlinegroup.find('div.inline-related:last').clone(true).insertAfter('div.inline-
related:last',
inlinegroup);

I`m change to:
var new_item =
inlinegroup.find('div.inline-related:last').clone(true).appendTo(inlinegroup);

Original issue reported on code.google.com by elec.sp...@gmail.com on 28 Apr 2009 at 2:39

GoogleCodeExporter commented 9 years ago
I´ll take a look a that. 

note: the reason why our code looks slightly more complex than yours is that we
already plan with reordering inlines to come (hopefully). 

Original comment by sehmaschine on 28 Apr 2009 at 2:46

GoogleCodeExporter commented 9 years ago
I also have 3 inlinegroups and it works fine for me. I´ve tested with different
inlinegroups (stacked, tabular) in different order and I can´t reproduce your 
behaviour.

can you give me more details?

Original comment by sehmaschine on 4 May 2009 at 8:24

GoogleCodeExporter commented 9 years ago
I use the browser Mozilla Firefox 3.0.10.
Maybe there problems?

Original comment by elec.sp...@gmail.com on 4 May 2009 at 8:40

GoogleCodeExporter commented 9 years ago
I´m also using firefox.

the js is quite straightforward:

inlinegroup.find('div.inline-related:last').clone(true).insertAfter('div.inline-
related:last',
inlinegroup);

... the insertAfter-statement refers to the current inlinegroup. I´m surprised 
that
this doesn´t work (for you). I´ve used this statement for several websites as 
well
and never had any problems. 

maybe you can use firebug and try to do some debugging ... that´d be aweseome.

Original comment by sehmaschine on 4 May 2009 at 8:46

GoogleCodeExporter commented 9 years ago
Here is a sample page with the problem:
http://www.vluki.ru/test.html

Original comment by elec.sp...@gmail.com on 4 May 2009 at 9:26

GoogleCodeExporter commented 9 years ago
thanks a lot. I found the "error" - hope it works now. I´ve actually tested 
with a
wrong version before ...

I´m closing this ticket for now. If you´re still having problems, please 
reopen this
ticket.

Original comment by sehmaschine on 4 May 2009 at 10:12