1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-29 11:10:18 +02:00

[ticket/11275] Do not use document.write() for color palette

Replace document.write() for color palette function

PHPBB3-11275
This commit is contained in:
Vjacheslav Trushkin
2013-04-12 16:40:32 +03:00
parent c25dfef770
commit fafbce8124
2 changed files with 44 additions and 39 deletions

View File

@@ -35,37 +35,30 @@
var panels = new Array('options-panel', 'attach-panel', 'poll-panel');
var show_panel = 'options-panel';
function change_palette()
{
dE('colour_palette');
e = document.getElementById('colour_palette');
if (e.style.display == 'block')
{
document.getElementById('bbpalette').value = '{LA_FONT_COLOR_HIDE}';
}
else
{
document.getElementById('bbpalette').value = '{LA_FONT_COLOR}';
}
}
// ]]>
</script>
<script type="text/javascript" src="{T_SUPER_TEMPLATE_PATH}/editor.js"></script>
<!-- INCLUDEJS template/editor.js -->
<!-- IF S_BBCODE_ALLOWED -->
<div id="colour_palette" style="display: none;">
<dl style="clear: left;">
<dt><label>{L_FONT_COLOR}{L_COLON}</label></dt>
<dd>
<script type="text/javascript">
// <![CDATA[
function change_palette()
{
dE('colour_palette');
e = document.getElementById('colour_palette');
if (e.style.display == 'block')
{
document.getElementById('bbpalette').value = '{LA_FONT_COLOR_HIDE}';
}
else
{
document.getElementById('bbpalette').value = '{LA_FONT_COLOR}';
}
}
colorPalette('h', 15, 10);
// ]]>
</script>
</dd>
<dd id="color_palette_placeholder"></dd>
</dl>
</div>