25 require_once dirname(__FILE__).
'/../../../../core/include/init.inc';
26 require_once SQ_LIB_PATH.
'/html_form/html_form.inc';
27 require_once SQ_FUDGE_PATH.
'/var_serialise/var_serialise.inc';
29 if (empty($GLOBALS[
'SQ_SYSTEM']->user) || !($GLOBALS[
'SQ_SYSTEM']->user->canAccessBackend() || $GLOBALS[
'SQ_SYSTEM']->user->type() ==
'simple_edit_user')){
33 if (!isset($_GET[
'title'])) $_GET[
'title'] =
"";
37 <html style=
"width: 400px; height: 200px;">
39 <title>Insert Abbreviation</title>
43 $include_list = Array(sq_web_path(
'lib').
'/js/translation.js');
45 $locales = $GLOBALS[
'SQ_SYSTEM']->lm->getCumulativeLocaleParts($GLOBALS[
'SQ_SYSTEM']->lm->getCurrentLocale());
47 foreach($locales as $locale) {
48 if (file_exists(SQ_DATA_PATH.
'/public/system/core/js_strings.'.$locale.
'.js')) {
49 $include_list[] = sq_web_path(
'data').
'/system/core/js_strings.'.$locale.
'.js';
53 foreach($include_list as $link) {
54 ?><script type=
"text/javascript" src=
"<?php echo $link; ?>"></script>
58 <script type=
"text/javascript" src=
"../../core/popup.js"></script>
59 <script type=
"text/javascript" src=
"<?php echo sq_web_path('fudge').'/var_serialise/var_serialise.js' ?>"></script>
60 <script type=
"text/javascript" src=
"<?php echo sq_web_path('lib').'/html_form/html_form.js' ?>"></script>
61 <script type=
"text/javascript" src=
"<?php echo sq_web_path('lib').'/js/general.js' ?>"></script>
63 <script type=
"text/javascript">
65 setTimeout(
'self.focus()',100);
69 __dlg_init(
"matrixInsertAbbr");
70 setTimeout(
'self.focus()',100);
75 var fields = [
"title"];
76 var param =
new Object();
77 var f = document.main_form;
79 param[
"title"] = form_element_value(f.title);
80 param[
"abbr"] = form_element_value(f.abbr);
82 __dlg_close(
"matrixInsertAbbr", param);
87 __dlg_close(
"matrixInsertAbbr", null);
91 function buildForm() {
92 document.write(
'<tr>');
93 document.write(
'<td class="label"><?php echo translate('abbreviation
'); ?>:</td>');
94 document.write(
'<td colspan="3"><?php text_box('abbr
', preg_replace('/[\
']+/',
'' , trim($_GET[
'abbr'])), 40, 0);?></td>
');
95 document.write('</tr>
');
96 document.write('<tr>
');
97 document.write(' <td
class=
"label"><?php echo translate(
'definition'); ?>:</td>
');
98 document.write(' <td colspan=
"3"><?php text_box(
'title', preg_replace(
'/[\']+/',
'' , trim($_GET[
'title'])), 40, 0);?></td>
');
99 document.write('</tr>
');
104 <style type="text/css">
108 font: 11px Tahoma,Verdana,sans-serif;
115 font: 11px Tahoma,Verdana,sans-serif;
118 /* main popup title */
126 border-bottom: 1px solid black;
130 /* fieldset styles */
132 padding: 0px 10px 5px 5px;
133 border-color: #725B7D;
136 .fl { width: 9em; float: left; padding: 2px 5px; text-align: right; }
137 .fr { width: 7em; float: left; padding: 2px 5px; text-align: right; }
139 /* form and form fields */
140 form { padding: 0px; margin: 0px; }
142 select, input, button {
143 font: 11px Tahoma,Verdana,sans-serif;
150 /* colour picker button styles */
151 .buttonColor, .buttonColor-hilite {
154 border-color: #9E86AA #725B7D #725B7D #9E86AA;
157 .buttonColor-hilite {
158 border-color: #402F48;
161 .buttonColor-chooser, .buttonColor-nocolor, .buttonColor-nocolor-hilite {
165 border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
168 .buttonColor-nocolor, .buttonColor-nocolor-hilite { padding: 0px; }
169 .buttonColor-nocolor-hilite { background: #402F48; color: #FFFFFF; }
173 <body onload="Javascript: Init();">
174 <div class="title"><?php echo translate('insert_abbreviation
'); ?></div>
175 <form action="" method="get" name="main_form">
176 <table width="100%" >
178 <td valign="top" width="100%">
180 <legend><b><?php echo translate('general'); ?></b></legend>
181 <table style="width:100%">
182 <script type="text/javascript">
191 <div style="margin-top: 5px; margin-right: 5px; text-align: right;">
193 <script type="text/javascript" language="javascript">
194 document.write('<button type=
"button" name=
"ok" onclick=
"return onOK();"><?php echo translate(
'ok'); ?></button>
');
196 <button type="button" name="cancel" onclick="return onCancel();"><?php echo translate('cancel
'); ?></button>