* Fixed bug #3115: JavaScript error on clickmenu in filelist module
authorMichael Stucki <michael.stucki@typo3.org>
Fri, 17 Nov 2006 18:49:26 +0000 (18:49 +0000)
committerMichael Stucki <michael.stucki@typo3.org>
Fri, 17 Nov 2006 18:49:26 +0000 (18:49 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/branches/TYPO3_4-0@1800 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/alt_clickmenu.php
typo3/template.php

index 1f10727..20fbf17 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@
 
        * Fixed bug #4059: options.hideRecords.pages doesn't work for mounted pages
        * Fixed bug #4379: pageNotFound_handling ignores forceCharset setting
+       * Fixed bug #3115: JavaScript error on clickmenu in filelist module
 
 2006-11-16  Martin Kutschker  <martin.t.kutschker@blackbox.net>
 
index 9118edc..d3e2e30 100755 (executable)
@@ -1590,7 +1590,7 @@ class SC_alt_clickmenu {
                }
 
                        // Initialize template object
-               if(!$this->ajax)        {
+               if (!$this->ajax)       {
                        $this->doc = t3lib_div::makeInstance('template');
                        $this->doc->docType='xhtml_trans';
                        $this->doc->backPath = $BACK_PATH;
@@ -1685,7 +1685,7 @@ class SC_alt_clickmenu {
 
                        // Start page
                if(!$this->ajax)        {
-                       $this->content.=$this->doc->startPage('Context Sensitive Menu');
+                       $this->content.= $this->doc->startPage('Context Sensitive Menu');
                }
                        // Set content of the clickmenu with the incoming var, "item"
                $this->content.= $clickMenu->init();
@@ -1697,11 +1697,12 @@ class SC_alt_clickmenu {
         * @return      void
         */
        function printContent() {
-               if(!$this->ajax)        {
+               if (!$this->ajax)       {
                        $this->content.= $this->doc->endPage();
                        $this->content = $this->doc->insertStylesAndJS($this->content);
                        echo $this->content;
                } else {
+                       $this->content = $GLOBALS['LANG']->csConvObj->utf8_encode($this->content,$GLOBALS['LANG']->charSet);
                        t3lib_ajax::outputXMLreply($this->content);
                }
        }
index 5055b6c..f775545 100755 (executable)
@@ -1260,15 +1260,15 @@ $str.=$this->docBodyTagBegin().
                                }
                                        // switch - either forwards call to ajax or does the request in the top frame
                                function showClickmenu_raw(url) {';
-               if($this->isCMlayers()) { // ajax
-                       $content .= '
+               if ($this->isCMlayers())        { // AJAX
+                       $content.= '
                                        url += "&ajax=1";
                                        ajax_doRequest(url);';
-               } else { // no ajax
-                       $content .= '
+               } else { // no AJAX
+                       $content.= '
                                        showClickmenu_noajax(url);';
                }
-               $content .= '
+               $content.= '
                                }
 
        /**
@@ -1281,7 +1281,7 @@ $str.=$this->docBodyTagBegin().
                                        top.loadTopMenu(url);
                                }';
                if ($this->isCMlayers())        {
-                       $content .= t3lib_ajax::getJScode('showClickmenu_ajax', 'showClickmenu_noajax');
+                       $content.= t3lib_ajax::getJScode('showClickmenu_ajax', 'showClickmenu_noajax');
                        $content.='
                                        // opens the clickmenu, is called from ajax_doRequest
                                function showClickmenu_ajax(t3ajax)     {