diff options
author | Oliver Schramm <oliver.schramm97@gmail.com> | 2013-07-24 12:41:40 +0200 |
---|---|---|
committer | Oliver Schramm <oliver.schramm97@gmail.com> | 2013-07-24 13:31:12 +0200 |
commit | 0dcf24acc10e7ad52bf47c39faf14b118fd1566d (patch) | |
tree | 4fb79248ee24f027b2400cca0bce601e3b745983 /phpBB/styles | |
parent | f0516b7d2a0ac0e1fbf6832cfcfde119ad508907 (diff) | |
download | forums-0dcf24acc10e7ad52bf47c39faf14b118fd1566d.tar forums-0dcf24acc10e7ad52bf47c39faf14b118fd1566d.tar.gz forums-0dcf24acc10e7ad52bf47c39faf14b118fd1566d.tar.bz2 forums-0dcf24acc10e7ad52bf47c39faf14b118fd1566d.tar.xz forums-0dcf24acc10e7ad52bf47c39faf14b118fd1566d.zip |
[ticket/8228] Fix whitespaces before code in Firefox
Based on the "[code] enhancements" modification by TerraFrost
PHPBB3-8228
Diffstat (limited to 'phpBB/styles')
-rw-r--r-- | phpBB/styles/prosilver/template/bbcode.html | 4 | ||||
-rw-r--r-- | phpBB/styles/prosilver/template/forum_fn.js | 5 | ||||
-rw-r--r-- | phpBB/styles/prosilver/theme/colours.css | 2 | ||||
-rw-r--r-- | phpBB/styles/prosilver/theme/content.css | 2 | ||||
-rw-r--r-- | phpBB/styles/subsilver2/template/bbcode.html | 4 |
5 files changed, 9 insertions, 8 deletions
diff --git a/phpBB/styles/prosilver/template/bbcode.html b/phpBB/styles/prosilver/template/bbcode.html index c0c0a2da46..460d102c28 100644 --- a/phpBB/styles/prosilver/template/bbcode.html +++ b/phpBB/styles/prosilver/template/bbcode.html @@ -12,8 +12,8 @@ <!-- BEGIN quote_open --><blockquote class="uncited"><div><!-- END quote_open --> <!-- BEGIN quote_close --></div></blockquote><!-- END quote_close --> -<!-- BEGIN code_open --><dl class="codebox"><dt>{L_CODE}{L_COLON} <a href="#" onclick="selectCode(this); return false;">{L_SELECT_ALL_CODE}</a></dt><dd><code><!-- END code_open --> -<!-- BEGIN code_close --></code></dd></dl><!-- END code_close --> +<!-- BEGIN code_open --><dl class="codebox"><dt>{L_CODE}{L_COLON} <a href="#" onclick="selectCode(this); return false;">{L_SELECT_ALL_CODE}</a></dt><dd><pre><!-- END code_open --> +<!-- BEGIN code_close --></pre></dd></dl><!-- END code_close --> <!-- BEGIN inline_attachment_open --><div class="inline-attachment"><!-- END inline_attachment_open --> <!-- BEGIN inline_attachment_close --></div><!-- END inline_attachment_close --> diff --git a/phpBB/styles/prosilver/template/forum_fn.js b/phpBB/styles/prosilver/template/forum_fn.js index eccb12e827..42a68a2ef5 100644 --- a/phpBB/styles/prosilver/template/forum_fn.js +++ b/phpBB/styles/prosilver/template/forum_fn.js @@ -187,7 +187,7 @@ function displayBlocks(c, e, t) { function selectCode(a) { // Get ID of code block - var e = a.parentNode.parentNode.getElementsByTagName('CODE')[0]; + var e = a.parentNode.parentNode.getElementsByTagName('PRE')[0]; var s, r; // Not IE and IE9+ @@ -205,7 +205,8 @@ function selectCode(a) { } r = document.createRange(); - r.selectNodeContents(e); + r.setStart(e.firstChild, 0); + r.setEnd(e.lastChild, e.lastChild.textContent.length); s.removeAllRanges(); s.addRange(r); } diff --git a/phpBB/styles/prosilver/theme/colours.css b/phpBB/styles/prosilver/theme/colours.css index 7d0462be1b..801d607d9c 100644 --- a/phpBB/styles/prosilver/theme/colours.css +++ b/phpBB/styles/prosilver/theme/colours.css @@ -479,7 +479,7 @@ dl.codebox dt { border-bottom-color: #CCCCCC; } -dl.codebox code { +dl.codebox pre { color: #2E8B57; } diff --git a/phpBB/styles/prosilver/theme/content.css b/phpBB/styles/prosilver/theme/content.css index 4b8c972697..0cab12910b 100644 --- a/phpBB/styles/prosilver/theme/content.css +++ b/phpBB/styles/prosilver/theme/content.css @@ -491,7 +491,7 @@ blockquote dl.codebox { margin-left: 0; } -dl.codebox code { +dl.codebox pre { /* Also see tweaks.css */ overflow: auto; display: block; diff --git a/phpBB/styles/subsilver2/template/bbcode.html b/phpBB/styles/subsilver2/template/bbcode.html index efcf5e1acb..5558716cad 100644 --- a/phpBB/styles/subsilver2/template/bbcode.html +++ b/phpBB/styles/subsilver2/template/bbcode.html @@ -21,11 +21,11 @@ <!-- END quote_close --> <!-- BEGIN code_open --> -<div class="codetitle"><b>{L_CODE}{L_COLON}</b></div><div class="codecontent"> +<div class="codetitle"><b>{L_CODE}{L_COLON}</b></div><pre class="codecontent"> <!-- END code_open --> <!-- BEGIN code_close --> -</div> +</pre> <!-- END code_close --> <!-- BEGIN inline_attachment_open --> |