diff --git a/phpBB/styles/prosilver/template/editor.js b/phpBB/styles/prosilver/template/editor.js index 93506b8d4a..9e5665de99 100644 --- a/phpBB/styles/prosilver/template/editor.js +++ b/phpBB/styles/prosilver/template/editor.js @@ -298,9 +298,12 @@ function storeCaret(textEl) { * Color pallette */ function colorPalette(dir, width, height) { - var r = 0, g = 0, b = 0; - var numberList = new Array(6); - var color = ''; + var r = 0, + g = 0, + b = 0, + numberList = new Array(6); + color = '', + html = ''; numberList[0] = '00'; numberList[1] = '40'; @@ -308,37 +311,46 @@ function colorPalette(dir, width, height) { numberList[3] = 'BF'; numberList[4] = 'FF'; - document.writeln(''); + html += '
'; for (r = 0; r < 5; r++) { - if (dir === 'h') { - document.writeln(''); + if (dir == 'h') { + html += ''; } for (g = 0; g < 5; g++) { - if (dir === 'v') { - document.writeln(''); + if (dir == 'v') { + html += ''; } for (b = 0; b < 5; b++) { color = String(numberList[r]) + String(numberList[g]) + String(numberList[b]); - document.write(''); + html += ''; } - if (dir === 'v') { - document.writeln(''); + if (dir == 'v') { + html += ''; } } - if (dir === 'h') { - document.writeln(''); + if (dir == 'h') { + html += ''; } } - document.writeln('
'); - document.write('#' + color + ''); - document.writeln(''; + html += '#' + color + ''; + html += '
'); + html += ''; + return html; } +(function($) { + $(document).ready(function() { + $('#color_palette_placeholder').each(function() { + $(this).html(colorPalette('h', 15, 10)); + }); + }); +})(jQuery); + /** * Caret Position object */ diff --git a/phpBB/styles/prosilver/template/posting_buttons.html b/phpBB/styles/prosilver/template/posting_buttons.html index 8e87407757..fadbc9b3ca 100644 --- a/phpBB/styles/prosilver/template/posting_buttons.html +++ b/phpBB/styles/prosilver/template/posting_buttons.html @@ -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}'; + } + } // ]]> - +