]> matita.cs.unibo.it Git - helm.git/commitdiff
First attempt at dialog boxes.
authorWilmer Ricciotti <ricciott@cs.unibo.it>
Wed, 22 Jun 2011 12:25:51 +0000 (12:25 +0000)
committerWilmer Ricciotti <ricciott@cs.unibo.it>
Wed, 22 Jun 2011 12:25:51 +0000 (12:25 +0000)
matitaB/matita/index.html
matitaB/matita/matitaweb.css [new file with mode: 0644]
matitaB/matita/matitaweb.js

index 223aefa3e7dde49aa79ce6ba0b486ba59f235a91..415a377589431094ec954170028ba8f19ad4989c 100644 (file)
@@ -1,9 +1,8 @@
 <html>
-<head>
-</head>
-                 
+
 <head>
 <script type="text/javascript" src="matitaweb.js"></script>
+<link rel="stylesheet" type="text/css" href="matitaweb.css"/>
 </head>
 
 <body onLoad="initialize();">
@@ -24,6 +23,7 @@
           <A href="javascript:gotoBottom()"><IMG src="icons/bottom.png" 
                                                   id="bottom" alt="Bottom" title="Execute the whole script."></A>
        <INPUT type="TEXT" id="filename" value=""><INPUT type="BUTTON" value="Open" ONCLICK="openFile()"></p>
+          <INPUT type="BUTTON" value="show dialog" id="showdialog" ONCLICK="showDialog()">
 <!--      <INPUT type="BUTTON" value="show sequent" id="showseq" ONCLICK="showSequent()">
           <INPUT type="BUTTON" value="hide sequent" id="hideseq" ONCLICK="hideSequent()">
           <INPUT type="BUTTON" value="selection test" id="hideseq" ONCLICK="test()"> -->
 </td>
 </tr>
 </table>
+
+<div class="dialog" style="display: none;">
+  <p id="dialogTitle">Title</p>
+  <div class="scroll"></div>
+</div>
  </body>
  </html> 
diff --git a/matitaB/matita/matitaweb.css b/matitaB/matita/matitaweb.css
new file mode 100644 (file)
index 0000000..91e5b54
--- /dev/null
@@ -0,0 +1,19 @@
+div.dialog {
+       position:absolute;
+       top: 50%;
+       left: 50%;
+       width:400px;
+       height:300px;
+       margin-top: -150px; /*set to a negative number 1/2 of your height*/
+       margin-left: -200px; /*set to a negative number 1/2 of your width*/
+       border: 1px solid #ccc;
+       background-color: #f3f3f3;
+}
+
+div.scroll {
+       border: 1px;
+       border-style:solid;
+       height:100%; 
+       width:100%; 
+       overflow:auto;
+}
index 423eda674bbd1ed06c54d379dd65e56b5fb78f24..f66223c6e5d097ad76e7758e58798bd6b203d53f 100644 (file)
@@ -11,6 +11,8 @@ var advanceButton;
 var retractButton;
 var cursorButton;
 var bottomButton;
+var dialogBox;
+var dialogTitle;
 var metasenv = "";
 
 function initialize()
@@ -31,6 +33,8 @@ function initialize()
     retractButton = document.getElementById("retract");
     cursorButton = document.getElementById("cursor");
     bottomButton = document.getElementById("bottom");
+    dialogBox = document.getElementById("dialogBox");
+    dialogTitle = document.getElementById("dialogTitle");
   
     // hide sequent view at start
     hideSequent();
@@ -453,6 +457,12 @@ function showSequent() {
   workarea.appendChild(goalcell);
 }
 
+function showDialog(title) {
+
+  dialogBox.display = "block";
+  dialogTitle.innerHTML = title; 
+}
+
 function removeElement(id) {
   var element = document.getElementById(id);
   element.parentNode.removeChild(element);