From: Alexander Ebert Date: Tue, 12 May 2015 13:32:35 +0000 (+0200) Subject: Some cleanup X-Git-Tag: 3.0.0_Beta_1~2402 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d63c6f771b04d2e8a92df520c2726b5c68ea2360;p=GitHub%2FWoltLab%2FWCF.git Some cleanup --- diff --git a/com.woltlab.wcf/templates/headIncludeJavaScript.tpl b/com.woltlab.wcf/templates/headIncludeJavaScript.tpl index e81deb7864..4378f6602f 100644 --- a/com.woltlab.wcf/templates/headIncludeJavaScript.tpl +++ b/com.woltlab.wcf/templates/headIncludeJavaScript.tpl @@ -208,14 +208,6 @@ {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'); }); //]]> diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Bootstrap.js b/wcfsetup/install/files/js/WoltLab/WCF/Bootstrap.js index 62a0232431..8cd286fee1 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Bootstrap.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Bootstrap.js @@ -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); } };