[BUGFIX] root-lines for DB Mounts in Pagetree rendering wrong markup
authorSteffen Ritter <info@rs-websystems.de>
Tue, 18 Oct 2011 12:15:43 +0000 (14:15 +0200)
committerFrancois Suter <francois@typo3.org>
Tue, 18 Oct 2011 19:45:31 +0000 (21:45 +0200)
The option "options.pageTree.showPathAboveMounts = 1" which shows the
rootline of each DB Mount in a line before is implemented in a
non-valid way.

This means, that a <div> tag is rendered within an <ul> tag right in
front of the <li> of the DB Mount node.

Change-Id: Ic715426b8d04220410bcb15bfba33a39e5fd47bc
Fixes: #31067
Releases: 4.6
Reviewed-on: http://review.typo3.org/5962
Reviewed-by: Xavier Perseguers
Reviewed-by: Philipp Gampe
Tested-by: Philipp Gampe
Reviewed-by: Francois Suter
Tested-by: Francois Suter
t3lib/js/extjs/components/pagetree/javascript/nodeui.js

index a748e4a..1a10660 100644 (file)
@@ -51,7 +51,14 @@ TYPO3.Components.PageTree.PageTreeNodeUI = Ext.extend(Ext.tree.TreeNodeUI, {
         var cb = Ext.isBoolean(a.checked),
             nel,
             href = this.getHref(a.href),
-            buf = ['<li class="x-tree-node"><div ext:tree-node-id="',n.id,'" class="x-tree-node-el x-tree-node-leaf x-unselectable ', a.cls,'" unselectable="on">',
+                       rootline = '';
+
+                       // TYPO3 modification to show the readable rootline above the user mounts
+               if (a.readableRootline !== '') {
+                       var rootline = '<li class="x-tree-node-readableRootline">' + a.readableRootline + '</li>';
+               }
+
+               var buf = [rootline,'<li class="x-tree-node"><div ext:tree-node-id="',n.id,'" class="x-tree-node-el x-tree-node-leaf x-unselectable ', a.cls,'" unselectable="on">',
             '<span class="x-tree-node-indent">',this.indentMarkup,"</span>",
             '<img alt="" src="', this.emptyIcon, '" class="x-tree-ec-icon x-tree-elbow" />',
 //            '<img alt="" src="', a.icon || this.emptyIcon, '" class="x-tree-node-icon',(a.icon ? " x-tree-node-inline-icon" : ""),(a.iconCls ? " "+a.iconCls : ""),'" unselectable="on" />',
@@ -68,11 +75,6 @@ TYPO3.Components.PageTree.PageTreeNodeUI = Ext.extend(Ext.tree.TreeNodeUI, {
             this.wrap = Ext.DomHelper.insertHtml("beforeEnd", targetNode, buf);
         }
 
-                       // TYPO3 modification to show the readable rootline above the user mounts
-               if (a.readableRootline !== '') {
-                       var rootline = '<div class="x-tree-node-readableRootline">' + a.readableRootline + '</div>';
-                       Ext.DomHelper.insertHtml("beforeBegin", this.wrap, rootline);
-               }
 
         this.elNode = this.wrap.childNodes[0];
         this.ctNode = this.wrap.childNodes[1];