25 require_once dirname(__FILE__).
'/../../../../core/include/init.inc';
26 require_once dirname(__FILE__).
'/../../wysiwyg_plugin.inc';
28 if (empty($GLOBALS[
'SQ_SYSTEM']->user) || !($GLOBALS[
'SQ_SYSTEM']->user->canAccessBackend() || $GLOBALS[
'SQ_SYSTEM']->user->type() ==
'simple_edit_user')){
34 $_GET[
'f_bgcolor'] = preg_replace(
'/[^a-zA-Z_0-9 ]+/',
'', $_GET[
'f_bgcolor']);
35 $_GET[
'f_color'] = preg_replace(
'/[^a-zA-Z_0-9 ]+/',
'', $_GET[
'f_color']);
36 $_GET[
'f_borderColor'] = preg_replace(
'/[^a-zA-Z_0-9 ]+/',
'', $_GET[
'f_borderColor']);
38 <html style=
"width:380px; height:270px;">
41 <title>Edit Row Properties</title>
42 <script type=
"text/javascript" src=
"../../core/popup.js"></script>
43 <script type=
"text/javascript" src=
"../../core/dialog.js"></script>
45 <script type=
"text/javascript">
46 function colorPopup(
id) {
47 var field = document.getElementById(
id);
48 var span = document.getElementById(
id +
"_chooser");
49 var color = field.value;
51 var strPage =
"<?php echo $_SERVER['PHP_SELF'].'/../../'.$plugin->get_popup_href('select_color.html', 'select_color')?>";
53 openModalDialog(
"selectColor", strPage, 238, 163,
function(color) {
55 span.style.backgroundColor =
"#" + color;
61 function nullColor(
id) {
62 var field = document.getElementById(
id);
63 var span = document.getElementById(
id +
"_chooser");
64 span.style.backgroundColor =
"";
68 function colorButton(
id, classname) {
69 var btn = document.getElementById(
id +
"_button");
70 btn.className = classname;
74 __dlg_init(
"editRowProperties");
78 var fields = [
"f_width",
"f_height",
"f_widthUnit",
79 "f_heightUnit",
"f_align",
"f_valign",
80 "f_bgcolor",
"f_color",
"f_borderColor",
81 "f_borderWidth",
"f_borderStyle"];
82 var params =
new Object();
83 for (var i in fields) {
85 var el = document.getElementById(
id);
86 params[id] = el.value;
88 __dlg_close(
"editRowProperties", params);
93 __dlg_close(
"editRowProperties", null);
99 <style type=
"text/css">
103 font: 11px Tahoma,Verdana,sans-serif;
110 font: 11px Tahoma,Verdana,sans-serif;
121 border-bottom: 1px solid black;
127 padding: 0px 10px 5px 5px;
128 border-color: #725B7D;
131 .fl { width: 9em;
float: left; padding: 2px 5px; text-align: right; }
132 .fr { width: 7em;
float: left; padding: 2px 5px; text-align: right; }
135 form { padding: 0px; margin: 0px; }
137 select, input, button {
138 font: 11px Tahoma,Verdana,sans-serif;
146 .buttonColor, .buttonColor-hilite {
149 border-color: #9E86AA #725B7D #725B7D #9E86AA;
152 .buttonColor-hilite {
153 border-color: #402F48;
156 .buttonColor-chooser, .buttonColor-nocolor, .buttonColor-nocolor-hilite {
160 border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
163 .buttonColor-nocolor, .buttonColor-nocolor-hilite { padding: 0px; }
164 .buttonColor-nocolor-hilite { background: #402F48; color: #FFFFFF; }
169 <body onLoad=
"Init();">
171 <div
class=
"title">Row Properties</div>
173 <form action=
"" method=
"get">
177 <table width=
"100%" cellspacing=
"0" cellpadding=
"0">
179 <td valign=
"top" width=
"50%">
181 <legend><b>Dimensions</b></legend>
182 <table style=
"width:100%">
184 <td
class=
"label">Width:</td>
186 <input type=
"text" id=
"f_width" size=
"5" value=
"<?php echo htmlspecialchars($_GET['f_width']); ?>" />
187 <select
id=
"f_widthUnit">
188 <option value=
"px" <?php echo ($_GET[
'f_widthUnit'] ==
'px') ?
'selected' :
''; ?>>px</option>
189 <option value=
"%" <?php echo ($_GET[
'f_widthUnit'] ==
'%') ?
'selected' :
''; ?>>%</option>
194 <td
class=
"label">Height:</td>
196 <input type=
"text" id=
"f_height" size=
"5" value=
"<?php echo htmlspecialchars($_GET['f_height']); ?>" />
197 <select
id=
"f_heightUnit">
198 <option value=
"px" <?php echo ($_GET[
'f_heightUnit'] ==
'px') ?
'selected' :
''; ?>>px</option>
199 <option value=
"%" <?php echo ($_GET[
'f_heightUnit'] ==
'%') ?
'selected' :
''; ?>>%</option>
207 <td valign=
"top" width=
"50%">
209 <legend><b>Alignment</b></legend>
210 <table style=
"width:100%">
212 <td
class=
"label">Horiz:</td>
214 <select
id=
"f_align">
215 <option value=
"">none</option>
216 <option value=
"left" <?php echo ($_GET[
'f_align'] ==
'left') ?
'selected' :
''; ?>>left</option>
217 <option value=
"center" <?php echo ($_GET[
'f_align'] ==
'center') ?
'selected' :
''; ?>>center</option>
218 <option value=
"rigth" <?php echo ($_GET[
'f_align'] ==
'right') ?
'selected' :
''; ?>>right</option>
223 <td
class=
"label">Vert:</td>
225 <select
id=
"f_valign">
226 <option value=
"">none</option>
227 <option value=
"top" <?php echo ($_GET[
'f_valign'] ==
'top') ?
'selected' :
''; ?>>top</option>
228 <option value=
"middle" <?php echo ($_GET[
'f_valign'] ==
'middle') ?
'selected' :
''; ?>>middle</option>
229 <option value=
"bottom" <?php echo ($_GET[
'f_valign'] ==
'bottom') ?
'selected' :
''; ?>>bottom</option>
243 <legend><b>Row Styles / Colours</b></legend>
246 <td
class=
"label">Background:</td>
248 <input type=
"hidden" id=
"f_bgcolor" value=
"<?php echo htmlspecialchars($_GET['f_bgcolor']); ?>">
249 <span
class=
"buttonColor" id=
"f_bgcolor_button"><span
class=
"buttonColor-chooser" id=
"f_bgcolor_chooser" style=
"background-color: #<?php echo htmlspecialchars($_GET['f_bgcolor']); ?>" onClick=
"Javascript: colorPopup('f_bgcolor');" onMouseOver=
"Javascript: colorButton('f_bgcolor', 'buttonColor-hilite');" onMouseOut=
"Javascript: colorButton('f_bgcolor', 'buttonColor');"></span><span title=
"Unset Colour" class=
"buttonColor-nocolor" id=
"f_bgcolor_unset" style=
"background-color: #<?php echo htmlspecialchars($_GET['f_bgcolor']); ?>" onClick=
"Javascript: nullColor('f_bgcolor');" onMouseOver=
"Javascript: colorButton('f_bgcolor', 'buttonColor-hilite'); this.className = 'buttonColor-nocolor-hilite';" onMouseOut=
"Javascript: colorButton('f_bgcolor', 'buttonColor'); this.className = 'buttonColor-nocolor';">×</span></span>
253 <td
class=
"label">Foreground:</td>
255 <input type=
"hidden" id=
"f_color" value=
"<?php echo htmlspecialchars($_GET['f_color']); ?>">
256 <span
class=
"buttonColor" id=
"f_color_button"><span
class=
"buttonColor-chooser" id=
"f_color_chooser" style=
"background-color: #<?php echo htmlspecialchars($_GET['f_color']); ?>" onClick=
"Javascript: colorPopup('f_color');" onMouseOver=
"Javascript: colorButton('f_color', 'buttonColor-hilite');" onMouseOut=
"Javascript: colorButton('f_color', 'buttonColor');"></span><span title=
"Unset Colour" class=
"buttonColor-nocolor" id=
"f_color_unset" style=
"background-color: #<?php echo htmlspecialchars($_GET['f_color']); ?>" onClick=
"Javascript: nullColor('f_color');" onMouseOver=
"Javascript: colorButton('f_color', 'buttonColor-hilite'); this.className = 'buttonColor-nocolor-hilite';" onMouseOut=
"Javascript: colorButton('f_color', 'buttonColor'); this.className = 'buttonColor-nocolor';">×</span></span>
260 <td
class=
"label" valign=
"top">Border:</td>
261 <td width=
"100%" valign=
"top">
262 <input type=
"hidden" id=
"f_borderColor" value=
"<?php echo htmlspecialchars($_GET['f_borderColor']); ?>">
263 <span
class=
"buttonColor" id=
"f_borderColor_button"><span
class=
"buttonColor-chooser" id=
"f_borderColor_chooser" style=
"background-color: #<?php echo htmlspecialchars($_GET['f_borderColor']); ?>" onClick=
"Javascript: colorPopup('f_borderColor');" onMouseOver=
"Javascript: colorButton('f_borderColor', 'buttonColor-hilite');" onMouseOut=
"Javascript: colorButton('f_borderColor', 'buttonColor');"></span><span title=
"Unset Colour" class=
"buttonColor-nocolor" id=
"f_borderColor_unset" style=
"background-color: #<?php echo htmlspecialchars($_GET['f_borderColor']); ?>" onClick=
"Javascript: nullColor('f_borderColor');" onMouseOver=
"Javascript: colorButton('f_borderColor', 'buttonColor-hilite'); this.className = 'buttonColor-nocolor-hilite';" onMouseOut=
"Javascript: colorButton('f_borderColor', 'buttonColor'); this.className = 'buttonColor-nocolor';">×</span></span>
265 <select
id=
"f_borderStyle">
266 <option value=
"none" <?php echo ($_GET[
'f_borderStyle'] ==
'none') ?
'selected' :
''; ?>>None</option>
267 <option value=
"dotted" <?php echo ($_GET[
'f_borderStyle'] ==
'dotted') ?
'selected' :
''; ?>>Dotted</option>
268 <option value=
"dashed" <?php echo ($_GET[
'f_borderStyle'] ==
'dashed') ?
'selected' :
''; ?>>Dashed</option>
269 <option value=
"solid" <?php echo ($_GET[
'f_borderStyle'] ==
'solid') ?
'selected' :
''; ?>>Solid</option>
270 <option value=
"double" <?php echo ($_GET[
'f_borderStyle'] ==
'double') ?
'selected' :
''; ?>>Double</option>
271 <option value=
"groove" <?php echo ($_GET[
'f_borderStyle'] ==
'groove') ?
'selected' :
''; ?>>Grooved</option>
272 <option value=
"ridge" <?php echo ($_GET[
'f_borderStyle'] ==
'ridge') ?
'selected' :
''; ?>>Ridged</option>
273 <option value=
"inset" <?php echo ($_GET[
'f_borderStyle'] ==
'inset') ?
'selected' :
''; ?>>Inset</option>
274 <option value=
"outset" <?php echo ($_GET[
'f_borderStyle'] ==
'outset') ?
'selected' :
''; ?>>Outset</option>
277 <input type=
"text" id=
"f_borderWidth" size=
"5" value=
"<?php echo htmlspecialchars($_GET['f_borderWidth']); ?>" /> px
286 <div style=
"text-align: right;">
288 <button type=
"button" name=
"ok" onclick=
"return onOK();">OK</button>
290 <button type=
"button" name=
"cancel" onclick=
"return onCancel();">Cancel</button>