Fixing the "back"-link in userException.
authorTim Düsterhus <timwolla@arcor.de>
Fri, 7 Oct 2011 21:55:55 +0000 (23:55 +0200)
committerTim Düsterhus <timwolla@arcor.de>
Fri, 7 Oct 2011 21:55:55 +0000 (23:55 +0200)
We use jQuery now.

com.woltlab.wcf/template/userException.tpl
wcfsetup/install/files/acp/templates/userException.tpl

index dcbcda453612fb6d7394a3affb070fa2ccc7dbbd..9970d8f64ca6e66e50d61c2fb680f0b03be788b2 100644 (file)
@@ -2,13 +2,6 @@
 <head>
        <title>{lang}wcf.global.error.title{/lang} - {lang}{PAGE_TITLE}{/lang}</title>
        {include file='headInclude' sandbox=false}
-       <script type="text/javascript">
-               //<![CDATA[
-               if (document.referrer) {
-                       onloadEvents.push(function() { document.getElementById('errorMessage').innerHTML += "<br /><a href=\"" + document.referrer + "\">{lang}wcf.global.error.backward{/lang}</a>"; });
-               }
-               //]]>
-       </script>
 </head>
 <body{if $templateName|isset} id="tpl{$templateName|ucfirst}"{/if}>
 {include file='header' sandbox=false}
                {@$message}
        </p>
 </div>
+<script type="text/javascript">
+       //<![CDATA[
+       if (document.referrer) {
+               $('#errorMessage').append('<br /><a href="' + document.referrer + '">{lang}wcf.global.error.backward{/lang}</a>'); 
+       }
+       //]]>
+</script>
 
 <!-- 
 {$name} thrown in {$file} ({@$line})
index d11ac39fac04792e12e96afa670606e9653aefd8..101077b4cd4996536a370a52e7499471ad683b19 100644 (file)
@@ -7,7 +7,7 @@
 <script type="text/javascript">
        //<![CDATA[
        if (document.referrer) {
-               onloadEvents.push(function() { document.getElementById('errorMessage').innerHTML += "<br /><a href=\"" + document.referrer + "{@SID_ARG_2ND_NOT_ENCODED}\">{lang}wcf.global.error.backward{/lang}</a>"; });
+               $('#errorMessage').append('<br /><a href="' + document.referrer + '">{lang}wcf.global.error.backward{/lang}</a>'); 
        }
        //]]>
 </script>