]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
try to import new_form
authorEvan Prodromou <evan@prodromou.name>
Fri, 14 Nov 2008 19:46:20 +0000 (14:46 -0500)
committerEvan Prodromou <evan@prodromou.name>
Fri, 14 Nov 2008 19:46:20 +0000 (14:46 -0500)
darcs-hash:20081114194620-84dde-8349db3358c547889ec9b095dc340fdd0cd31210.gz

js/util.js

index 9c8bab78d025cc944fb2ead6f4e04fb48f4507da..5b1ecc007b72fde22e4d87675d847c0729430caa 100644 (file)
@@ -60,6 +60,9 @@ $(document).ready(function(){
                     var new_form = $('form.disfavor', xml).get(0);
                     var dis = new_form.id;
                     var fav = dis.replace('disfavor', 'favor');
+                    if (document.importNode) {
+                         new_form = document.importNode(new_form);
+                    }
                     $('form#'+fav).replaceWith(new_form);
                     $('form#'+dis).ajaxForm(disoptions).each(addAjaxHidden);
                }};
@@ -69,6 +72,9 @@ $(document).ready(function(){
                     var new_form = $('form.favor', xml).get(0);
                     var fav = new_form.id;
                     var dis = fav.replace('favor', 'disfavor');
+                    if (document.importNode) {
+                         new_form = document.importNode(new_form);
+                    }
                     $('form#'+dis).replaceWith(new_form);
                     $('form#'+fav).ajaxForm(favoptions).each(addAjaxHidden);                    ;
                }};