don't auto-open the editor in forum mode. Save the forum selection text until we open it.
This commit is contained in:
parent
f3b560b453
commit
db58b62235
@ -1137,6 +1137,7 @@ function status_editor($a, $x, $popup = false) {
|
|||||||
'$newpost' => 'true',
|
'$newpost' => 'true',
|
||||||
'$baseurl' => $a->get_baseurl(true),
|
'$baseurl' => $a->get_baseurl(true),
|
||||||
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
|
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
|
||||||
|
'$pretext' => ((x($x,'pretext')) ? $x['pretext'] : ''),
|
||||||
'$geotag' => $geotag,
|
'$geotag' => $geotag,
|
||||||
'$nickname' => $x['nickname'],
|
'$nickname' => $x['nickname'],
|
||||||
'$ispublic' => t('Visible to <strong>everybody</strong>'),
|
'$ispublic' => t('Visible to <strong>everybody</strong>'),
|
||||||
|
@ -111,6 +111,7 @@ function editblock_content(&$a) {
|
|||||||
$a->page['htmlhead'] .= replace_macros(get_markup_template('jot-header.tpl'), array(
|
$a->page['htmlhead'] .= replace_macros(get_markup_template('jot-header.tpl'), array(
|
||||||
'$baseurl' => $a->get_baseurl(),
|
'$baseurl' => $a->get_baseurl(),
|
||||||
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
|
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
|
||||||
|
'$pretext' => '',
|
||||||
'$ispublic' => ' ', // t('Visible to <strong>everybody</strong>'),
|
'$ispublic' => ' ', // t('Visible to <strong>everybody</strong>'),
|
||||||
'$geotag' => '',
|
'$geotag' => '',
|
||||||
'$nickname' => $channel['channel_address'],
|
'$nickname' => $channel['channel_address'],
|
||||||
|
@ -105,6 +105,7 @@ function editlayout_content(&$a) {
|
|||||||
$a->page['htmlhead'] .= replace_macros(get_markup_template('jot-header.tpl'), array(
|
$a->page['htmlhead'] .= replace_macros(get_markup_template('jot-header.tpl'), array(
|
||||||
'$baseurl' => $a->get_baseurl(),
|
'$baseurl' => $a->get_baseurl(),
|
||||||
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
|
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
|
||||||
|
'$pretext' => '',
|
||||||
'$ispublic' => ' ', // t('Visible to <strong>everybody</strong>'),
|
'$ispublic' => ' ', // t('Visible to <strong>everybody</strong>'),
|
||||||
'$geotag' => $geotag,
|
'$geotag' => $geotag,
|
||||||
'$nickname' => $channel['channel_address'],
|
'$nickname' => $channel['channel_address'],
|
||||||
|
@ -47,6 +47,7 @@ function editpost_content(&$a) {
|
|||||||
$a->page['htmlhead'] .= replace_macros(get_markup_template('jot-header.tpl'), array(
|
$a->page['htmlhead'] .= replace_macros(get_markup_template('jot-header.tpl'), array(
|
||||||
'$baseurl' => $a->get_baseurl(),
|
'$baseurl' => $a->get_baseurl(),
|
||||||
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
|
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
|
||||||
|
'$pretext' => '',
|
||||||
'$ispublic' => ' ', // t('Visible to <strong>everybody</strong>'),
|
'$ispublic' => ' ', // t('Visible to <strong>everybody</strong>'),
|
||||||
'$geotag' => $geotag,
|
'$geotag' => $geotag,
|
||||||
'$nickname' => $channel['channel_address'],
|
'$nickname' => $channel['channel_address'],
|
||||||
|
@ -146,6 +146,7 @@ function editwebpage_content(&$a) {
|
|||||||
$a->page['htmlhead'] .= replace_macros(get_markup_template('jot-header.tpl'), array(
|
$a->page['htmlhead'] .= replace_macros(get_markup_template('jot-header.tpl'), array(
|
||||||
'$baseurl' => $a->get_baseurl(),
|
'$baseurl' => $a->get_baseurl(),
|
||||||
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
|
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
|
||||||
|
'$pretext' => '',
|
||||||
'$ispublic' => ' ', // t('Visible to <strong>everybody</strong>'),
|
'$ispublic' => ' ', // t('Visible to <strong>everybody</strong>'),
|
||||||
'$geotag' => $geotag,
|
'$geotag' => $geotag,
|
||||||
'$nickname' => $channel['channel_address'],
|
'$nickname' => $channel['channel_address'],
|
||||||
|
@ -172,7 +172,7 @@ function network_content(&$a, $update = 0, $load = false) {
|
|||||||
'profile_uid' => local_channel()
|
'profile_uid' => local_channel()
|
||||||
);
|
);
|
||||||
if($deftag)
|
if($deftag)
|
||||||
$x['body'] = $deftag;
|
$x['pretext'] = $deftag;
|
||||||
|
|
||||||
$status_editor = status_editor($a,$x);
|
$status_editor = status_editor($a,$x);
|
||||||
$o .= $status_editor;
|
$o .= $status_editor;
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
var editor = false;
|
var editor = false;
|
||||||
var textlen = 0;
|
var textlen = 0;
|
||||||
var plaintext = '{{$editselect}}';
|
var plaintext = '{{$editselect}}';
|
||||||
|
var pretext = '{{$pretext}}';
|
||||||
|
|
||||||
function initEditor(cb){
|
function initEditor(cb){
|
||||||
if (editor==false){
|
if (editor==false){
|
||||||
@ -21,6 +22,8 @@ function initEditor(cb){
|
|||||||
});
|
});
|
||||||
$(".jothidden").show();
|
$(".jothidden").show();
|
||||||
if (typeof cb!="undefined") cb();
|
if (typeof cb!="undefined") cb();
|
||||||
|
if(pretext.length)
|
||||||
|
addeditortext(pretext);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
tinyMCE.init({
|
tinyMCE.init({
|
||||||
|
Reference in New Issue
Block a user