Fixed bug #7777: Hide Filter is not possible, credits Steffen Kamper
authorIngo Renner <ingo.renner@typo3.org>
Sat, 15 Mar 2008 16:52:34 +0000 (16:52 +0000)
committerIngo Renner <ingo.renner@typo3.org>
Sat, 15 Mar 2008 16:52:34 +0000 (16:52 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@3427 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/alt_db_navframe.php
typo3/template.php
typo3/templates/alt_db_navframe.html

index dbf508a..aa5e5cc 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 2008-03-15  Ingo Renner  <ingo@typo3.org>
 
        * Added follow up to #7588: Accesscheck for clearCache, credits Steffen Kamper
+       * Fixed bug #7777: Hide Filter is not possible, credits Steffen Kamper
 
 2008-03-15  Stanislas Rolland  <typo3@sjbr.ca>
 
index a9fba73..057a2b1 100755 (executable)
@@ -224,15 +224,20 @@ class SC_alt_db_navframe {
                        // Setting up the buttons and markers for docheader
                $docHeaderButtons = $this->getButtons();
                $markers = array(
-                       'IMG_RESET' => '<img'.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/close_gray.gif', ' width="16" height="16"').' id="treeFilterReset" alt="Reset Filter" />',
+                       'IMG_RESET'     => '<img'.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/close_gray.gif', ' width="16" height="16"').' id="treeFilterReset" alt="Reset Filter" />',
                        'WORKSPACEINFO' => $this->getWorkspaceInfo(),
-                       'CONTENT' => $this->content
+                       'CONTENT'       => $this->content
                );
+               $subparts = array();
 
+               if (!$this->hasFilterBox) {
+                       $subparts['###SECOND_ROW###'] = '';
+               }
                        // Build the <body> for the module
                $this->content = $this->doc->startPage('TYPO3 Page Tree');
-               $this->content.= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
+               $this->content.= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers, $subparts);
                $this->content.= $this->doc->endPage();
+
                $this->content = $this->doc->insertStylesAndJS($this->content);
        }
 
index f23ba60..b61c5d0 100755 (executable)
@@ -1843,7 +1843,7 @@ $str.=$this->docBodyTagBegin().
         * @param       array           HTML for all other markers
         * @return      string          Composite HTML
         */
-       public function moduleBody($pageRecord = array(), $buttons = array(), $markerArray = array()) {
+       public function moduleBody($pageRecord = array(), $buttons = array(), $markerArray = array(), $subpartArray = array()) {
                        // Get the HTML template for the module
                $moduleBody = t3lib_parsehtml::getSubpart($this->moduleTemplate, '###FULLDOC###');
                        // Add CSS
@@ -1867,8 +1867,13 @@ $str.=$this->docBodyTagBegin().
                $docHeaderButtons = $this->getDocHeaderButtons($buttons);
                        // Merge docheader buttons with the marker array
                $markerArray = array_merge($markerArray, $docHeaderButtons);
+                       // replacing subparts
+               foreach ($subpartArray as $marker => $content) {
+                       $moduleBody = t3lib_parsehtml::substituteSubpart($moduleBody, $marker, $content);
+               }
                        // replacing all markers with the finished markers and return the HTML content
                return t3lib_parsehtml::substituteMarkerArray($moduleBody, $markerArray, '###|###');
+               
        }
        
        /**
index f816b51..0e533f4 100644 (file)
@@ -7,12 +7,14 @@
                        <div class="buttonsright no-border">###BUTTONLIST_RIGHT###</div>
                </div>
                <div id="typo3-docheader-row2">
+                       <!-- ###SECOND_ROW### -->
                        <div id="treeFilterBox" class="bgColor4">
                                <div id="searchBubble">
                                        <input type="text" value="" name="treeFilter" id="treeFilter" />
                                        ###IMG_RESET###
                                </div>
                        </div>
+                       <!-- ###SECOND_ROW### -->
                </div>
        </div>
        <!-- Content of module, for instance listing, info or editing -->