Commit ec1a4987 authored by Christophe Dumez's avatar Christophe Dumez

code clean up

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@6828 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b23c1849
......@@ -69,44 +69,49 @@
<value> <string encoding="cdata"><![CDATA[
if "files" in context.REQUEST.keys():\n
files=context.REQUEST["files"]\n
files = context.REQUEST["files"]\n
else:\n
files=None\n
files = None\n
\n
print \'\'\'<script>var tree = null;\n
print \'\'\'\n
<script>\n
var tree = null;\n
var business_template;\n
var is_expanded=false;\n
var ie = document.all\n
var ns6 = document.getElementById&&!document.all\n
var isMenu = false ;\n
var menuSelObj = null ;\n
var overpopupmenu = false;\n
\n
// This script is intended for use with a minimum of Netscape 4 or IE 4.\n
if(document.getElementById) {\n
\t var upLevel = true;\n
\t} else if(document.layers) {\n
\t var ns4 = true;\n
\t} else if(document.all) {\n
\t var ie4 = true;\n
\t}\n
var upLevel = true;\n
} else if(document.layers) {\n
var ns4 = true;\n
} else if(document.all) {\n
var ie4 = true;\n
}\n
\n
\tfunction preLoadImages(){\n
\t\tvar imSrcAr = new \n
function preLoadImages(){\n
var imSrcAr = new \n
Array(\'document.png\',\'iconCheckAll.gif\',\'line2.gif\',\'minus2.gif\',\'minus5.gif\',\'plus2.gif\',\'plus5.gif\',\'folder_open.png\',\'iconCheckGray.gif\',\'line3.gif\',\'minus3.gif\',\'minus_ar.gif\',\'plus3.gif\',\'plus_ar.gif\',\'folder.png\',\'line1.gif\',\'line4.gif\',\'minus4.gif\',\'minus.gif\',\'plus4.gif\',\'plus.gif\',\'iconUnCheckAll.gif\', \'blank.gif\')\n
\t\tvar imAr = new Array(0);\n
\t\tfor(var i=0;i<imSrcAr.length;i++){\n
\t\t\timAr[imAr.length] = new Image();\n
\t\t\timAr[imAr.length-1].src = \'imgs/\'+imSrcAr[i]\n
\t\t}\n
\t}\n
var imAr = new Array(0);\n
for(var i=0;i<imSrcAr.length;i++){\n
imAr[imAr.length] = new Image();\n
imAr[imAr.length-1].src = \'imgs/\'+imSrcAr[i]\n
}\n
}\n
\n
\tfunction doOnLoad(){\n
\t\tpreLoadImages();\n
\t\t//tree\n
\t\ttree=new dhtmlXTreeObject(document.getElementById(\'treebox1\'),\'100%%\',\'100%%\',0);\n
\t\ttree.setImagePath(\'imgs/\');\n
\t\ttree.setDragHandler();\n
\t\ttree.enableCheckBoxes(true)\n
\t\ttree.enableThreeStateCheckboxes(true);\n
\t\ttree.enableDragAndDrop(false)\n
function doOnLoad(){\n
preLoadImages();\n
tree=new dhtmlXTreeObject(document.getElementById(\'treebox1\'),\'100%%\',\'100%%\',0);\n
tree.setImagePath(\'imgs/\');\n
tree.setDragHandler();\n
tree.enableCheckBoxes(true)\n
tree.enableThreeStateCheckboxes(true);\n
tree.enableDragAndDrop(false)\n
tree.loadXML(\'tree.xml?bt_id=%s\', hideObject)\n
//tree.setOnClickHandler(clickHandler)\n
tree.setOnClickHandler(showMenu)\n
}\n
\n
......@@ -178,14 +183,6 @@ print \'\'\'<script>var tree = null;\n
submitAction(form,\'%s/BusinessTemplate_doSvnCommit\');\n
}\n
}\n
\n
function clickHandler(item_id){\n
if (tree.isItemChecked(item_id) == 0) {\n
tree.setCheck(item_id, 1);\n
}else{\n
tree.setCheck(item_id, 0);\n
}\n
}\n
\n
function viewDiff(popup, form){\n
nbModified=0;\n
......@@ -239,13 +236,8 @@ print \'\'\'<script>var tree = null;\n
}\n
}\n
\n
var ie = document.all\n
var ns6 = document.getElementById&&!document.all\n
var isMenu = false ;\n
var menuSelObj = null ;\n
var overpopupmenu = false;\n
function mouseSelect(e)\n
{\n
function mouseSelect(e)\n
{\n
var obj = ns6 ? e.target.parentNode : event.srcElement.parentElement;\n
if( isMenu )\n
{\n
......@@ -257,10 +249,10 @@ function mouseSelect(e)\n
}\n
}\n
return true;\n
}\n
}\n
\n
function showMenu()\n
{\n
function showMenu()\n
{\n
document.getElementById(\'menudiv\').style.left = mouseX;\n
document.getElementById(\'menudiv\').style.top = mouseY;\n
document.getElementById(\'menudiv\').style.display = "";\n
......@@ -269,10 +261,10 @@ function showMenu()\n
document.getElementById(\'item3\').style.backgroundColor=\'#FFFFFF\';\n
isMenu = true;\n
return false ;\n
}\n
}\n
\n
function getMouse(e)\n
{\n
function getMouse(e)\n
{\n
if(overpopupmenu){\n
document.body.style.cursor = \'default\';\n
}\n
......@@ -286,10 +278,10 @@ function getMouse(e)\n
mouseY = event.clientY+document.body.scrollTop+\'px\';\n
}\n
return true;\n
}\n
}\n
\n
document.onmousedown = mouseSelect;\n
document.onmousemove = getMouse;\n
document.onmousedown = mouseSelect;\n
document.onmousemove = getMouse;\n
\n
function revert(popup,form){\n
if(popup==1){\n
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment