File:  [LON-CAPA] / loncom / html / htmlarea / popups / Attic / insert_table.html
Revision 1.2: download - view: text, annotated - select for diffs
Tue Jun 1 23:46:11 2004 UTC (20 years, 1 month ago) by www
Branches: MAIN
CVS tags: version_2_5_X, version_2_5_99_0, version_2_5_2, version_2_5_1, version_2_5_0, version_2_4_X, version_2_4_99_0, version_2_4_2, version_2_4_1, version_2_4_0, version_2_3_X, version_2_3_99_0, version_2_3_2, version_2_3_1, version_2_3_0, version_2_2_X, version_2_2_99_1, version_2_2_99_0, version_2_2_2, version_2_2_1, version_2_2_0, version_2_1_X, version_2_1_99_3, version_2_1_99_2, version_2_1_99_1, version_2_1_99_0, version_2_1_3, version_2_1_2, version_2_1_1, version_2_1_0, version_2_0_X, version_2_0_99_1, version_2_0_2, version_2_0_1, version_2_0_0, version_1_99_3, version_1_99_2, version_1_99_1_tmcc, version_1_99_1, version_1_99_0_tmcc, version_1_99_0, version_1_3_X, version_1_3_3, version_1_3_2, version_1_3_1, version_1_3_0, version_1_2_X, version_1_2_99_1, version_1_2_99_0, version_1_2_1, version_1_2_0, version_1_1_99_5, version_1_1_99_4, version_1_1_99_3, version_1_1_99_2, version_1_1_99_1, version_1_1_99_0, HEAD
Next version HTMLArea.

    1: <html>
    2: 
    3: <head>
    4:   <title>Insert Table</title>
    5: 
    6: <script type="text/javascript" src="popup.js"></script>
    7: 
    8: <script type="text/javascript">
    9: 
   10: window.resizeTo(400, 100);
   11: 
   12: function Init() {
   13:   __dlg_init();
   14:   document.getElementById("f_rows").focus();
   15: };
   16: 
   17: function onOK() {
   18:   var required = {
   19:     "f_rows": "You must enter a number of rows",
   20:     "f_cols": "You must enter a number of columns"
   21:   };
   22:   for (var i in required) {
   23:     var el = document.getElementById(i);
   24:     if (!el.value) {
   25:       alert(required[i]);
   26:       el.focus();
   27:       return false;
   28:     }
   29:   }
   30:   var fields = ["f_rows", "f_cols", "f_width", "f_unit",
   31:                 "f_align", "f_border", "f_spacing", "f_padding"];
   32:   var param = new Object();
   33:   for (var i in fields) {
   34:     var id = fields[i];
   35:     var el = document.getElementById(id);
   36:     param[id] = el.value;
   37:   }
   38:   __dlg_close(param);
   39:   return false;
   40: };
   41: 
   42: function onCancel() {
   43:   __dlg_close(null);
   44:   return false;
   45: };
   46: 
   47: </script>
   48: 
   49: <style type="text/css">
   50: html, body {
   51:   background: ButtonFace;
   52:   color: ButtonText;
   53:   font: 11px Tahoma,Verdana,sans-serif;
   54:   margin: 0px;
   55:   padding: 0px;
   56: }
   57: body { padding: 5px; }
   58: table {
   59:   font: 11px Tahoma,Verdana,sans-serif;
   60: }
   61: form p {
   62:   margin-top: 5px;
   63:   margin-bottom: 5px;
   64: }
   65: .fl { width: 9em; float: left; padding: 2px 5px; text-align: right; }
   66: .fr { width: 7em; float: left; padding: 2px 5px; text-align: right; }
   67: fieldset { padding: 0px 10px 5px 5px; }
   68: select, input, button { font: 11px Tahoma,Verdana,sans-serif; }
   69: button { width: 70px; }
   70: .space { padding: 2px; }
   71: 
   72: .title { background: #ddf; color: #000; font-weight: bold; font-size: 120%; padding: 3px 10px; margin-bottom: 10px;
   73: border-bottom: 1px solid black; letter-spacing: 2px;
   74: }
   75: form { padding: 0px; margin: 0px; }
   76: </style>
   77: 
   78: </head>
   79: 
   80: <body onload="Init()">
   81: 
   82: <div class="title">Insert Table</div>
   83: 
   84: <form action="" method="get">
   85: <table border="0" style="padding: 0px; margin: 0px">
   86:   <tbody>
   87: 
   88:   <tr>
   89:     <td style="width: 4em; text-align: right">Rows:</td>
   90:     <td><input type="text" name="rows" id="f_rows" size="5" title="Number of rows" value="2" /></td>
   91:     <td></td>
   92:     <td></td>
   93:     <td></td>
   94:   </tr>
   95:   <tr>
   96:     <td style="width: 4em; text-align: right">Cols:</td>
   97:     <td><input type="text" name="cols" id="f_cols" size="5" title="Number of columns" value="4" /></td>
   98:     <td style="width: 4em; text-align: right">Width:</td>
   99:     <td><input type="text" name="width" id="f_width" size="5" title="Width of the table" value="100" /></td>
  100:     <td><select size="1" name="unit" id="f_unit" title="Width unit">
  101:       <option value="%" selected="1"  >Percent</option>
  102:       <option value="px"              >Pixels</option>
  103:       <option value="em"              >Em</option>
  104:     </select></td>
  105:   </tr>
  106: 
  107:   </tbody>
  108: </table>
  109: 
  110: <p />
  111: 
  112: <fieldset style="float: left; margin-left: 5px;">
  113: <legend>Layout</legend>
  114: 
  115: <div class="space"></div>
  116: 
  117: <div class="fl">Alignment:</div>
  118: <select size="1" name="align" id="f_align"
  119:   title="Positioning of this image">
  120:   <option value="" selected="1"                >Not set</option>
  121:   <option value="left"                         >Left</option>
  122:   <option value="right"                        >Right</option>
  123:   <option value="texttop"                      >Texttop</option>
  124:   <option value="absmiddle"                    >Absmiddle</option>
  125:   <option value="baseline"                     >Baseline</option>
  126:   <option value="absbottom"                    >Absbottom</option>
  127:   <option value="bottom"                       >Bottom</option>
  128:   <option value="middle"                       >Middle</option>
  129:   <option value="top"                          >Top</option>
  130: </select>
  131: 
  132: <p />
  133: 
  134: <div class="fl">Border thickness:</div>
  135: <input type="text" name="border" id="f_border" size="5" value="1"
  136: title="Leave empty for no border" />
  137: <!--
  138: <p />
  139: 
  140: <div class="fl">Collapse borders:</div>
  141: <input type="checkbox" name="collapse" id="f_collapse" />
  142: -->
  143: <div class="space"></div>
  144: 
  145: </fieldset>
  146: 
  147: <fieldset style="float:right; margin-right: 5px;">
  148: <legend>Spacing</legend>
  149: 
  150: <div class="space"></div>
  151: 
  152: <div class="fr">Cell spacing:</div>
  153: <input type="text" name="spacing" id="f_spacing" size="5" value="1"
  154: title="Space between adjacent cells" />
  155: 
  156: <p />
  157: 
  158: <div class="fr">Cell padding:</div>
  159: <input type="text" name="padding" id="f_padding" size="5" value="1"
  160: title="Space between content and border in cell" />
  161: 
  162: <div class="space"></div>
  163: 
  164: </fieldset>
  165: 
  166: <div style="margin-top: 85px; border-top: 1px solid #999; padding: 2px; text-align: right;">
  167: <button type="button" name="ok" onclick="return onOK();">OK</button>
  168: <button type="button" name="cancel" onclick="return onCancel();">Cancel</button>
  169: </div>
  170: 
  171: </form>
  172: 
  173: </body>
  174: </html>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>