Some cleanup
authorAlexander Ebert <ebert@woltlab.com>
Tue, 12 May 2015 13:32:35 +0000 (15:32 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 12 May 2015 13:32:35 +0000 (15:32 +0200)
com.woltlab.wcf/templates/headIncludeJavaScript.tpl
wcfsetup/install/files/js/WoltLab/WCF/Bootstrap.js

index e81deb7864dd91071c8ef6771076594f48f0768b..4378f6602f5670280dbd1d98093e151e891b1e4e 100644 (file)
                {if $__sessionKeepAlive|isset}
                        new WCF.System.KeepAlive({@$__sessionKeepAlive});
                {/if}
-               
-               if ($.browser.msie) {
-                       window.onbeforeunload = function() {
-                               /* Prevent "Back navigation caching" (http://msdn.microsoft.com/en-us/library/ie/dn265017%28v=vs.85%29.aspx) */
-                       };
-               }
-               
-               $('form[method=get]').attr('method', 'post');
        });
        //]]>
 </script>
index 62a02324314e994901ee6c6d18b324e72570fe45..8cd286fee1a27c00383c427a1ad3bebe4e00941e 100644 (file)
@@ -42,6 +42,18 @@ define(
                        UIDialog.setup();
                        UITooltip.setup();
                        
+                       // convert method=get into method=post
+                       var forms = document.querySelectorAll('form[method=get]');
+                       for (var i = 0, length = forms.length; i < length; i++) {
+                               forms[i].setAttribute('method', 'post');
+                       }
+                       
+                       if ($.browser.msie) {
+                               window.onbeforeunload = function() {
+                                       /* Prevent "Back navigation caching" (http://msdn.microsoft.com/en-us/library/ie/dn265017%28v=vs.85%29.aspx) */
+                               };
+                       }
+                       
                        $.holdReady(false);
                }
        };