Implemented RFE 9204 - Add Reply Filter Code and Reply Rich Editor Option to Collaboration System - Provides ability to specify different Rich Editors and FilterCodes for posts (start of thread) and replies
This commit is contained in:
parent
90717eee40
commit
2fb41ce8e8
5 changed files with 67 additions and 5 deletions
|
|
@ -374,7 +374,12 @@ sub formatContent {
|
|||
my $self = shift;
|
||||
my $content = shift || $self->get("content");
|
||||
my $contentType = shift || $self->get("contentType");
|
||||
my $msg = WebGUI::HTML::filter($content,$self->getThread->getParent->get("filterCode"));
|
||||
my $msg = undef ;
|
||||
if (!$self->isa("WebGUI::Asset::Post::Thread")) { # apply appropriate content filter
|
||||
$msg = WebGUI::HTML::filter($content,$self->getThread->getParent->get("replyFilterCode"));
|
||||
} else {
|
||||
$msg = WebGUI::HTML::filter($content,$self->getThread->getParent->get("filterCode"));
|
||||
}
|
||||
$msg = WebGUI::HTML::format($msg, $contentType);
|
||||
if ($self->getThread->getParent->get("useContentFilter")) {
|
||||
$msg = WebGUI::HTML::processReplacements($self->session,$msg);
|
||||
|
|
@ -1422,7 +1427,9 @@ sub www_edit {
|
|||
$var{'content.form'} = WebGUI::Form::HTMLArea($session, {
|
||||
name=>"content",
|
||||
value=>$content,
|
||||
richEditId=>$self->getThread->getParent->get("richEditor")
|
||||
richEditId=>($self->isa("WebGUI::Asset::Post::Thread") ?
|
||||
$self->getThread->getParent->get("richEditor") :
|
||||
$self->getThread->getParent->get("replyRichEditor")),
|
||||
});
|
||||
##Edit variables just for Threads
|
||||
if ($className eq 'WebGUI::Asset::Post::Thread' && $self->getThread->getParent->canEdit) {
|
||||
|
|
|
|||
|
|
@ -593,6 +593,13 @@ sub definition {
|
|||
label=>$i18n->get('filter code'),
|
||||
hoverHelp=>$i18n->get('filter code description'),
|
||||
},
|
||||
replyFilterCode =>{
|
||||
fieldType=>"filterContent",
|
||||
defaultValue=>'javascript',
|
||||
tab=>'security',
|
||||
label=>$i18n->get('reply filter code'),
|
||||
hoverHelp=>$i18n->get('reply filter code description'),
|
||||
},
|
||||
richEditor =>{
|
||||
fieldType=>"selectRichEditor",
|
||||
defaultValue=>"PBrichedit000000000002",
|
||||
|
|
@ -600,6 +607,13 @@ sub definition {
|
|||
label=>$i18n->get('rich editor'),
|
||||
hoverHelp=>$i18n->get('rich editor description'),
|
||||
},
|
||||
replyRichEditor =>{
|
||||
fieldType=>"selectRichEditor",
|
||||
defaultValue=>"PBrichedit000000000002",
|
||||
tab=>'display',
|
||||
label=>$i18n->get('reply rich editor'),
|
||||
hoverHelp=>$i18n->get('reply rich editor description'),
|
||||
},
|
||||
attachmentsPerPost =>{
|
||||
fieldType=>"integer",
|
||||
defaultValue=>0,
|
||||
|
|
|
|||
|
|
@ -677,6 +677,11 @@ our $I18N = {
|
|||
lastUpdated => 1109698614,
|
||||
},
|
||||
|
||||
'reply filter code' => {
|
||||
message => q|Reply Filter Code|,
|
||||
lastUpdated => 1109698614,
|
||||
},
|
||||
|
||||
'sort by' => {
|
||||
message => q|Sort By|,
|
||||
lastUpdated => 1109698614,
|
||||
|
|
@ -717,6 +722,11 @@ our $I18N = {
|
|||
lastUpdated => 0,
|
||||
},
|
||||
|
||||
'reply rich editor' => {
|
||||
message => q|Reply Rich Editor|,
|
||||
lastUpdated => 0,
|
||||
},
|
||||
|
||||
'content filter' => {
|
||||
message => q|Use content filter?|,
|
||||
lastUpdated => 1109698614,
|
||||
|
|
@ -1140,7 +1150,12 @@ submitted by a user.|,
|
|||
},
|
||||
|
||||
'filter code description' => {
|
||||
message => q|Sets the level of HTML filtering done on each Post.|,
|
||||
message => q|Sets the level of HTML filtering done on each Post (the start of each thread).|,
|
||||
lastUpdated => 1119070429,
|
||||
},
|
||||
|
||||
'reply filter code description' => {
|
||||
message => q|Sets the level of HTML filtering done on each Reply.|,
|
||||
lastUpdated => 1119070429,
|
||||
},
|
||||
|
||||
|
|
@ -1183,7 +1198,12 @@ the original poster.|,
|
|||
},
|
||||
|
||||
'rich editor description' => {
|
||||
message => q|Select which Rich Editor to use for the content of Posts.|,
|
||||
message => q|Select which Rich Editor to use for the content of Posts (the start of each thread).|,
|
||||
lastUpdated => 1187991394,
|
||||
},
|
||||
|
||||
'reply rich editor description' => {
|
||||
message => q|Select which Rich Editor to use for the content of Replies.|,
|
||||
lastUpdated => 1187991394,
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue