aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/adm/style/editor.js7
-rw-r--r--phpBB/styles/subSilver/template/editor.js7
-rw-r--r--phpBB/styles/subSilver/template/posting_body.html2
3 files changed, 5 insertions, 11 deletions
diff --git a/phpBB/adm/style/editor.js b/phpBB/adm/style/editor.js
index 370e3c06ba..f1ec2d1893 100644
--- a/phpBB/adm/style/editor.js
+++ b/phpBB/adm/style/editor.js
@@ -176,13 +176,10 @@ function insert_text(text, spaces, popup)
/**
* Add inline attachment at position
*/
-function attach_inline(index, filename, element)
+function attach_inline(index, filename)
{
insert_text('[attachment=' + index + ']' + filename + '[/attachment]');
- if (element)
- {
- element.focus();
- }
+ document.forms[form_name].elements[text_name].focus();
}
/**
diff --git a/phpBB/styles/subSilver/template/editor.js b/phpBB/styles/subSilver/template/editor.js
index 370e3c06ba..f1ec2d1893 100644
--- a/phpBB/styles/subSilver/template/editor.js
+++ b/phpBB/styles/subSilver/template/editor.js
@@ -176,13 +176,10 @@ function insert_text(text, spaces, popup)
/**
* Add inline attachment at position
*/
-function attach_inline(index, filename, element)
+function attach_inline(index, filename)
{
insert_text('[attachment=' + index + ']' + filename + '[/attachment]');
- if (element)
- {
- element.focus();
- }
+ document.forms[form_name].elements[text_name].focus();
}
/**
diff --git a/phpBB/styles/subSilver/template/posting_body.html b/phpBB/styles/subSilver/template/posting_body.html
index 525639b3c5..1f523d012a 100644
--- a/phpBB/styles/subSilver/template/posting_body.html
+++ b/phpBB/styles/subSilver/template/posting_body.html
@@ -307,7 +307,7 @@ function checkForm()
<!-- IF S_INLINE_ATTACHMENT_OPTIONS -->
<tr>
<td class="row1"><b class="genmed">{L_ATTACHMENTS}:</b></td>
- <td class="row2"><select name="attachments">{S_INLINE_ATTACHMENT_OPTIONS}</select>&nbsp;<input type="button" class="btnbbcode" accesskey="a" value="{L_PLACE_INLINE}" name="attachinline" onclick="attach_form = document.forms[form_name].elements['attachments']; attach_inline(attach_form.value, attach_form.options[attach_form.selectedIndex].text, message);" />
+ <td class="row2"><select name="attachments">{S_INLINE_ATTACHMENT_OPTIONS}</select>&nbsp;<input type="button" class="btnbbcode" accesskey="a" value="{L_PLACE_INLINE}" name="attachinline" onclick="attach_form = document.forms[form_name].elements['attachments']; attach_inline(attach_form.value, attach_form.options[attach_form.selectedIndex].text);" />
</td>
</tr>
<!-- ENDIF -->