|
@@ -841,17 +841,28 @@ function template_main()
|
|
|
function insertQuoteFast(messageid)
|
|
|
{
|
|
|
if (window.XMLHttpRequest)
|
|
|
- getXMLDocument(smf_prepareScriptUrl(smf_scripturl) + \'action=quotefast;quote=\' + messageid + \';xml;pb=', $context['post_box_name'], ';mode=\' + (oEditorHandle_', $context['post_box_name'], '.bRichTextEnabled ? 1 : 0), onDocReceived);
|
|
|
+ getXMLDocument(smf_prepareScriptUrl(smf_scripturl) + \'action=quotefast;quote=\' + messageid + \';xml;pb=', $context['post_box_name'], ';mode=0\', onDocReceived);
|
|
|
else
|
|
|
- reqWin(smf_prepareScriptUrl(smf_scripturl) + \'action=quotefast;quote=\' + messageid + \';pb=', $context['post_box_name'], ';mode=\' + (oEditorHandle_', $context['post_box_name'], '.bRichTextEnabled ? 1 : 0), 240, 90);
|
|
|
+ reqWin(smf_prepareScriptUrl(smf_scripturl) + \'action=quotefast;quote=\' + messageid + \';pb=', $context['post_box_name'], ';mode=0\', 240, 90);
|
|
|
+
|
|
|
return true;
|
|
|
}
|
|
|
function onDocReceived(XMLDoc)
|
|
|
{
|
|
|
var text = \'\';
|
|
|
+ var bIsSource = $("#', $context['post_box_name'], '").data("sceditor").inSourceMode();
|
|
|
+ var current_value = $("#', $context['post_box_name'], '").data("sceditor").getWysiwygEditorValue() + "\n" + text;
|
|
|
+
|
|
|
for (var i = 0, n = XMLDoc.getElementsByTagName(\'quote\')[0].childNodes.length; i < n; i++)
|
|
|
text += XMLDoc.getElementsByTagName(\'quote\')[0].childNodes[i].nodeValue;
|
|
|
- oEditorHandle_', $context['post_box_name'], '.insertText(text, false, true);
|
|
|
+
|
|
|
+ if (!bIsSource)
|
|
|
+ $("#', $context['post_box_name'], '").data("sceditor").toggleTextMode();
|
|
|
+
|
|
|
+ $("#', $context['post_box_name'], '").data("sceditor").setTextareaValue(current_value);
|
|
|
+
|
|
|
+ if (!bIsSource)
|
|
|
+ $("#', $context['post_box_name'], '").data("sceditor").toggleTextMode();
|
|
|
}
|
|
|
// ]]></script>';
|
|
|
}
|