]> matita.cs.unibo.it Git - helm.git/commitdiff
Matitaweb: Save as...
authormatitaweb <claudio.sacerdoticoen@unibo.it>
Thu, 8 Sep 2011 14:44:58 +0000 (14:44 +0000)
committermatitaweb <claudio.sacerdoticoen@unibo.it>
Thu, 8 Sep 2011 14:44:58 +0000 (14:44 +0000)
matitaB/matita/index.html
matitaB/matita/matitaFilesystem.ml
matitaB/matita/matitaweb.js
matitaB/matita/treeview/xmlTree.js

index cfaeddc4097c0afd45e0b2741b75ca0373383be1..e16fe6d15b4d4f42e9df0e01bc8d2b1733d6c8df 100644 (file)
@@ -27,8 +27,9 @@
                                                title="Execute the script until the current position of the cursor."></A>
           <A href="javascript:gotoBottom()"><IMG src="icons/bottom.png" 
                                                  id="bottom" alt="Bottom" title="Execute the whole script."></A>
-          <INPUT type="BUTTON" value="Browse library" id="showdialog" ONCLICK="showLibrary()">
+          <INPUT type="BUTTON" value="Browse library" id="showdialog" ONCLICK="openDialog()">
           <INPUT type="BUTTON" value="Save" id="savebutton" ONCLICK="saveFile()">
+          <INPUT type="BUTTON" value="Save as" id="savebutton" ONCLICK="saveDialog()">
           <INPUT type="BUTTON" value="Commit" id="commitbutton" ONCLICK="commitAll()"></p>
 <!--      <INPUT type="BUTTON" value="show sequent" id="showseq" ONCLICK="showSequent()">
           <INPUT type="BUTTON" value="hide sequent" id="hideseq" ONCLICK="hideSequent()">
index b6a26f98bf5cb89d85ed722c6e3e682df50a9a78..2686fff42991037c26ee03ee09a4f38388bee38e 100644 (file)
@@ -82,7 +82,7 @@ let html_of_library uid =
   in
   let leaf lpath =
     "<img src=\"treeview/doc.gif\"/>\n" ^
-    "<a href=\"javascript:void(0)\" onClick=\"selectFile('" ^ lpath ^ "')\" onDblClick=\"retrieveFile('" ^ lpath ^ "')\">" ^ 
+    "<a href=\"javascript:void(0)\" onClick=\"selectFile('" ^ lpath ^ "')\" onDblClick=\"dialogBox.callback('" ^ lpath ^ "')\">" ^ 
      (Filename.basename lpath) ^ "</a><br/>"
   in
 
index 221ef90b56f3c6361d5338d48c71d5a89548498e..48acfe13e223a0118b03b5d96ddc7b1a36250513 100644 (file)
@@ -693,13 +693,17 @@ function openDialog()
 
 function saveDialog()
 {  
-       callback = function (fname) { saveFile(fname,false); };
+       callback = function (fname) { 
+         dialogBox.style.display = "none";
+         current_fname = fname;
+          saveFile(fname,false); 
+        };
        showLibrary("Save file as", callback);
 }
 
 function saveFile(fname,force)
 {
-        if (!is_defined(fname) {
+        if (!is_defined(fname)) {
             fname = current_fname;
         }
        processor = function(xml) {
index 18153485936aaaf9ef36d3c41c2f7a4d5f965c1e..c1a5c997fad566e6612a2603c419fbc3622ee09a 100644 (file)
@@ -29,5 +29,5 @@ function selectFile(path) {
 }\r
 \r
 function dialogOK() {\r
-          retrieveFile(document.getElementById("dialogFilename").value);\r
+          dialogBox.callback(document.getElementById("dialogFilename").value);\r
 }\r