28 header(
'Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0');
29 header(
'Pragma: no-cache');
30 header(
'Expires: '.gmdate(
'D, d M Y H:i:s',time()-3600).
' GMT');
32 include(dirname(__FILE__).
'/header.php');
34 <script type=
"text/javascript" src=
"<?php echo sq_web_path('lib')?>/js/general.js"></script>
35 <script type=
"text/javascript">
37 function popup_init() {
39 var data = owner.bodycopy_current_edit[
"data"][
"attributes"];
40 available_types = owner.bodycopy_current_edit[
"data"][
"available_types"];
41 var f = document.main_form;
43 f.identifier.value = (data[
'identifier'] == null) ?
"" : data[
'identifier'];
44 f.desc.value = (data[
'desc'] == null) ?
"" : data[
'desc'];
45 f.dir.value = (data[
'dir'] == null) ?
"" : data[
'dir'];
46 f.css_class.value = (data[
'css_class'] == null) ?
"" : data[
'css_class'];
48 css_class_list = owner.bodycopy_current_edit[
"data"][
"available_classes"];
49 if (css_class_list != null) {
52 for (var key in css_class_list) {
53 f.css_class_list.options[i] =
new Option(css_class_list[key], key);
54 if (key == f.css_class.value) {
55 f.css_class_list.value = f.css_class.value;
61 f.css_class_list.options[0].value = f.css_class.value;
65 f.divid.value = owner.bodycopy_current_edit[
"data"][
"divid"];
66 f.bodycopy_name.value = owner.bodycopy_current_edit[
"bodycopy_name"];
67 owner.highlight_combo_value(f.layout_type, data[
'layout_type']);
70 for(var i = f.content_type.options.length - 1; i >= 0; i--) {
71 f.content_type.options[i] = null;
76 f.content_type.options[i] =
new Option(
'<?php echo translate('content_type_no_change
'); ?>',
"");
78 for(var key in available_types) {
79 if (available_types[key] == null)
continue;
80 if(available_types[key][
"name"] != null) {
81 f.content_type.options[i] =
new Option(available_types[key][
"name"], key);
86 if (typeof data[
"content_type"] ==
'undefined' && typeof available_types[
'content_type_wysiwyg'] !=
'undefined')
87 data[
"content_type"] =
'content_type_wysiwyg';
88 owner.highlight_combo_value(f.content_type,
'');
89 f.disable_keywords.checked = (data[
"disable_keywords"] ==
"1");
93 function popup_save(f) {
94 var data =
new Object();
95 data[
"identifier"] = owner.form_element_value(f.identifier);
96 data[
"desc"] = owner.form_element_value(f.desc);
97 data[
"css_class"] = owner.form_element_value(f.css_class);
98 data[
"layout_type"] = owner.form_element_value(f.layout_type);
99 data[
"content_type"] = owner.form_element_value(f.content_type);
100 data[
"disable_keywords"] = owner.form_element_value(f.disable_keywords);
101 data[
"dir"] = owner.form_element_value(f.dir);
102 if (f.css_class_list.options.length > 1) {
103 classes =
new Array();
104 for(var i = 1; i < f.css_class_list.options.length; i++) {
105 classes.push(f.css_class_list.options[i].value);
107 data[
"css_class_list"] = classes;
109 owner.bodycopy_save_div_properties(data);
112 function set_class(value) {
113 document.main_form.css_class.value = value;
119 <?php echo translate(
'div_properties'); ?>
121 <script type=
"text/javascript">
122 if (owner.bodycopy_current_edit[
"can_delete"] ==
false) { document.getElementById(
'sq_edit_div_props_delete').innerHTML =
' '; }
124 <form name=
"main_form">
125 <input type=
"hidden" name=
"bodycopy_name" value=
"">
126 <input type=
"hidden" name=
"divid" value=
"">
127 <table width=
"100%" border=
"0">
131 <legend><b><?php echo translate(
'identification'); ?></b></legend>
132 <table style=
"width:100%">
134 <td
class=
"label"><?php echo translate(
'name'); ?>:</td>
135 <td><input type=
"text" name=
"identifier" value=
"" size=
"25"></td>
138 <td
class=
"label"><?php echo translate(
'description'); ?>:</td>
139 <td><textarea name=
"desc" rows=
"3" size=
"25" value=
""></textarea></td>
144 <legend><b><?php echo translate(
'style_information'); ?></b></legend>
145 <table style=
"width:100%">
147 <td
class=
"bodycopy-popup-heading"><?php echo translate(
'presentation'); ?>:</td>
149 <select name=
"layout_type">
150 <option value=
"div" ><?php echo translate(
'block-level'); ?></option>
151 <option value=
"span"><?php echo translate(
'inline'); ?></option>
152 <option value=
"none"><?php echo translate(
'raw_html'); ?></option>
157 <td
class=
"label"><?php echo translate(
'class'); ?>:</td>
159 <input type=
"text" name=
"css_class" value=
"" size=
"15"><br />
160 <select name=
"css_class_list" onchange=
"set_class(this.value);">
161 <option value=
""><?php echo translate(
'content_type_no_change'); ?></option>
172 <legend><b><?php echo translate(
'text_direction'); ?></b></legend>
173 <table style=
"width:100%">
175 <td
class=
"bodycopy-popup-heading"><?php echo translate(
'bodycopy_direction'); ?></td>
178 <option value=
""><?php echo translate(
'content_type_no_change'); ?></option>
179 <option value=
"ltr"><?php echo translate(
'bodycopy_left_to_right'); ?></option>
180 <option value=
"rtl"><?php echo translate(
'bodycopy_right_to_left'); ?></option>
191 <legend><b><?php echo translate(
'content_type'); ?></b></legend>
192 <table style=
"width:100%">
195 if ($this->status & SQ_SC_STATUS_SAFE_EDITING) {
196 echo translate(
'changing_div_not_allowed_in_safe_edit');
200 <td
class=
"label"><?php echo translate(
'content_type'); ?>:</td>
202 <select name=
"content_type">
203 <option value=
""> </option>
204 <option value=
""> </option>
205 <option value=
""> </option>
213 <td
class=
"label"><?php echo translate(
'disable_keywords'); ?>:</td>
214 <td><input type=
"checkbox" name=
"disable_keywords" value=
"1"></td>
223 <legend><b><?php echo translate(
'delete_this_div'); ?></b></legend>
226 if ($this->status & SQ_SC_STATUS_SAFE_EDITING) {
227 echo translate(
'delete_this_div_not_allowed_safe_edit');
230 else if ($GLOBALS[
'SQ_SYSTEM']->getUserPrefs(
'bodycopy_container',
'SQ_DIV_DISABLE_DELETE') ===
'yes'){
231 echo translate(
'bodycopy_pref_cannot_insert_new');
239 <td
class=
"label"><?php echo translate(
'click_icon_to_delete'); ?>:</td>
241 <?php sq_print_icon(sq_web_path(
'data').
'/asset_types/bodycopy/images/icons/delete.png', 16, 16,
'Delete this Div',
'Delete this Div',
'onclick="owner.bodycopy_delete_div(document.main_form.bodycopy_name.value, document.main_form.divid.value);" style="cursor: pointer;"'); ?>
253 <div style=
"text-align: center;">
254 <button type=
"button" name=
"ok" onClick=
"javascript: popup_save(this.form)"><?php echo translate(
'ok'); ?></button>
256 <button type=
"button" name=
"cancel" onClick=
"javascript: popup_close();"><?php echo translate(
'cancel'); ?></button>
263 <?php include(dirname(__FILE__).
'/footer.php'); ?>