summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorioguix2008-02-13 22:55:38 +0000
committerioguix2008-02-13 22:55:38 +0000
commit03b44663668c3353537e35363370f040cc09d971 (patch)
treecb379799aafd6cdc93036a3c7b62a57078fb8ec8
parent6d29264812361a2ecb993d634b5373f307a7ee66 (diff)
cleaning xloadtree xml and some helpful \n for debuging in the generated html for the tree
-rw-r--r--browser.php6
-rw-r--r--xloadtree/xtree2.js22
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("<?php echo $lang['strservers']; ?>", "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("") +
- "</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";
};