From d63c6f771b04d2e8a92df520c2726b5c68ea2360 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 12 May 2015 15:32:35 +0200 Subject: [PATCH] Some cleanup --- com.woltlab.wcf/templates/headIncludeJavaScript.tpl | 8 -------- wcfsetup/install/files/js/WoltLab/WCF/Bootstrap.js | 12 ++++++++++++ 2 files changed, 12 insertions(+), 8 deletions(-) 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); } }; -- 2.20.1