mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-31 11:39:37 +02:00
git-svn-id: file:///svn/phpbb/trunk@6665 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
d5593b154e
commit
0bc076a0c3
@ -548,9 +548,9 @@
|
||||
var text_name = 'signature';
|
||||
|
||||
// Define the bbCode tags
|
||||
bbcode = new Array();
|
||||
bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','[/code]','[list]','[/list]','[list=]','[/list]','[img]','[/img]','[url]','[/url]','[flash=]', '[/flash]','[size=]','[/size]'<!-- BEGIN custom_tags -->, {custom_tags.BBCODE_NAME}<!-- END custom_tags -->);
|
||||
imageTag = false;
|
||||
bbcode = new Array();
|
||||
bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','[/code]','[list]','[/list]','[list=]','[/list]','[img]','[/img]','[url]','[/url]','[flash=]', '[/flash]','[size=]','[/size]'<!-- BEGIN custom_tags -->, {custom_tags.BBCODE_NAME}<!-- END custom_tags -->);
|
||||
imageTag = false;
|
||||
|
||||
// Helpline messages
|
||||
var help_line = {
|
||||
@ -566,7 +566,9 @@ var help_line = {
|
||||
s: '{LA_BBCODE_S_HELP}',
|
||||
f: '{LA_BBCODE_F_HELP}',
|
||||
e: '{LA_BBCODE_E_HELP}',
|
||||
d: '{LA_BBCODE_D_HELP}'
|
||||
d: '{LA_BBCODE_D_HELP}',
|
||||
t: '{LA_BBCODE_T_HELP}',
|
||||
tip: '{L_STYLES_TIP}'
|
||||
<!-- BEGIN custom_tags -->
|
||||
,cb_{custom_tags.BBCODE_ID}: '{custom_tags.BBCODE_HELPLINE}'
|
||||
<!-- END custom_tags -->
|
||||
@ -589,24 +591,25 @@ var help_line = {
|
||||
<legend>{L_SIGNATURE}</legend>
|
||||
<p>{L_SIGNATURE_EXPLAIN}</p>
|
||||
<div id="format-buttons">
|
||||
<input type="button" class="button2" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 30px;" onclick="bbstyle(0)" onmouseover="helpline('b')" />
|
||||
<input type="button" class="button2" accesskey="i" name="addbbcode2" value=" i " style="font-style:italic; width: 30px;" onclick="bbstyle(2)" onmouseover="helpline('i')" />
|
||||
<input type="button" class="button2" accesskey="u" name="addbbcode4" value=" u " style="text-decoration: underline; width: 30px;" onclick="bbstyle(4)" onmouseover="helpline('u')" />
|
||||
<input type="button" class="button2" accesskey="q" name="addbbcode6" value="Quote" style="width: 50px" onclick="bbstyle(6)" onmouseover="helpline('q')" />
|
||||
<input type="button" class="button2" accesskey="c" name="addbbcode8" value="Code" style="width: 40px" onclick="bbstyle(8)" onmouseover="helpline('c')" />
|
||||
<input type="button" class="button2" accesskey="l" name="addbbcode10" value="List" style="width: 40px" onclick="bbstyle(10)" onmouseover="helpline('l')" />
|
||||
<input type="button" class="button2" accesskey="o" name="addbbcode12" value="List=" style="width: 40px" onclick="bbstyle(12)" onmouseover="helpline('o')" />
|
||||
<input type="button" class="button2" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 30px;" onclick="bbstyle(0)" onmouseover="helpline('b')" onmouseout="helpline('tip')" />
|
||||
<input type="button" class="button2" accesskey="i" name="addbbcode2" value=" i " style="font-style:italic; width: 30px;" onclick="bbstyle(2)" onmouseover="helpline('i')" onmouseout="helpline('tip')" />
|
||||
<input type="button" class="button2" accesskey="u" name="addbbcode4" value=" u " style="text-decoration: underline; width: 30px;" onclick="bbstyle(4)" onmouseover="helpline('u')" onmouseout="helpline('tip')" />
|
||||
<input type="button" class="button2" accesskey="q" name="addbbcode6" value="Quote" style="width: 50px" onclick="bbstyle(6)" onmouseover="helpline('q')" onmouseout="helpline('tip')" />
|
||||
<input type="button" class="button2" accesskey="c" name="addbbcode8" value="Code" style="width: 40px" onclick="bbstyle(8)" onmouseover="helpline('c')" onmouseout="helpline('tip')" />
|
||||
<input type="button" class="button2" accesskey="l" name="addbbcode10" value="List" style="width: 40px" onclick="bbstyle(10)" onmouseover="helpline('l')" onmouseout="helpline('tip')" />
|
||||
<input type="button" class="button2" accesskey="o" name="addbbcode12" value="List=" style="width: 40px" onclick="bbstyle(12)" onmouseover="helpline('o')" onmouseout="helpline('tip')" />
|
||||
<input type="button" class="button2" accesskey="t" name="addlitsitem" value="[*]" style="width: 40px" onclick="bbstyle(-1)" onmouseover="helpline('e')" onmouseout="helpline('tip')" />
|
||||
<!-- IF S_BBCODE_IMG -->
|
||||
<input type="button" class="button2" accesskey="p" name="addbbcode14" value="Img" style="width: 40px" onclick="bbstyle(14)" onmouseover="helpline('p')" />
|
||||
<input type="button" class="button2" accesskey="p" name="addbbcode14" value="Img" style="width: 40px" onclick="bbstyle(14)" onmouseover="helpline('p')" onmouseout="helpline('tip')" />
|
||||
<!-- ENDIF -->
|
||||
<!-- IF S_LINKS_ALLOWED -->
|
||||
<input type="button" class="button2" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px" onclick="bbstyle(16)" onmouseover="helpline('w')" />
|
||||
<input type="button" class="button2" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px" onclick="bbstyle(16)" onmouseover="helpline('w')" onmouseout="helpline('tip')" />
|
||||
<!-- ENDIF -->
|
||||
<!-- IF S_BBCODE_FLASH -->
|
||||
<input type="button" class="button2" accesskey="d" name="addbbcode18" value="Flash" onclick="bbstyle(18)" onmouseover="helpline('d')" />
|
||||
<input type="button" class="button2" accesskey="d" name="addbbcode18" value="Flash" onclick="bbstyle(18)" onmouseover="helpline('d')" onmouseout="helpline('tip')" />
|
||||
<!-- ENDIF -->
|
||||
|
||||
{L_FONT_SIZE}: <select name="addbbcode20" onchange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]');this.form.addbbcode20.selectedIndex = 2;" onmouseover="helpline('f')">
|
||||
{L_FONT_SIZE}: <select name="addbbcode20" onchange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]');this.form.addbbcode20.selectedIndex = 2;" onmouseover="helpline('f')" onmouseout="helpline('tip')">
|
||||
<option value="7">{L_FONT_TINY}</option>
|
||||
<option value="9">{L_FONT_SMALL}</option>
|
||||
<option value="12" selected="selected">{L_FONT_NORMAL}</option>
|
||||
@ -622,14 +625,8 @@ var help_line = {
|
||||
|
||||
</div>
|
||||
<p><input type="text" name="helpbox" value="{L_STYLES_TIP}" class="full" style="border: 0; background: none;" /></p>
|
||||
<dl>
|
||||
<dt style="width: 95px;"><script type="text/javascript"><!--
|
||||
colorPalette('v', 17, 13);
|
||||
//--></script>
|
||||
</dt>
|
||||
<dd style="text-align: left; margin-left: 95px;"><textarea name="signature" rows="10" cols="60" style="width: 80%;" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);">{SIGNATURE}</textarea></dd>
|
||||
<dd style="text-align: left; margin-left: 95px;">
|
||||
<!-- IF S_BBCODE_ALLOWED -->
|
||||
<div style="text-align: left;"><textarea name="signature" rows="10" cols="60" style="width: 80%;" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);">{SIGNATURE}</textarea></div>
|
||||
<div><!-- IF S_BBCODE_ALLOWED -->
|
||||
<input type="checkbox" class="radio" name="disable_bbcode"{S_BBCODE_CHECKED} /> {L_DISABLE_BBCODE}
|
||||
<!-- ENDIF -->
|
||||
<!-- IF S_SMILIES_ALLOWED -->
|
||||
@ -639,8 +636,7 @@ var help_line = {
|
||||
<input type="checkbox" class="radio" name="disable_magic_url"{S_MAGIC_URL_CHECKED} /> {L_DISABLE_MAGIC_URL}
|
||||
<!-- ENDIF -->
|
||||
<br /><br /><strong>{L_OPTIONS}: </strong>{BBCODE_STATUS} :: {IMG_STATUS} :: {FLASH_STATUS} :: {URL_STATUS} :: {SMILIES_STATUS}
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="quick">
|
||||
|
@ -118,20 +118,20 @@ function bbfontstyle(bbopen, bbclose)
|
||||
insert_text(bbopen + bbclose);
|
||||
|
||||
// Center the cursor when we don't have a selection
|
||||
// IE & Opera
|
||||
if (document.selection)
|
||||
// Gecko and proper browsers
|
||||
if (!isNaN(textarea.selectionStart))
|
||||
{
|
||||
textarea.selectionStart = new_pos;
|
||||
textarea.selectionEnd = new_pos;
|
||||
}
|
||||
// IE
|
||||
else if (document.selection)
|
||||
{
|
||||
var range = textarea.createTextRange();
|
||||
range.move("character", new_pos);
|
||||
range.select();
|
||||
storeCaret(document.forms[form_name].elements[text_name]);
|
||||
}
|
||||
//Gecko
|
||||
else if (!isNaN(textarea.selectionStart))
|
||||
{
|
||||
textarea.selectionStart = new_pos;
|
||||
textarea.selectionEnd = new_pos;
|
||||
}
|
||||
|
||||
document.forms[form_name].elements[text_name].focus();
|
||||
return;
|
||||
@ -155,13 +155,8 @@ function insert_text(text, spaces, popup)
|
||||
{
|
||||
text = ' ' + text + ' ';
|
||||
}
|
||||
if (textarea.createTextRange && textarea.caretPos)
|
||||
{
|
||||
var caret_pos = textarea.caretPos;
|
||||
caret_pos.text = caret_pos.text.charAt(caret_pos.text.length - 1) == ' ' ? caret_pos.text + text + ' ' : caret_pos.text + text;
|
||||
|
||||
}
|
||||
else if (!isNaN(textarea.selectionStart))
|
||||
|
||||
if (!isNaN(textarea.selectionStart))
|
||||
{
|
||||
var sel_start = textarea.selectionStart;
|
||||
var sel_end = textarea.selectionEnd;
|
||||
@ -169,7 +164,15 @@ function insert_text(text, spaces, popup)
|
||||
mozWrap(textarea, text, '')
|
||||
textarea.selectionStart = sel_start + text.length;
|
||||
textarea.selectionEnd = sel_end + text.length;
|
||||
}
|
||||
|
||||
else if (textarea.createTextRange && textarea.caretPos)
|
||||
{
|
||||
var caret_pos = textarea.caretPos;
|
||||
caret_pos.text = caret_pos.text.charAt(caret_pos.text.length - 1) == ' ' ? caret_pos.text + text + ' ' : caret_pos.text + text;
|
||||
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
textarea.value = textarea.value + text;
|
||||
@ -372,7 +375,7 @@ function getCaretPosition(txtarea)
|
||||
// get current selection
|
||||
var range = document.selection.createRange();
|
||||
|
||||
// create a selection of the whole textarea
|
||||
// a new selection of the whole textarea
|
||||
var range_all = document.body.createTextRange();
|
||||
range_all.moveToElementText(txtarea);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user