New pop-up help page about smileys - clicking on the smiley inserts it
into the form using Javascript! Also rationalised and patched some of the other help about text formats. LANGUAGE EDITORS MAY WANT TO RE-CHECK: lang/en/help/textformat.html
This commit is contained in:
+19
-1
@@ -34,7 +34,25 @@ function checkall() {
|
||||
void(el[i].checked=1)
|
||||
}
|
||||
|
||||
<? if ($focus) { echo "function setfocus() { document.$focus.focus() }\n"; } ?>
|
||||
function inserttext(text) {
|
||||
<?PHP
|
||||
if (!empty($SESSION->inserttextform)) {
|
||||
$insertfield = "opener.document.forms['$SESSION->inserttextform'].$SESSION->inserttextfield";
|
||||
} else {
|
||||
$insertfield = "opener.document.forms['theform'].message";
|
||||
}
|
||||
echo " text = ' ' + text + ' ';\n";
|
||||
echo " if ( $insertfield.createTextRange && $insertfield.caretPos) {\n";
|
||||
echo " var caretPos = $insertfield.caretPos;\n";
|
||||
echo " caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text;\n";
|
||||
echo " } else {\n";
|
||||
echo " $insertfield.value += text;\n";
|
||||
echo " }\n";
|
||||
echo " $insertfield.focus();\n";
|
||||
?>
|
||||
}
|
||||
|
||||
<?PHP if ($focus) { echo "function setfocus() { document.$focus.focus() }\n"; } ?>
|
||||
|
||||
// done hiding -->
|
||||
</SCRIPT>
|
||||
|
||||
Reference in New Issue
Block a user