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