X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matitaB%2Fmatita%2Ftreeview%2FxmlTree.js;h=c1a5c997fad566e6612a2603c419fbc3622ee09a;hb=cdb85e803cd6038352ec0a318285f96f42faf02d;hp=9fdbb34dddfea6706baaf1724fb9a0ff78744190;hpb=8886d70b27ac18f4159d66d2b555fb3adf7d6c29;p=helm.git diff --git a/matitaB/matita/treeview/xmlTree.js b/matitaB/matita/treeview/xmlTree.js index 9fdbb34dd..c1a5c997f 100644 --- a/matitaB/matita/treeview/xmlTree.js +++ b/matitaB/matita/treeview/xmlTree.js @@ -3,13 +3,17 @@ openImg.src = "treeview/open.gif"; var closedImg = new Image(); closedImg.src = "treeview/closed.gif"; -function showBranch(branch){ +var diaFilename = document.getElementById("dialogFilename"); + +function showBranch(branch,path){ var objBranch = document.getElementById(branch).style; if(objBranch.display=="block") objBranch.display="none"; else objBranch.display="block"; swapFolder('I' + branch); + // codice per mostrare il path nella casella di testo + selectFile(path); } function swapFolder(img){ @@ -19,3 +23,11 @@ function swapFolder(img){ else objImg.src = closedImg.src; } + +function selectFile(path) { + dialogFilename.value = path; +} + +function dialogOK() { + dialogBox.callback(document.getElementById("dialogFilename").value); +}