don't auto-open the editor in forum mode. Save the forum selection text until we open it.

This commit is contained in:
redmatrix 2015-09-09 19:54:16 -07:00
parent f3b560b453
commit db58b62235
7 changed files with 9 additions and 1 deletions

View file

@ -1137,6 +1137,7 @@ function status_editor($a, $x, $popup = false) {
'$newpost' => 'true',
'$baseurl' => $a->get_baseurl(true),
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
'$pretext' => ((x($x,'pretext')) ? $x['pretext'] : ''),
'$geotag' => $geotag,
'$nickname' => $x['nickname'],
'$ispublic' => t('Visible to <strong>everybody</strong>'),

View file

@ -111,6 +111,7 @@ function editblock_content(&$a) {
$a->page['htmlhead'] .= replace_macros(get_markup_template('jot-header.tpl'), array(
'$baseurl' => $a->get_baseurl(),
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
'$pretext' => '',
'$ispublic' => '&nbsp;', // t('Visible to <strong>everybody</strong>'),
'$geotag' => '',
'$nickname' => $channel['channel_address'],

View file

@ -105,6 +105,7 @@ function editlayout_content(&$a) {
$a->page['htmlhead'] .= replace_macros(get_markup_template('jot-header.tpl'), array(
'$baseurl' => $a->get_baseurl(),
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
'$pretext' => '',
'$ispublic' => '&nbsp;', // t('Visible to <strong>everybody</strong>'),
'$geotag' => $geotag,
'$nickname' => $channel['channel_address'],

View file

@ -47,6 +47,7 @@ function editpost_content(&$a) {
$a->page['htmlhead'] .= replace_macros(get_markup_template('jot-header.tpl'), array(
'$baseurl' => $a->get_baseurl(),
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
'$pretext' => '',
'$ispublic' => '&nbsp;', // t('Visible to <strong>everybody</strong>'),
'$geotag' => $geotag,
'$nickname' => $channel['channel_address'],

View file

@ -146,6 +146,7 @@ function editwebpage_content(&$a) {
$a->page['htmlhead'] .= replace_macros(get_markup_template('jot-header.tpl'), array(
'$baseurl' => $a->get_baseurl(),
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
'$pretext' => '',
'$ispublic' => '&nbsp;', // t('Visible to <strong>everybody</strong>'),
'$geotag' => $geotag,
'$nickname' => $channel['channel_address'],

View file

@ -172,7 +172,7 @@ function network_content(&$a, $update = 0, $load = false) {
'profile_uid' => local_channel()
);
if($deftag)
$x['body'] = $deftag;
$x['pretext'] = $deftag;
$status_editor = status_editor($a,$x);
$o .= $status_editor;

View file

@ -3,6 +3,7 @@
var editor = false;
var textlen = 0;
var plaintext = '{{$editselect}}';
var pretext = '{{$pretext}}';
function initEditor(cb){
if (editor==false){
@ -21,6 +22,8 @@ function initEditor(cb){
});
$(".jothidden").show();
if (typeof cb!="undefined") cb();
if(pretext.length)
addeditortext(pretext);
return;
}
tinyMCE.init({