mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
colour swatch for signature
git-svn-id: file:///svn/phpbb/trunk@4828 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
67755abf25
commit
496e420385
3 changed files with 29 additions and 4 deletions
|
@ -263,7 +263,7 @@ function storeCaret(textEl) {
|
|||
if (textEl.createTextRange) { textEl.caretPos = document.selection.createRange().duplicate(); }
|
||||
}
|
||||
|
||||
function colorPalette()
|
||||
function colorPalette(dir, width, height)
|
||||
{
|
||||
var r = 0, g = 0, b = 0;
|
||||
var numberList = new Array(6);
|
||||
|
@ -275,16 +275,30 @@ function colorPalette()
|
|||
document.writeln('<table cellspacing="1" cellpadding="0" border="0">');
|
||||
for(r = 0; r < 5; r++)
|
||||
{
|
||||
for(g = 0; g < 5; g++)
|
||||
if (dir == 'h')
|
||||
{
|
||||
document.writeln('<tr>');
|
||||
}
|
||||
for(g = 0; g < 5; g++)
|
||||
{
|
||||
if (dir == 'v')
|
||||
{
|
||||
document.writeln('<tr>');
|
||||
}
|
||||
for(b = 0; b < 5; b++)
|
||||
{
|
||||
color = String(numberList[r]) + String(numberList[g]) + String(numberList[b]);
|
||||
document.write('<td bgcolor="#' + color + '">');
|
||||
document.write('<a href="javascript:bbfontstyle(\'[color=#' + color + ']\', \'[/color]\');" onmouseover="helpline(\'s\');"><img src="images/spacer.gif" width="10" height="6" border="0" alt="#' + color + '" title="#' + color + '" /></a>');
|
||||
document.write('<a href="javascript:bbfontstyle(\'[color=#' + color + ']\', \'[/color]\');" onmouseover="helpline(\'s\');"><img src="images/spacer.gif" width="' + width + '" height="' + height + '" border="0" alt="#' + color + '" title="#' + color + '" /></a>');
|
||||
document.writeln('</td>');
|
||||
}
|
||||
if (dir == 'v')
|
||||
{
|
||||
document.writeln('</tr>');
|
||||
}
|
||||
}
|
||||
if (dir == 'h')
|
||||
{
|
||||
document.writeln('</tr>');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -228,7 +228,7 @@ function checkForm()
|
|||
<tr>
|
||||
<td bgcolor="black"><script language="javascript" type="text/javascript"><!--
|
||||
|
||||
colorPalette()
|
||||
colorPalette('v', 10, 7)
|
||||
|
||||
//--></script></td>
|
||||
</tr>
|
||||
|
|
|
@ -85,6 +85,17 @@ function marklist(form_name, status)
|
|||
<tr>
|
||||
<td colspan="9"><textarea class="post" name="signature" rows="6" cols="60" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);">{SIGNATURE}</textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="9"><table cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td bgcolor="black"><script language="javascript" type="text/javascript"><!--
|
||||
|
||||
colorPalette('h', 14, 5)
|
||||
|
||||
//--></script></td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
Loading…
Add table
Reference in a new issue