cleaning xloadtree xml and some helpful \n for debuging in the generated html for...
authorioguix <ioguix>
Wed, 13 Feb 2008 22:55:38 +0000 (22:55 +0000)
committerioguix <ioguix>
Wed, 13 Feb 2008 22:55:38 +0000 (22:55 +0000)
browser.php
xloadtree/xtree2.js

index 2d5b06d9c650ccbce45425f31d0e13715cb3195a..9a4ddcf203baac052e435a7d40b218ce7b6a7066 100644 (file)
@@ -5,7 +5,7 @@
         * if you click on a database it shows a list of database objects in that
         * database.
         *
-        * $Id: browser.php,v 1.57 2007/04/17 08:55:12 soranzo Exp $
+        * $Id: browser.php,v 1.58 2008/02/13 22:55:38 ioguix Exp $
         */
 
        // Include application functions
@@ -54,7 +54,7 @@ WebFXTreeAbstractNode.prototype.target = 'detail';
 WebFXTreeAbstractNode.prototype._ondblclick = function(){}
 
 // Show tree XML on double click - for debugging purposes only
-/*
+
 // UNCOMMENT THIS FOR DEBUGGING (SHOWS THE SOURCE XML)
 WebFXTreeAbstractNode.prototype._ondblclick = function(e){
        var el = e.target || e.srcElement;
@@ -63,7 +63,7 @@ WebFXTreeAbstractNode.prototype._ondblclick = function(e){
                window.open(this.src, this.target || "_self");
        return false;
 };
-*/
+
 var tree = new WebFXLoadTree("<?php echo $lang['strservers']; ?>", "servers.php?action=tree", "servers.php");
 
 tree.write();
index cc45ba9e34b20a2c6b392cb2c2c298f4f6934c86..af9104a611384705b15f5f1fd1f4641c573dde1f 100644 (file)
@@ -770,27 +770,27 @@ _p.toHtml = function () {
                (hideLines ? "-nolines" : "") + "\" style=\"" +
                this.getLineStyle() +
                (this.getExpanded() && this.hasChildren() ? "" : "display:none;") +
-               "\">" +
+               "\">\n" +
                sb.join("") +
-               "</div>";
+               "</div>\n";
 
        return "<div class=\"webfx-tree-item\" id=\"" +
-               this.id + "\"" + this.getEventHandlersHtml() + ">" +
+               this.id + "\"" + this.getEventHandlersHtml() + ">\n" +
                this.getRowHtml() +
                childrenHtml +
-               "</div>";
+               "</div>\n";
 };
 
 _p.getRowHtml = function () {
        var t = this.getTree();
        return "<div class=\"" + this.getRowClassName() + "\" style=\"padding-left:" +
-               Math.max(0, (this.getDepth() - 1) * this.indentWidth) + "px\">" +
+               Math.max(0, (this.getDepth() - 1) * this.indentWidth) + "px\">\n" +
                this.getExpandIconHtml() +
                //"<span class=\"webfx-tree-icon-and-label\">" +
                this.getIconHtml() +
                this.getLabelHtml() +
                //"</span>" +
-               "</div>";
+               "</div>\n";
 };
 
 _p.getRowClassName = function () {
@@ -811,8 +811,8 @@ _p.getLabelHtml = function () {
                (toolTip ? " title=\"" + webFXTreeHandler.textToHtml(toolTip) + "\"" : "") +
                (target ? " target=\"" + target + "\"" : "") +
                " onfocus=\"webFXTreeHandler.handleEvent(event)\"" +
-               " onblur=\"webFXTreeHandler.handleEvent(event)\">" +
-               this.getHtml() + "</a>";
+               " onblur=\"webFXTreeHandler.handleEvent(event)\">\n" +
+               this.getHtml() + "\n</a>\n";
 };
 
 _p._getHref = function () {
@@ -838,10 +838,10 @@ _p.getIconHtml = function () {
        // HTML...
        var link = this._getIconHref();
        if (link == '#')
-               return "<img class=\"webfx-tree-icon\" src=\"" + this.getIconSrc() + "\">&nbsp;";
+               return "<img class=\"webfx-tree-icon\" src=\"" + this.getIconSrc() + "\">\n&nbsp;";
 
        return "<a href=\"" + webFXTreeHandler.textToHtml(link) +
-               "\"><img class=\"webfx-tree-icon\" src=\"" + this.getIconSrc() + "\"></a>";
+               "\"><img class=\"webfx-tree-icon\" src=\"" + this.getIconSrc() + "\"></a>\n";
 };
 
 _p.getIconSrc = function () {
@@ -852,7 +852,7 @@ _p.getExpandIconHtml = function () {
        // here we are not using textToHtml since the file names rarerly contains
        // HTML...
        return "<img class=\"webfx-tree-expand-icon\" src=\"" +
-               this.getExpandIconSrc() + "\">";
+               this.getExpandIconSrc() + "\">\n";
 };