aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/adm/style/editor.js
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2010-11-20 17:00:05 +0100
committerNils Adermann <naderman@naderman.de>2010-11-20 17:00:05 +0100
commit7f21a5f46156660d7ea6a4bdb59166ac553e2be8 (patch)
tree3963b4075f58c43ffc01fe290b04a800668bc53c /phpBB/adm/style/editor.js
parentc4e02a191628b4b9f7b6340f2876607663baeb5a (diff)
parentaf4c2a3eb15fc4318b23dcb7794c230cf3ec2a0f (diff)
downloadforums-7f21a5f46156660d7ea6a4bdb59166ac553e2be8.tar
forums-7f21a5f46156660d7ea6a4bdb59166ac553e2be8.tar.gz
forums-7f21a5f46156660d7ea6a4bdb59166ac553e2be8.tar.bz2
forums-7f21a5f46156660d7ea6a4bdb59166ac553e2be8.tar.xz
forums-7f21a5f46156660d7ea6a4bdb59166ac553e2be8.zip
Merge commit 'release-3.0.8'
* commit 'release-3.0.8': (393 commits) [prep-release-3.0.8] Incrementing version number to 3.0.8 and update changelog [ticket/9903] Script for detecting potentially malicious flash bbcodes [ticket/9904] Update WebPI Parameters.xml to work with WebMatrix. [ticket/9899] Change recaptcha theme from default to 'clean' in the ACP. [ticket/9509] Fix a typo and wrong period placement [ticket/9903] Fix XSS in BBcode-parser's Flash-BBcode. [develop-olympus] Updating changelog for last minute 3.0.8-RC1 fixes. [ticket/9140] Check current board version in incremental update packages [ticket/9891] Updater drops language-selection after database-update [develop-olympus] Updating changelog with latest changes for 3.0.8-RC1 [ticket/9884] Reduce queue interval to 60 seconds, email package size to 20 [ticket/9886] Update fails on PostgreSQL because of an error in _add_module [ticket/9888] Update fails when Bing [Bot] was already added to the users table [develop-olympus] Bumping version number for 3.0.8-RC1. [ticket/9885] Fix extension group name updater. Loop through all languages. [ticket/9847] Fix typo in search synonyms. Use british english for 'judgement'. [ticket/9883] Change an American English spelling to British English. [task/phing-build] Correct the path for update package patch files. [ticket/9880] Change "antibot" to "anti-spambot". [ticket/9696] Surpress is_dir() notice when using SQLite with open_basedir. ...
Diffstat (limited to 'phpBB/adm/style/editor.js')
-rw-r--r--phpBB/adm/style/editor.js19
1 files changed, 12 insertions, 7 deletions
diff --git a/phpBB/adm/style/editor.js b/phpBB/adm/style/editor.js
index cd4e75f51f..217aa699e2 100644
--- a/phpBB/adm/style/editor.js
+++ b/phpBB/adm/style/editor.js
@@ -46,7 +46,11 @@ function initInsertions()
{
textarea.focus();
baseHeight = doc.selection.createRange().duplicate().boundingHeight;
- // document.body.focus();
+
+ if (!document.forms[form_name])
+ {
+ document.body.focus();
+ }
}
}
@@ -152,7 +156,7 @@ function insert_text(text, spaces, popup)
var sel_start = textarea.selectionStart;
var sel_end = textarea.selectionEnd;
- mozWrap(textarea, text, '')
+ mozWrap(textarea, text, '');
textarea.selectionStart = sel_start + text.length;
textarea.selectionEnd = sel_end + text.length;
}
@@ -230,6 +234,7 @@ function addquote(post_id, username)
theSelection = theSelection.replace(/&lt\;/ig, '<');
theSelection = theSelection.replace(/&gt\;/ig, '>');
theSelection = theSelection.replace(/&amp\;/ig, '&');
+ theSelection = theSelection.replace(/&nbsp\;/ig, ' ');
}
else if (document.all)
{
@@ -269,12 +274,12 @@ function mozWrap(txtarea, open, close)
}
var s1 = (txtarea.value).substring(0,selStart);
- var s2 = (txtarea.value).substring(selStart, selEnd)
+ var s2 = (txtarea.value).substring(selStart, selEnd);
var s3 = (txtarea.value).substring(selEnd, selLength);
txtarea.value = s1 + open + s2 + close + s3;
- txtarea.selectionStart = selEnd + open.length + close.length;
- txtarea.selectionEnd = txtarea.selectionStart;
+ txtarea.selectionStart = selStart + open.length;
+ txtarea.selectionEnd = selEnd + open.length;
txtarea.focus();
txtarea.scrollTop = scrollTop;
@@ -327,8 +332,8 @@ function colorPalette(dir, width, height)
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="#" onclick="bbfontstyle(\'[color=#' + color + ']\', \'[/color]\'); return false;" onmouseover="helpline(\'s\');" onmouseout="helpline(\'tip\');"><img src="images/spacer.gif" width="' + width + '" height="' + height + '" alt="#' + color + '" title="#' + color + '" /></a>');
+ document.write('<td bgcolor="#' + color + '" style="width: ' + width + 'px; height: ' + height + 'px;">');
+ document.write('<a href="#" onclick="bbfontstyle(\'[color=#' + color + ']\', \'[/color]\'); return false;"><img src="images/spacer.gif" width="' + width + '" height="' + height + '" alt="#' + color + '" title="#' + color + '" /></a>');
document.writeln('</td>');
}