From 03b44663668c3353537e35363370f040cc09d971 Mon Sep 17 00:00:00 2001 From: ioguix Date: Wed, 13 Feb 2008 22:55:38 +0000 Subject: [PATCH] cleaning xloadtree xml and some helpful \n for debuging in the generated html for the tree --- browser.php | 6 +++--- xloadtree/xtree2.js | 22 +++++++++++----------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/browser.php b/browser.php index 2d5b06d9..9a4ddcf2 100644 --- a/browser.php +++ b/browser.php @@ -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("", "servers.php?action=tree", "servers.php"); tree.write(); diff --git a/xloadtree/xtree2.js b/xloadtree/xtree2.js index cc45ba9e..af9104a6 100644 --- a/xloadtree/xtree2.js +++ b/xloadtree/xtree2.js @@ -770,27 +770,27 @@ _p.toHtml = function () { (hideLines ? "-nolines" : "") + "\" style=\"" + this.getLineStyle() + (this.getExpanded() && this.hasChildren() ? "" : "display:none;") + - "\">" + + "\">\n" + sb.join("") + - ""; + "\n"; return "
" + + this.id + "\"" + this.getEventHandlersHtml() + ">\n" + this.getRowHtml() + childrenHtml + - "
"; + "\n"; }; _p.getRowHtml = function () { var t = this.getTree(); return "
" + + Math.max(0, (this.getDepth() - 1) * this.indentWidth) + "px\">\n" + this.getExpandIconHtml() + //"" + this.getIconHtml() + this.getLabelHtml() + //"" + - "
"; + "\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() + ""; + " onblur=\"webFXTreeHandler.handleEvent(event)\">\n" + + this.getHtml() + "\n\n"; }; _p._getHref = function () { @@ -838,10 +838,10 @@ _p.getIconHtml = function () { // HTML... var link = this._getIconHref(); if (link == '#') - return " "; + return "\n "; return ""; + "\">\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 ""; + this.getExpandIconSrc() + "\">\n"; }; -- 2.39.5