aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/adm/style/acp_styles.html
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/adm/style/acp_styles.html')
-rw-r--r--phpBB/adm/style/acp_styles.html73
1 files changed, 26 insertions, 47 deletions
diff --git a/phpBB/adm/style/acp_styles.html b/phpBB/adm/style/acp_styles.html
index efa06aa538..0908c19480 100644
--- a/phpBB/adm/style/acp_styles.html
+++ b/phpBB/adm/style/acp_styles.html
@@ -51,15 +51,15 @@
<!-- ENDIF -->
<script type="text/javascript" defer="defer">
- <!--
+ // <![CDATA[
function update_image(newimage)
{
- document.getElementById('newimg').src = (newimage) ? "../styles/{NAME}/imageset/" + newimage : "images/no_image.png";
+ document.getElementById('newimg').src = (newimage) ? '../styles/{A_NAME}/imageset/' + encodeURI(newimage) : 'images/no_image.png';
}
- //-->
+ // ]]>
</script>
<script type="text/javascript">
- <!--
+ // <![CDATA[
/**
* Handle displaying/hiding the dimension fields
*/
@@ -85,7 +85,7 @@
dE('img_dimensions', -1);
<!-- ENDIF -->
}
- //-->
+ // ]]>
</script>
<form method="post" action="{U_ACTION}">
@@ -153,33 +153,6 @@
<!-- ELSEIF S_EDIT_TEMPLATE or S_EDIT_THEME -->
- <script type="text/javascript" defer="defer">
- <!--
- function append_text_rows(form_name, value)
- {
- url = document.getElementById(form_name).action;
- var_start = url.indexOf('&text_rows=');
- if (var_start == -1)
- {
- document.getElementById(form_name).action = url + "&text_rows=" + value;
- }
- else
- {
- url_start = url.substring(0, var_start + 1);
- var_end = url.substring(var_start + 1).indexOf('&');
- if (var_end == -1)
- {
- document.getElementById(form_name).action = url_start + "text_rows=" + value;
- }
- else
- {
- document.getElementById(form_name).action = url_start + url.substring(var_end + var_start + 2) + "&text_rows=" + value;
- }
- }
- }
- //-->
- </script>
-
<a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a>
<h1>{L_EDIT}</h1>
@@ -204,10 +177,17 @@
<!-- IF TEMPLATE_FILE or (S_EDIT_THEME and S_THEME_IN_DB) -->
<script type="text/javascript" defer="defer">
- <!--
+ // <![CDATA[
function change_editor_height(height)
{
+ height = Number(height);
+
+ if (isNaN(height))
+ {
+ return;
+ }
+
editor = document.getElementById('template_data');
editor.rows = Math.max(5, Math.min(height, 999));
@@ -217,7 +197,18 @@
function append_text_rows(form_name, value)
{
+ value = Number(value);
+
+ if (isNaN(value))
+ {
+ return;
+ }
+
url = document.getElementById(form_name).action;
+
+ // Make sure &amp; is actually... &
+ url = url.replace(/&amp;/g, '&');
+
var_start = url.indexOf('&text_rows=');
if (var_start == -1)
{
@@ -238,7 +229,7 @@
}
}
- //-->
+ // ]]>
</script>
<form id="acp_template" method="post" action="{U_ACTION}">
@@ -269,18 +260,6 @@
<!-- ELSEIF S_CACHE -->
- <script type="text/javascript">
- <!--
-
- function viewsource(url)
- {
- window.open(url, '_source', 'HEIGHT=550,resizable=yes,scrollbars=yes,WIDTH=750');
- return false;
- }
-
- //-->
- </script>
-
<a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a>
<h1>{L_TEMPLATE_CACHE}</h1>
@@ -304,7 +283,7 @@
<tbody>
<!-- BEGIN file -->
<!-- IF file.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
- <td><a href="{file.U_VIEWSOURCE}" onclick="viewsource('{file.UA_VIEWSOURCE}');return false">{file.FILENAME}</a></td>
+ <td><a href="{file.U_VIEWSOURCE}" onclick="popup(this.href, 750, 550, '_source'); return false;">{file.FILENAME}</a></td>
<td>{file.FILESIZE}</td>
<td>{file.CACHED}</td>
<td>{file.MODIFIED}</td>