if (readCookie("session") == null) {
window.location = "/login.html"
} else {
+ matitaTitle = document.getElementById("matitaTitle");
locked = document.getElementById("locked");
unlocked = document.getElementById("unlocked");
workarea = document.getElementById("workarea");
dialogBox = document.getElementById("dialogBox");
dialogTitle = document.getElementById("dialogTitle");
dialogContent = document.getElementById("dialogContent");
+
+ changeFile("test.ma");
// hide sequent view at start
hideSequent();
}
}
+function changeFile(name) {
+ current_fname = name;
+ matitaTitle.innerHTML = "Matita - cic:/matita/" + name;
+}
+
function init_keyboard(target)
{
if (target.addEventListener)
processor = function(xml)
{
if (is_defined(xml)) {
- current_fname = thefile;
+ changeFile(thefile);
lockedbackup = ""
locked.innerHTML = lockedbackup;
// code originally used in google chrome (problems with mozilla)
// when force is true, reloadDialog is not needed
}
processor = function(xml) {
- current_fname = fname;
if (is_defined(xml)) {
if (xml.childNodes[0].textContent != "ok") {
if (confirm("File already exists. All existing data will be lost.\nDo you want to proceed anyway?")) {
reloadDialog();
}
} else {
- current_fname = fname;
+ changeFile(fname);
debug("file saved!");
if (reloadFile) { retrieveFile(fname); }
}