From: Wilmer Ricciotti Date: Wed, 22 Jun 2011 13:19:44 +0000 (+0000) Subject: Show library test 1. X-Git-Tag: make_still_working~2404 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=1bc3859b556a1fa1ddfc83f51f93c17eba40eac7;p=helm.git Show library test 1. --- diff --git a/matitaB/matita/index.html b/matitaB/matita/index.html index ea4d54951..f75482a6e 100644 --- a/matitaB/matita/index.html +++ b/matitaB/matita/index.html @@ -3,6 +3,10 @@ + + + + @@ -23,7 +27,7 @@ Bottom

- + @@ -58,7 +62,7 @@ diff --git a/matitaB/matita/matitadaemon.ml b/matitaB/matita/matitadaemon.ml index 72211bf5f..cd7d71dc9 100644 --- a/matitaB/matita/matitadaemon.ml +++ b/matitaB/matita/matitadaemon.ml @@ -417,11 +417,13 @@ let viewLib (cgi : Netcgi1_compat.Netcgi_types.cgi_activation) = let html = MatitaFilesystem.html_of_library uid in cgi#out_channel#output_string - ("\n" ^ + ((* + "\n" ^ "XML Tree Control\n" ^ "\n" ^ "\n" ^ - "\n" ^ html ^ "\n"); + "\n" ^ *) + html (* ^ "\n" *) ); cgi#out_channel#commit_work() ;; diff --git a/matitaB/matita/matitaweb.js b/matitaB/matita/matitaweb.js index 21478e463..a5bf84adc 100644 --- a/matitaB/matita/matitaweb.js +++ b/matitaB/matita/matitaweb.js @@ -13,6 +13,7 @@ var cursorButton; var bottomButton; var dialogBox; var dialogTitle; +var dialogContent; var metasenv = ""; function initialize() @@ -35,6 +36,7 @@ function initialize() bottomButton = document.getElementById("bottom"); dialogBox = document.getElementById("dialogBox"); dialogTitle = document.getElementById("dialogTitle"); + dialogContent = document.getElementById("dialogContent"); // hide sequent view at start hideSequent(); @@ -445,6 +447,47 @@ function openFile() callServer("open",processor,"file=" + escape(filename.value)); } +function showLibrary() +{ + var req = null; + // pause(); + if (window.XMLHttpRequest) + { + req = new XMLHttpRequest(); + } + else if (window.ActiveXObject) + { + try { + req = new ActiveXObject("Msxml2.XMLHTTP"); + } catch (e) + { + try { + req = new ActiveXObject("Microsoft.XMLHTTP"); + } catch (e) {} + } + } + req.onreadystatechange = function() + { + + rs = req.readyState; + + if(rs == 4) + { + stat = req.status; + stxt = req.statusText; + if(stat == 200) + { + debug(req.responseText); + showDialog("Library",req.responseText); + } + } + }; + req.open("POST", "viewlib"); // + escape(unlocked.innerHTML), true); + req.setRequestHeader("Content-type","application/x-www-form-urlencoded"); + req.send(); + +} + var goalcell; function hideSequent() { @@ -457,10 +500,11 @@ function showSequent() { workarea.appendChild(goalcell); } -function showDialog(title) { +function showDialog(title,content) { + dialogTitle.innerHTML = title; + dialogContent.innerHTML = content; dialogBox.style.display = "block"; - dialogTitle.innerHTML = title; } function removeElement(id) {