+2008-03-02 Ingo Renner <ingo@typo3.org>
+
+ * fixed bug #7642: Page tree Filter use wrong div for collapse
2008-03-02 Martin Kutschker <martin.t.kutschker@blackbox.net>
// Create template object:
$this->doc = t3lib_div::makeInstance('template');
$this->doc->backPath = $BACK_PATH;
+ $this->doc->setModuleTemplate('templates/alt_db_navframe.html');
$this->doc->docType = 'xhtml_trans';
// get HTML-Template
- $this->template = $this->doc->getHtmlTemplate('templates/alt_db_navframe.html');
// Adding javascript code for AJAX (prototype), drag&drop and the pagetree as well as the click menu code
// Produce browse-tree:
$tree = $this->pagetree->getBrowsableTree();
- // Start page:
- $this->content = $this->doc->startPage('TYPO3 Page Tree');
-
- // Outputting workspace info
- if ($GLOBALS['BE_USER']->workspace!==0 || $GLOBALS['BE_USER']->getTSConfigVal('options.pageTree.onlineWorkspaceInfo')) {
- switch($GLOBALS['BE_USER']->workspace) {
- case 0:
- $wsTitle = ' '.$this->doc->icons(2).'['.$LANG->sL('LLL:EXT:lang/locallang_misc.xml:shortcut_onlineWS',1).']';
- break;
- case -1:
- $wsTitle = '['.$LANG->sL('LLL:EXT:lang/locallang_misc.xml:shortcut_offlineWS',1).']';
- break;
- default:
- $wsTitle = '['.$GLOBALS['BE_USER']->workspace.'] '.htmlspecialchars($GLOBALS['BE_USER']->workspaceRec['title']);
- break;
- }
-
- $showWorkspaceInfo = true;
- }
-
- //prepare onclick links
- $onclickNewPageWizard = 'top.content.list_frame.location.href=top.TS.PATH_typo3+\'db_new.php?id=1&pagesOnly=1\';"';
-
- $docheader = t3lib_parsehtml::getSubpart($this->template, '###DOCHEADER###');
-
- $markers['BUTTONSLEFT'] =
- // Filter switch
- ($this->hasFilterBox ? '
- <a href="#" id="toggleTreeFilter">
- <img'.t3lib_iconWorks::skinImg('',$GLOBALS['BE_USER']->uc['moduleData']['pageTree']['filterBox'] ? 'gfx/arrowright.gif' : 'gfx/arrowdown.gif','width="16" height="16"').' title="show filter" alt="" />
- <span>'.$LANG->sL('LLL:EXT:lang/locallang_misc.xml:pageTree_filter',1).'</span>
- </a>' : '')
- ;
-
- $markers['BUTTONSRIGHT'] =
- // New Page
- '<a href="#" onclick="'.$onclickNewPageWizard.'"><img'.t3lib_iconWorks::skinImg('','gfx/new_page.gif','width="13" height="12"').' title="'.$LANG->sL('LLL:EXT:cms/layout/locallang.xml:newPage',1).'" alt="" /></a>'.
-
- // Refresh-Icon
- '<a href="'.htmlspecialchars(t3lib_div::getIndpEnv('REQUEST_URI')).'"><img'.t3lib_iconWorks::skinImg('','gfx/refresh_n.gif','width="14" height="14"').' title="'.$LANG->sL('LLL:EXT:lang/locallang_core.xml:labels.refresh',1).'" alt="" /></a>'.
-
- // CSH-Icon
- t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'pagetree', $GLOBALS['BACK_PATH'])
-
- ;
-
- $markers['STYLE'] = $GLOBALS['BE_USER']->uc['moduleData']['pageTree']['filterBox'] ? ' style="display:none;"' : '';
- $markers['IMG_RESET'] = '<img'.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/search_reset.png', ' width="11" height="11"').' id="treeFilterReset" alt="Reset Filter" />';
-
- $this->content .= t3lib_parsehtml::substituteMarkerArray($docheader, $markers, '###|###');
-
-
- if($showWorkspaceInfo) {
- $this->content.= '
- <div class="bgColor4 workspace-info">'.
- '<a href="'.htmlspecialchars('mod/user/ws/index.php').'" target="content">'.
- '<img'.t3lib_iconWorks::skinImg('','gfx/i/sys_workspace.png','width="18" height="16"').' align="top" alt="" />'.
- '</a>'.$wsTitle.'
- </div>
- ';
- }
-
// Outputting Temporary DB mount notice:
if ($this->active_tempMountPoint) {
';
}
-
// Outputting page tree:
$this->content .= '<div id="PageTreeDiv">'.$tree.'</div>';
'.($this->doHighlight ? 'Tree.highlightActiveItem("",top.fsMod.navFrameHighlightedID["web"]);' : '').'
'.(!$this->doc->isCMlayers() ? 'Tree.activateDragDrop = false;' : 'Tree.registerDragDropHandlers();')
);
+
+ // Setting up the buttons and markers for docheader
+ $docHeaderButtons = $this->getButtons();
+ $docHeaderButtons['filtertoggle'] = $this->getFilterToggle();
+ $markers = array(
+ 'STYLE' => $GLOBALS['BE_USER']->uc['moduleData']['pageTree']['filterBox'] ? ' style="display:none;"' : '',
+ '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
+ );
+
+ // 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->endPage();
+ $this->content = $this->doc->insertStylesAndJS($this->content);
}
/**
* @return void
*/
function printContent() {
- $this->content.= $this->doc->endPage();
- $this->content = $this->doc->insertStylesAndJS($this->content);
echo $this->content;
}
+ /**
+ * Create the panel of buttons for submitting the form or otherwise perform operations.
+ *
+ * @return array all available buttons as an assoc. array
+ */
+ private function getButtons() {
+ global $LANG;
+
+ $buttons = array(
+ 'csh' => '',
+ 'new_page' => '',
+ 'refresh' => '',
+ );
+
+ // New Page
+ $onclickNewPageWizard = 'top.content.list_frame.location.href=top.TS.PATH_typo3+\'db_new.php?id=1&pagesOnly=1\';"';
+ $buttons['new_page'] = '<a href="#" onclick="' . $onclickNewPageWizard . '"><img' . t3lib_iconWorks::skinImg('', 'gfx/new_page.gif') . ' title="' . $LANG->sL('LLL:EXT:cms/layout/locallang.xml:newPage', 1) . '" alt="" /></a>';
+
+ // Refresh
+ $buttons['refresh'] = '<a href="' . htmlspecialchars(t3lib_div::getIndpEnv('REQUEST_URI')) . '"><img' . t3lib_iconWorks::skinImg('', 'gfx/refresh_n.gif') . ' title="' . $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.refresh', 1) . '" alt="" /></a>';
+
+ // CSH
+ $buttons['csh'] = str_replace('typo3-csh-inline','typo3-csh-inline show-right',t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'pagetree', $GLOBALS['BACK_PATH']));
+
+ return $buttons;
+ }
+
+ /**
+ * Create the workspace information
+ *
+ * @return string HTML containing workspace info
+ */
+ private function getWorkspaceInfo() {
+ global $LANG;
+
+ if ($GLOBALS['BE_USER']->workspace!==0 || $GLOBALS['BE_USER']->getTSConfigVal('options.pageTree.onlineWorkspaceInfo')) {
+ switch($GLOBALS['BE_USER']->workspace) {
+ case 0:
+ $wsTitle = ' '.$this->doc->icons(2).'['.$LANG->sL('LLL:EXT:lang/locallang_misc.xml:shortcut_onlineWS',1).']';
+ break;
+ case -1:
+ $wsTitle = '['.$LANG->sL('LLL:EXT:lang/locallang_misc.xml:shortcut_offlineWS',1).']';
+ break;
+ default:
+ $wsTitle = '['.$GLOBALS['BE_USER']->workspace.'] '.htmlspecialchars($GLOBALS['BE_USER']->workspaceRec['title']);
+ break;
+ }
+
+ $workspaceInfo = '
+ <div class="bgColor4 workspace-info">
+ <a href="'.htmlspecialchars('mod/user/ws/index.php').'" target="content">'.
+ '<img'.t3lib_iconWorks::skinImg('','gfx/i/sys_workspace.png','width="18" height="16"').' align="top" alt="" />'.
+ '</a>'.$wsTitle.'
+ </div>
+ ';
+ }
+
+ return $workspaceInfo;
+ }
+ /**
+ * Create the filter toggle
+ *
+ * @return string HTML for filter toggle
+ */
+ private function getFilterToggle() {
+ $filterToggle = '';
+
+ if($this->hasFilterBox) {
+ $filterToggle = '
+ <a href="#" id="toggleTreeFilter">
+ <img' . t3lib_iconWorks::skinImg('', $GLOBALS['BE_USER']->uc['moduleData']['pageTree']['filterBox'] ? 'gfx/arrowright.png' : 'gfx/arrowdown.png') . ' title="toggle filter" alt="" />
+ <span>' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_misc.xml:pageTree_filter', 1) . '</span>
+ </a>
+ ';
+ }
+
+ return $filterToggle;
+ }
if (state) {
Effect.BlindUp(filterBox, {duration : 0.2});
- this.toggleFilterBoxIcon.src = 'gfx/arrowright.gif';
+ this.toggleFilterBoxIcon.src = 'gfx/arrowright.png';
this.resetSearchField();
} else {
Effect.BlindDown(filterBox, {duration : 0.1});
- this.toggleFilterBoxIcon.src = 'gfx/arrowdown.gif';
+ this.toggleFilterBoxIcon.src = 'gfx/arrowdown.png';
}
},
*********************************************/
/* Set default values for bodytags: */
-BODY {
+body {
margin: 2px 2px 0px 4px;
background-color: #F7F3EF;
}
/* Setting alternative background color on some frames: */
-BODY#typo3-alt-toplogo-php, BODY#typo3-alt-menu-sel-php, BODY#typo3-alt-topmenu-dummy-php, BODY#typo3-alt-topmenu-dummy-php-iconmenu, BODY#typo3-alt-clickmenu-php, BODY#typo3-alt-clickmenu-php-notop, BODY#typo3-alt-palette-php {
+body#typo3-alt-toplogo-php,
+body#typo3-alt-menu-sel-php,
+body#typo3-alt-topmenu-dummy-php,
+body#typo3-alt-topmenu-dummy-php-iconmenu,
+body#typo3-alt-clickmenu-php,
+body#typo3-alt-clickmenu-php-notop,
+body#typo3-alt-palette-php {
background-color: #9BA1A8;
}
-body#typo3-alt-doc-php, body#typo3-db-list-php, body#ext-cms-layout-db-layout-php, body#ext-tstemplate-ts-index-php, body#typo3-mod-web-perm-index-php, body#typo3-mod-web-info-index-php, body#typo3-mod-web-func-index-php, body#ext-version-cm1-index-php, body#ext-setup-mod-index-php, body#typo3-mod-user-ws-index-php, body#typo3-mod-user-ws-workspaceforms-php, body#typo3-mod-php, body#ext-tsconfig-help-mod1-index-php, body#typo3-mod-tools-em-index-php, body#ext-lowlevel-dbint-index-php, body#ext-lowlevel-config-index-php { padding: 0; margin: 0; overflow: hidden; height: 100%; }
+
+body#typo3-alt-doc-php,
+body#typo3-db-list-php,
+body#ext-cms-layout-db-layout-php,
+body#ext-tstemplate-ts-index-php,
+body#typo3-mod-web-perm-index-php,
+body#typo3-mod-web-info-index-php,
+body#typo3-mod-web-func-index-php,
+body#ext-version-cm1-index-php,
+body#typo3-pagetree {
+ padding: 0;
+ margin: 0;
+ overflow: hidden;
+ height: 100%;
+}
+
/****************************************
UL.tree LI.active UL, UL.tree UL LI.active UL { background-color: #f7f3ef; }
#dragIcon { z-index: 1; position: absolute; visibility: hidden; filter: alpha(opacity=50); -moz-opacity:0.5; opacity:0.5; white-space: nowrap; }
-div#treeFilterBox { background: url('gfx/search_bubble.png') no-repeat 8px 0; padding-left: 10px; }
-input#treeFilter { height: 12px; width: 120px; margin: 4px 0 0 18px !important; border: 0; }
-img#treeFilterReset { border: 0; margin: 5px 0 0 !important; cursor: pointer; visibility: hidden; }
-#toggleTreeFilter span {font-weight:bold; margin-left:-4px; font-size:12px;}
-#typo3-pagetree #typo3-docheader img {margin:2px 1px;}
+#treeFilterBox {
+ position: absolute;
+ z-index: 3;
+ top: 22px;
+ width: 260px;
+ height: 27px;
+ background: url('gfx/filter_bg.png') no-repeat 2px -2px;
+}
+
+#searchBubble {
+ padding-left: 10px;
+}
+
+#treeFilter {
+ font-size: 11px;
+ height: 16px;
+ width: 165px;
+ margin: 6px 0pt 0pt 19px !important;
+ border: 0px;
+ background: transparent;
+}
+
+#treeFilterReset {
+ border: 0;
+ position: absolute;
+ top: 6px;
+ left: 194px;
+ cursor: pointer;
+ visibility: hidden;
+}
+
+#toggleTreeFilter span {
+ font-weight: bold;
+ margin: 4px 0 0 -4px;
+ font-size: 12px;
+}
+
+#toggleTreeFilter img {
+ vertical-align: middle;
+}
+
+#toggleTreeFilter {
+ outline:none;
+ text-decoration:none;
+}
+
+#typo3-pagetree #typo3-docheader img {
+ margin:2px 1px;
+}
#treeRoot {
margin-top: 6px;
/* Workspace */
div.workspace-info {
- padding: 0px 2px 0px 2px;
- margin: 2px 0px 4px 0px;
+ padding: 1px 0px 1px 2px;
+ margin: 0px 5px 4px 0px;
border: 1px solid #999;
}
.ver-element, UL.tree UL LI.ver-element { background-color: #ccddcc; }
A.typo3-csh-link:hover SPAN.typo3-csh-inline { display: block; }
SPAN.typo3-csh-inline SPAN.header, TABLE.typo3-csh-inline SPAN.header { font-weight: bold; float: left; width: 100%; background-color: #F6F2E6; }
SPAN.typo3-csh-inline { line-height: 16px; }
+a.typo3-csh-link span.typo3-csh-inline.show-right {
+ margin: 0px 0px 0px -148px;
+}
/*********************************************
*/
+
+
}
#typo3-menu li div.collapsed {
- background-image: url(../../../gfx/arrowright.gif);
+ background-image: url(../../../gfx/arrowright.png);
background-repeat: no-repeat;
}
#typo3-menu li div.expanded {
- background-image: url(../../../gfx/arrowdown.gif);
+ background-image: url(../../../gfx/arrowdown.png);
background-repeat: no-repeat;
}
-
-<!-- ###DOCHEADER### -->
- <!-- Page header with buttons for saving & closing and path details -->
+<!-- ###FULLDOC### begin -->
+<div class="typo3-fullDoc">
+ <!-- Page header with buttons, path details and csh -->
<div id="typo3-docheader">
<div id="typo3-docheader-row1">
- <div class="buttonsleft">###BUTTONSLEFT###</div>
- <div class="buttonsright">###BUTTONSRIGHT###</div>
+ <div class="buttonsleft">###BUTTONLIST_LEFT###</div>
+ <div class="buttonsright">###BUTTONLIST_RIGHT###</div>
</div>
- <div id="typo3-docheader-row2"###STYLE###>
- <div id="treeFilterBox">
- <input type="text" value="" name="treeFilter" id="treeFilter" />
- ###IMG_RESET###
+ <div id="typo3-docheader-row2">
+ <div id="treeFilterBox" class="bgColor4" ###STYLE###>
+ <div id="searchBubble">
+ <input type="text" value="" name="treeFilter" id="treeFilter" />
+ ###IMG_RESET###
+ </div>
</div>
</div>
</div>
-<!-- ###DOCHEADER### -->
+ <!-- Content of module, for instance listing, info or editing -->
+ <div id="typo3-docbody">
+ ###WORKSPACEINFO###
+ ###CONTENT###
+ </div>
+</div>
+<!-- ###FULLDOC### end -->
+
+<!-- Grouping the icons on top -->
+
+<!-- ###BUTTON_GROUP_WRAP### -->
+ <div class="buttongroup">###BUTTONS###</div>
+<!-- ###BUTTON_GROUP_WRAP### -->
+
+<!-- ###BUTTON_GROUPS_LEFT### -->
+<!-- ###BUTTON_GROUP4### -->###FILTERTOGGLE###<!-- ###BUTTON_GROUP4### -->
+<!-- ###BUTTON_GROUPS_LEFT### -->
+
+<!-- ###BUTTON_GROUPS_RIGHT### -->
+<!-- ###BUTTON_GROUP1### -->###NEW_PAGE######REFRESH######CSH###<!-- ###BUTTON_GROUP1### -->
+<!-- ###BUTTON_GROUPS_RIGHT### -->