2 require("../../../../config.php");
4 $id = optional_param('id', SITEID
, PARAM_INT
);
6 require_course_login($id);
7 @header
('Content-Type: text/html; charset=utf-8');
9 <!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
10 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
13 <meta http
-equiv
="content-type" content
="text/html; charset=utf-8" />
14 <title
><?php
print_string("inserttable","editor");?
></title
>
15 <script type
="text/javascript" src
="popup.js"></script
>
16 <script type
="text/javascript">
21 document
.getElementById('f_rows').focus();
26 "f_rows": "You must enter a number of rows",
27 "f_cols": "You must enter a number of columns"
29 for (var i in required
) {
30 var el
= document
.getElementById(i
);
37 var fields
= ["f_rows", "f_cols", "f_width", "f_unit",
38 "f_align", "f_border", "f_spacing", "f_padding"];
39 var param
= new Object();
40 for (var i in fields
) {
42 var el
= document
.getElementById(id
);
56 <style type
="text/css">
58 background
: ButtonFace
;
60 font
: 11px Tahoma
,Verdana
,sans
-serif
;
64 body
{ padding
: 5px
; }
66 font
: 11px Tahoma
,Verdana
,sans
-serif
;
72 .fl
{ width
: 9em
; float: left
; padding
: 2px
5px
; text
-align
: right
; }
73 .fr
{ width
: 7em
; float: left
; padding
: 2px
5px
; text
-align
: right
; }
74 fieldset
{ padding
: 0px
10px
5px
5px
; }
75 select
, input
, button
{ font
: 11px Tahoma
,Verdana
,sans
-serif
; }
76 button
{ width
: 70px
; }
77 .space
{ padding
: 2px
; }
79 .title
{ background
: #ddf; color: #000; font-weight: bold; font-size: 120%; padding: 3px 10px; margin-bottom: 10px;
80 border
-bottom
: 1px solid black
; letter
-spacing
: 2px
;
82 form
{ padding
: 0px
; margin
: 0px
; }
85 <body onload
="Init()">
87 <div
class="title"><?php
print_string("inserttable","editor") ?
></div
>
89 <form action
="" method
="get">
90 <table border
="0" style
="padding: 0px; margin: 0px">
94 <td style
="width: 4em; text-align: right"><?php
print_string("rows","editor") ?
>:</td
>
95 <td
><input type
="text" name
="f_rows" id
="f_rows" size
="5" title
="Number of rows" value
="2" /></td
>
101 <td style
="width: 4em; text-align: right"><?php
print_string("cols","editor") ?
>:</td
>
102 <td
><input type
="text" name
="f_cols" id
="f_cols" size
="5" title
="Number of columns" value
="4" /></td
>
103 <td style
="width: 4em; text-align: right"><?php
print_string("width","editor") ?
>:</td
>
104 <td
><input type
="text" name
="f_width" id
="f_width" size
="5" title
="Width of the table" value
="100" /></td
>
105 <td
><select size
="1" name
="f_unit" id
="f_unit" title
="Width unit">
106 <option value
="%" selected
="selected" ><?php
print_string("percent","editor") ?
></option
>
107 <option value
="px" ><?php
print_string("pixels","editor") ?
></option
>
108 <option value
="em" >Em
</option
>
117 <fieldset style
="float: left; margin-left: 5px;">
118 <legend
><?php
print_string("layout","editor") ?
></legend
>
120 <div
class="space"></div
>
122 <div
class="fl"><?php
print_string("alignment","editor") ?
>:</div
>
123 <select size
="1" name
="f_align" id
="f_align"
124 title
="Positioning of this image">
125 <option value
="" selected
="selected" ><?php
print_string("notset","editor") ?
></option
>
126 <option value
="left" ><?php
print_string("left","editor") ?
></option
>
127 <option value
="right" ><?php
print_string("right","editor") ?
></option
>
128 <option value
="texttop" ><?php
print_string("texttop","editor") ?
></option
>
129 <option value
="middle" ><?php
print_string("middle","editor") ?
></option
>
130 <option value
="baseline" ><?php
print_string("baseline","editor") ?
></option
>
131 <option value
="absbottom" ><?php
print_string("absbottom","editor") ?
></option
>
132 <option value
="bottom" ><?php
print_string("bottom","editor") ?
></option
>
133 <option value
="middle" ><?php
print_string("middle","editor") ?
></option
>
134 <option value
="top" ><?php
print_string("top","editor") ?
></option
>
139 <div
class="fl"><?php
print_string("borderthickness","editor") ?
>:</div
>
140 <input type
="text" name
="f_border" id
="f_border" size
="5" value
="1"
141 title
="Leave empty for no border" />
145 <div
class="fl">Collapse borders
:</div
>
146 <input type
="checkbox" name
="collapse" id
="f_collapse" />
148 <div
class="space"></div
>
152 <fieldset style
="float:right; margin-right: 5px;">
153 <legend
><?php
print_string("spacing","editor") ?
></legend
>
155 <div
class="space"></div
>
157 <div
class="fr"><?php
print_string("cellspacing","editor") ?
>:</div
>
158 <input type
="text" name
="f_spacing" id
="f_spacing" size
="5" value
="1"
159 title
="Space between adjacent cells" />
163 <div
class="fr"><?php
print_string("cellpadding","editor") ?
>:</div
>
164 <input type
="text" name
="f_padding" id
="f_padding" size
="5" value
="1"
165 title
="Space between content and border in cell" />
167 <div
class="space"></div
>
171 <div style
="margin-top: 85px; text-align: right;">
173 <button type
="button" name
="ok" onclick
="return onOK();"><?php
print_string("ok","editor") ?
></button
>
174 <button type
="button" name
="cancel" onclick
="return onCancel();"><?php
print_string("cancel","editor") ?
></button
>