Attached Files | fixTree.diff [^] (4,664 bytes) 2008-09-30 14:37 [Show Content] [Hide Content]=== src/org/openbravo/erpCommon/utility/WindowTree.html
==================================================================
--- src/org/openbravo/erpCommon/utility/WindowTree.html (revision 3)
+++ src/org/openbravo/erpCommon/utility/WindowTree.html (local)
@@ -51,8 +51,8 @@
<script language="JavaScript" type="text/javascript">
function submitDraggingInfo(strTop, strLink, strChild) {
- document.frmMain.inpTop.value = strTop.replace(/[^0-9]/gi,'');
- document.frmMain.inpLink.value = strLink.replace(/[^0-9]/gi,'');
+ document.frmMain.inpTop.value = strTop.substring(strTop.lastIndexOf("_")+1);
+ document.frmMain.inpLink.value = strLink.substring(strLink.lastIndexOf("_")+1);
document.frmMain.inpChild.value = strChild;
try {
return submitXmlHttpRequest(callback, frmMain, "ASSIGN", "WindowTree.html", false);
=== src/org/openbravo/erpCommon/utility/WindowTree.java
==================================================================
--- src/org/openbravo/erpCommon/utility/WindowTree.java (revision 3)
+++ src/org/openbravo/erpCommon/utility/WindowTree.java (local)
@@ -167,7 +167,7 @@
if (data[i].parentId.equals(indice)) {
hayDatos=true;
String strHijos = generateTree(data, strDireccion, data[i].nodeId, isFirst);
- strResultado.append(WindowTreeUtility.addNodeElement(data[i].name, data[i].description, CHILD_SHEETS, data[i].issummary.equals("Y"), WindowTreeUtility.windowType(data[i].action), strDireccion, "clickItem(" + data[i].nodeId + ", '" + Replace.replace(data[i].name, "'", "\\'") + "', '" + data[i].issummary + "');", "dblClickItem(" + data[i].nodeId + ");", !strHijos.equals(""), data[i].nodeId, data[i].action));
+ strResultado.append(WindowTreeUtility.addNodeElement(data[i].name, data[i].description, CHILD_SHEETS, data[i].issummary.equals("Y"), WindowTreeUtility.windowType(data[i].action), strDireccion, "clickItem('" + data[i].nodeId + "', '" + Replace.replace(data[i].name, "'", "\\'") + "', '" + data[i].issummary + "');", "dblClickItem('" + data[i].nodeId + "');", !strHijos.equals(""), data[i].nodeId, data[i].action));
//strResultado.append(WindowTreeUtility.addNodeElement(data[i].name, data[i].description, CHILD_SHEETS, data[i].issummary.equals("Y"), WindowTreeUtility.windowType(data[i].action), strDireccion, "clickItem(" + data[i].nodeId + ", '" + Replace.replace(data[i].name, "'", "\\'") + "', '" + data[i].issummary + "');", "", !strHijos.equals(""), data[i].nodeId, data[i].action));
strResultado.append(strHijos);
}
=== src/org/openbravo/erpCommon/utility/WindowTreeUtility.java
==================================================================
--- src/org/openbravo/erpCommon/utility/WindowTreeUtility.java (revision 3)
+++ src/org/openbravo/erpCommon/utility/WindowTreeUtility.java (local)
@@ -160,16 +160,16 @@
strOnDblClick = Replace.replace(strOnDblClick, "\"", """);
if (isSummary) {
- element.append("<li id=\"folder").append((hasChilds?"":"NoChilds")).append(nodeId).append("\"").append((nodeId.equals("0")?" noDrag=\"true\" noSiblings=\"true\" noDelete=\"true\" noRename=\"true\" ":"")).append(">\n");
- element.append("<a href=\"#\" id=\"folderHref").append((hasChilds?"":"NoChilds")).append(nodeId).append("\"");
+ element.append("<li id=\"folder").append((hasChilds?"":"NoChilds")).append("_").append(nodeId).append("\"").append((nodeId.equals("0")?" noDrag=\"true\" noSiblings=\"true\" noDelete=\"true\" noRename=\"true\" ":"")).append(">\n");
+ element.append("<a href=\"#\" id=\"folderHref").append((hasChilds?"":"NoChilds")).append("_").append(nodeId).append("\"");
if (strOnDblClick!=null && !strOnDblClick.equals("")) {
element.append(" onclick=\"").append(strOnDblClick).append("return true;\"");
}
element.append(">").append(name).append("</a>\n");
//element.append("</li>\n");
} else {
- element.append("<li id=\"").append(windowTypeNico(action)).append(nodeId).append("\" isElement=\"true\"").append(" noChildren=\"true\"").append(">\n");
- element.append("<a href=\"#\" id=\"child").append(windowTypeNico(action)).append(nodeId).append("\"");
+ element.append("<li id=\"").append(windowTypeNico(action)).append("_").append(nodeId).append("\" isElement=\"true\"").append(" noChildren=\"true\"").append(">\n");
+ element.append("<a href=\"#\" id=\"child").append(windowTypeNico(action)).append("_").append(nodeId).append("\"");
if (strOnDblClick!=null && !strOnDblClick.equals("")) {
element.append(" onclick=\"").append(strOnDblClick).append("return true;\"");
}
|