]> matita.cs.unibo.it Git - helm.git/blobdiff - matitaB/matita/matitaweb.js
Matitaweb: Some bugfixes concerning file flags.
[helm.git] / matitaB / matita / matitaweb.js
index 3b37fc76b0abf1537fc06203b5bda68274163b4a..349097719c405584c88f49a166e99c6ebac399e2 100644 (file)
@@ -688,6 +688,7 @@ function retrieveFile(thefile)
        processor = function(xml)
        {
                if (is_defined(xml)) {  
+                       current_fname = thefile;
                        lockedbackup = ""
                        locked.innerHTML = lockedbackup;
                         // code originally used in google chrome (problems with mozilla)
@@ -701,7 +702,6 @@ function retrieveFile(thefile)
                }
        };
        dialogBox.style.display = "none";
-       current_fname = thefile;
        callServer("open",processor,"file=" + escape(thefile)); 
 }
 
@@ -816,6 +816,7 @@ function saveFile(fname,lockedtxt,unlockedtxt,force,reloadDialog,reloadFile)
            // 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?")) {
@@ -847,8 +848,6 @@ function createDir() {
    abortDialog();
    dirname = prompt("New directory name:\ncic:/matita/","newdir");
    if (dirname != null) {
-        if (dirname.substr(0,1) != "/")
-          dirname = "/" + dirname;
        processor = function(xml) {
                if (is_defined(xml)) {
                  if (xml.childNodes[0].textContent != "ok") {