Hello there. I'm using a tool in my blog (calendar widget) which in
turn uses the Prototyle library 1.5 and I want to upgrade to 1.6
(because of other tools I want to implement.

I understand quite much about all the theories but I fail in actually
coding so if someone could help mere here much appreciated. I already
found the exact point that needs to be changed but I can't pull it
off:


The mentioned calendar JavaScript has a function called inject which
in turn uses the "Insertion.Bottom" function of Prototype. It's now
discontinued and I should use Element#insert BUT I don't know how to
do it right. Here is the part:

------------------------------------------------
inject : function() {
                $$('div.date-header').each( function( date_header) {
                        text = date_header.lastChild.nodeValue;
                        date = Calendar.parse( text);
                        if( 'object'== typeof date)             // date object 
was returned (i.e. as
expected)
                        {
                                        date_header.lastChild.nodeValue="";
                                        new Insertion.Bottom(
                                                date_header,
                                                Calendar.renderHTML( date, text)
                                        )
                        }
                        else                                                    
// not-a-date-object-but-something-else was returned ->
error
                        {
                                new Insertion.Bottom(
                                        date_header,
                                        "<span 
style='color:red;font-style:italic'>" + date + "</span>"
                                );
                        }
                });
        },
------------------------------------------------------------------

As you can see it is kombined with "new" so I don't really know in
which "object" it get's injected.
Can someone please make this one Prototype 1.6 compatible??


Thanks in advance for your help!!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to