17 require_once SQ_PACKAGES_PATH.
'/web_services/rest/page_templates/page_rest_resource/page_rest_resource_edit_fns.inc';
40 parent::__construct();
41 $this->static_screens[
'details'][
'force_unlock'] = FALSE;
58 $write_access = $asset->writeAccess(
'attributes');
59 $javascript_files = $asset->attr(
'javascript_files');
62 require_once SQ_LIB_PATH.
'/html_form/html_form.inc';
63 multiple_asset_finder($prefix.
'_javascript_files', $javascript_files, Array(
'file' =>
'D'));
66 foreach ($javascript_files as $index => $assetid) {
67 echo
'<li>'.get_asset_tag_line($assetid).
'</li>';
90 if (!$asset->writeAccess(
'attributes'))
return FALSE;
91 if (empty($_POST[$prefix.
'_javascript_files']))
return FALSE;
93 $javascript_files = $_POST[$prefix.
'_javascript_files'];
94 $save_javascript_files = Array();
95 foreach ($javascript_files as $index => $asset_info) {
96 if (!empty($asset_info[
'assetid'])) {
97 $save_javascript_files[] = $asset_info[
'assetid'];
101 return $asset->setAttrValue(
'javascript_files', $save_javascript_files);
118 $write_access = $asset->writeAccess(
'attributes');
119 $javascript = $asset->attr(
'javascript');
122 require_once SQ_LIB_PATH.
'/html_form/html_form.inc';
123 text_area($prefix.
'_javascript', $javascript, 100, 20, 0,
'style="font-family: monospace;');
125 echo
"<pre>" . htmlspecialchars($javascript) .
"</pre>\n";
128 return $write_access;
146 if (!$asset->writeAccess(
'attributes'))
return FALSE;
148 $js = isset($_POST[$prefix.
'_javascript']) ? $_POST[$prefix.
'_javascript'] :
'';
149 return $asset->setAttrValue(
'javascript', $js);