let id = newid () in
let name = Filename.basename lpath in
let name = if name <> "." then name else "cic:/matita" in
- "<span class=\"trigger\" onClick=\"showBranch('" ^ id ^ "','" ^ lpath ^ "')\">\n" ^
+ "<span class=\"trigger\" onClick=\"showBranch('" ^ id ^ "','" ^ lpath ^ "/')\">\n" ^
"<img src=\"treeview/closed.gif\" id=\"I" ^ id ^ "\"/>\n" ^
name ^ "<br/></span>\n" ^
"<span class=\"branch\" id=\"" ^ id ^ "\">\n" ^
in
let leaf lpath =
"<img src=\"treeview/doc.gif\"/>\n" ^
- "<a href=\"javascript:retrieveFile('" ^ lpath ^ "')\">" ^
+ "<a href=\"javascript:selectFile('" ^ lpath ^ "')\">" ^
(Filename.basename lpath) ^ "</a><br/>"
in
// but google chrome's innerText is, in a sense, "write only"
// what should we do?
// logarea.innerText = txt + "\n" + logarea.innerText;
- logarea.innerHTML = txt + "\n" + logarea.innerHTML;
+ logarea.innerHTML = txt; // + "\n" + logarea.innerText;
}
function listhd(l)
if (len > 0) {
// len0 = unlocked.innerHTML.length;
unescaped = unlocked.innerHTML.html_to_matita();
- parsedtxt = parsed.childNodes[0].nodeValue;
+ // not working in mozilla
+ // parsedtxt = parsed.childNodes[0].nodeValue;
+ parsedtxt = parsed.childNodes[0].wholeText;
//parsedtxt = unescaped.substr(0,len);
unparsedtxt = unescaped.substr(len);
lockedbackup += parsedtxt;
if (is_defined(xml)) {
lockedbackup = "";
locked.innerHTML = lockedbackup;
- unlocked.innerHTML = xml.documentElement.textContent;
+ unlocked.innerHTML = xml.documentElement.wholeText;
} else {
debug("file open failed");
}