[Jifty-commit] r4707 - jifty/branches/jquery/share/web/static/js
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Sat Dec 15 08:43:14 EST 2007
Author: gugod
Date: Sat Dec 15 08:43:14 2007
New Revision: 4707
Modified:
jifty/branches/jquery/share/web/static/js/jifty.js
Log:
This replaces Insertion.* with jQuery way.
Modified: jifty/branches/jquery/share/web/static/js/jifty.js
==============================================================================
--- jifty/branches/jquery/share/web/static/js/jifty.js (original)
+++ jifty/branches/jquery/share/web/static/js/jifty.js Sat Dec 15 08:43:14 2007
@@ -962,8 +962,14 @@
// Once we find it, do the insertion
if (f['mode'] && (f['mode'] != 'Replace')) {
- var insertion = eval('Insertion.'+f['mode']);
- new insertion(element, textContent.stripScripts() );
+ var method = ({
+ After: 'after',
+ Before: 'before',
+ Bottom: 'append',
+ Top: 'prepend'
+ })[ f['mode'] ];
+
+ jQuery(element)[method]( textContent.stripScripts() );
} else {
jQuery(element).html( textContent.stripScripts() );
}
More information about the Jifty-commit
mailing list