]> matita.cs.unibo.it Git - helm.git/commitdiff
Changed behavior in matitaweb.js, function retrieveFile (it is now
authormatitaweb <claudio.sacerdoticoen@unibo.it>
Wed, 7 Sep 2011 13:47:44 +0000 (13:47 +0000)
committermatitaweb <claudio.sacerdoticoen@unibo.it>
Wed, 7 Sep 2011 13:47:44 +0000 (13:47 +0000)
compatible with Firefox, hopefully).

matitaB/matita/matitadaemon.ml
matitaB/matita/matitaweb.js
matitaB/matita/netplex.conf

index 5abb8ad07e8f90dd03f0e718556b0127d8aa72e5..61b2dc5479a311eddd69c2b7c831fdee11647b3f 100644 (file)
@@ -269,7 +269,7 @@ let register (cgi : Netcgi1_compat.Netcgi_types.cgi_activation) =
   (try 
     MatitaAuthentication.add_user uid userpw;
 (*    env#set_output_header_field "Location" "/index.html" *)
-    cgi#outchannel#output_string
+    cgi#out_channel#output_string
      ("<html><head><meta http-equiv=\"refresh\" content=\"2;url=/login.html\">"
      ^ "</head><body>Redirecting to login page...</body></html>")
    with
@@ -309,7 +309,7 @@ let login (cgi : Netcgi1_compat.Netcgi_types.cgi_activation) =
     env#set_output_header_field 
       "Set-Cookie" ("session=" ^ (Uuidm.to_string sid));
 (*    env#set_output_header_field "Location" "/index.html" *)
-    cgi#outchannel#output_string
+    cgi#out_channel#output_string
      ("<html><head><meta http-equiv=\"refresh\" content=\"2;url=/index.html\">"
      ^ "</head><body>Redirecting to Matita page...</body></html>")
    end
index 07dbb06f68c7ce6717b442fbc1c716551caff28f..86481a1ed15417a77dc3cdbc732cc02d17ceb7ee 100644 (file)
@@ -178,7 +178,8 @@ function debug(txt)
         // internet explorer (v.9) doesn't work with innerHTML
        // but google chrome's innerText is, in a sense, "write only"
        // what should we do?
-        logarea.innerText = txt + "\n" + logarea.innerText;
+        // logarea.innerText = txt + "\n" + logarea.innerText;
+        logarea.innerHTML = txt + "\n" + logarea.innerHTML;
 }
 
 function listhd(l)
@@ -626,8 +627,11 @@ function retrieveFile(thefile)
                if (is_defined(xml)) {  
                        lockedbackup = ""
                        locked.innerHTML = lockedbackup;
-                       debug(xml.getElementsByTagName("file")[0].childNodes[0].nodeValue);
-                       unlocked.innerHTML = xml.getElementsByTagName("file")[0].childNodes[0].nodeValue;
+                        // code originally used in google chrome (problems with mozilla)
+                       // debug(xml.getElementsByTagName("file")[0].childNodes[0].nodeValue);
+                       // unlocked.innerHTML = xml.getElementsByTagName("file")[0].childNodes[0].nodeValue;
+                       debug(xml.childNodes[0].textContent);
+                       unlocked.innerHTML = xml.childNodes[0].textContent;
 
                } else {
                        debug("file open failed");
index 8764b1738f220c7fc6be9aa1e25e1a64d459f26f..10e9c55dcfbe0a6a94419133bc45255fb0187707 100644 (file)
@@ -27,7 +27,7 @@ netplex {
           path = "/";
           service {
             type = "file";
-            docroot = "/home/barolo/matitaB/matita";
+            docroot = "/home/matitaweb/matita/matita";
             media_types_file = "/etc/mime.types";
             enable_listings = true;
           }