Fixed bug #8456: Browse Links does not use JS library interface
authorBenni Mack <benni.mack@typo3.org>
Tue, 20 May 2008 07:13:06 +0000 (07:13 +0000)
committerBenni Mack <benni.mack@typo3.org>
Tue, 20 May 2008 07:13:06 +0000 (07:13 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@3664 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/class.browse_links.php

index 73a746d..eae7fe3 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2008-05-20  Benjamin Mack  <benni@typo3.org>
+
+       * Fixed bug #8456: Browse Links does not use JS library interface
+
 2008-05-19  Jeff Segars  <jeff@webempoweredchurch.org>
 
        * Fixed bug #7860: Coloring in TS Object Browser depends on "Crop Lines" (thanks to Steffen Kamper)
index 1eefb5d..c9efae6 100755 (executable)
@@ -886,9 +886,12 @@ class browse_links {
                $this->doc->docType= 'xhtml_trans';
                $this->doc->backPath = $BACK_PATH;
 
+                       // Load the Prototype library and browse_links.js
+               $this->doc->loadJavascriptLib('contrib/prototype/prototype.js');
+               $this->doc->loadJavascriptLib('js/browse_links.js');
+
                        // BEGIN accumulation of header JavaScript:
-               $JScode = '';
-               $JScode.= '
+               $JScode = '
                                // This JavaScript is primarily for RTE/Link. jumpToUrl is used in the other cases as well...
                        var add_href="'.($this->curUrlArray['href']?'&curUrl[href]='.rawurlencode($this->curUrlArray['href']):'').'";
                        var add_target="'.($this->setTarget?'&curUrl[target]='.rawurlencode($this->setTarget):'').'";
@@ -1133,8 +1136,6 @@ class browse_links {
                ';
 
                        // Finally, add the accumulated JavaScript to the template object:
-               $this->doc->JScode = '<script type="text/javascript" src="contrib/prototype/prototype.js"></script>'."\n";
-               $this->doc->JScode.= '<script type="text/javascript" src="js/browse_links.js"></script>'."\n";
                $this->doc->JScode.= $this->doc->wrapScriptTags($JScode);
 
                        // Debugging:
@@ -2757,4 +2758,4 @@ if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/class
 }
 
 
-?>
\ No newline at end of file
+?>