mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 23:55:19 +00:00
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
7 changed files with 9 additions and 1 deletions
|
@ -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>'),
|
||||
|
|
|
@ -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' => ' ', // t('Visible to <strong>everybody</strong>'),
|
||||
'$geotag' => '',
|
||||
'$nickname' => $channel['channel_address'],
|
||||
|
|
|
@ -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' => ' ', // t('Visible to <strong>everybody</strong>'),
|
||||
'$geotag' => $geotag,
|
||||
'$nickname' => $channel['channel_address'],
|
||||
|
|
|
@ -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' => ' ', // t('Visible to <strong>everybody</strong>'),
|
||||
'$geotag' => $geotag,
|
||||
'$nickname' => $channel['channel_address'],
|
||||
|
|
|
@ -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' => ' ', // t('Visible to <strong>everybody</strong>'),
|
||||
'$geotag' => $geotag,
|
||||
'$nickname' => $channel['channel_address'],
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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({
|
||||
|
|
Loading…
Reference in a new issue