From cb08c873cc14294107ff7a14534d670545726974 Mon Sep 17 00:00:00 2001
From: Christophe Dumez <christophe@nexedi.com>
Date: Mon, 24 Apr 2006 09:29:28 +0000
Subject: [PATCH] - implemented getAllParentsIds() to make commit from popup
 menu work in some cases it wasn't (removed file in a removed folder)

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@6875 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 ...inessTemplate_doCreateJavaScriptStatus.xml |  3 +-
 .../erp5_svn/js/dhtmlXTree.js.xml             | 30 +++++++++----------
 2 files changed, 15 insertions(+), 18 deletions(-)

diff --git a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_doCreateJavaScriptStatus.xml b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_doCreateJavaScriptStatus.xml
index b7d580902d..f4e84c7a70 100644
--- a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_doCreateJavaScriptStatus.xml
+++ b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/BusinessTemplate_doCreateJavaScriptStatus.xml
@@ -154,8 +154,7 @@ print \'\'\'\n
         }\n
       }\n
       if(popup==1){\n
-        //TODO\n
-        filesPartiallyCheckedArray=[];\n
+        filesPartiallyCheckedArray=tree.getAllParentsIds(tree.getSelectedItemId()).split(\',\');\n
       }else{\n
         filesPartiallyCheckedArray=tree.getAllPartiallyChecked().split(\',\');\n
       }\n
diff --git a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/js/dhtmlXTree.js.xml b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/js/dhtmlXTree.js.xml
index 7ad219c2d5..1d2a56a5d1 100644
--- a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/js/dhtmlXTree.js.xml
+++ b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/js/dhtmlXTree.js.xml
@@ -14,7 +14,7 @@
       <dictionary>
         <item>
             <key> <string>_EtagSupport__etag</string> </key>
-            <value> <string>ts44161193.89</string> </value>
+            <value> <string>ts45870562.28</string> </value>
         </item>
         <item>
             <key> <string>__ac_local_roles__</string> </key>
@@ -34,9 +34,6 @@
             <key> <string>data</string> </key>
             <value> <string encoding="cdata"><![CDATA[
 
- \n
-\n
- \n
 function dhtmlXTreeObject(htmlObject,width,height,rootId){\n
  if(typeof(htmlObject)!="object")\n
  this.parentObject=document.getElementById(htmlObject);\n
@@ -1023,8 +1020,19 @@ dhtmlXTreeObject.prototype._correctCheckStates=function(dhtmlObject){\n
  return temp.parentObject.id;\n
 };\n
 \n
+ dhtmlXTreeObject.prototype.getAllParentsIds=function(itemId)\n
+{\n
+ var temp=this._globalIdStorageFind(itemId);\n
+ if((!temp)||(!temp.parentObject))return "";\n
+ return this._getAllParentsIds(temp.parentObject.id, temp.parentObject.id);\n
+};\n
 \n
-\n
+ dhtmlXTreeObject.prototype._getAllParentsIds=function(itemId, id_list)\n
+{\n
+ var temp=this._globalIdStorageFind(itemId);\n
+ if((!temp)||(!temp.parentObject))return id_list;\n
+ return this._getAllParentsIds(temp.parentObject.id, id_list+\',\'+temp.parentObject.id);\n
+};\n
  \n
  dhtmlXTreeObject.prototype.changeItemId=function(itemId,newItemId)\n
 {\n
@@ -1987,16 +1995,6 @@ dhtmlXTreeObject.prototype._getPrevNode=function(node,mode){\n
  return node.parentObject;\n
  else return -1;\n
 };\n
-\n
- \n
-\n
-\n
-\n
-\n
- \n
-\n
-\n
-\n
 
 
 ]]></string> </value>
@@ -2007,7 +2005,7 @@ dhtmlXTreeObject.prototype._getPrevNode=function(node,mode){\n
         </item>
         <item>
             <key> <string>size</string> </key>
-            <value> <int>52800</int> </value>
+            <value> <int>53275</int> </value>
         </item>
         <item>
             <key> <string>title</string> </key>
-- 
2.30.9