rich editor integrated
This commit is contained in:
parent
ccc90fff17
commit
c1303373f0
7 changed files with 33 additions and 33 deletions
|
|
@ -69,3 +69,10 @@ create table RichEdit (
|
|||
toolbarRow3 text,
|
||||
enableContextMenu int not null default 0
|
||||
);
|
||||
delete from settings where name='richEditCss';
|
||||
insert into settings values ("richEditor","PBrichedit000000000001");
|
||||
alter table Collaboration drop column allowRichEdit;
|
||||
alter table Collaboration add column richEditor varchar(22) not null default 'PBrichedit000000000002';
|
||||
delete from userProfileField where fieldName like 'richEditor%';
|
||||
delete from userProfileData where fieldName like 'richEditor%';
|
||||
|
||||
|
|
|
|||
|
|
@ -1012,24 +1012,11 @@ sub www_edit {
|
|||
name=>"title",
|
||||
value=>$title
|
||||
});
|
||||
if ($self->getThread->getParent->get("allowRichEdit")) {
|
||||
$var{'content.form'} = WebGUI::Form::textarea({
|
||||
name=>"content",
|
||||
value=>$content
|
||||
});
|
||||
WebGUI::Style::setScript($session{config}{extrasURL}.'/tinymce/jscripts/tiny_mce/tiny_mce.js',{type=>"text/javascript"});
|
||||
$var{'content.form'} = ' <script language="javascript" type="text/javascript">
|
||||
tinyMCE.init({
|
||||
theme : "simple",
|
||||
mode : "textareas"
|
||||
});
|
||||
</script> <textarea name="content" style="min-width: 400px; width: 100%; height: 300px;">'.$content.'</textarea>';
|
||||
} else {
|
||||
$var{'content.form'} = WebGUI::Form::textarea({
|
||||
name=>"content",
|
||||
value=>$content
|
||||
});
|
||||
}
|
||||
$var{'content.form'} = WebGUI::Form::HTMLArea({
|
||||
name=>"content",
|
||||
value=>$content,
|
||||
richEditId=>$self->getThread->getParent->get("richEditor")
|
||||
});
|
||||
$var{'form.submit'} = WebGUI::Form::submit({
|
||||
extras=>"onclick=\"this.value='".WebGUI::International::get(452)."'; this.form.func.value='editSave'; this.form.submit();\""
|
||||
});
|
||||
|
|
|
|||
|
|
@ -325,9 +325,9 @@ sub definition {
|
|||
fieldType=>"filterContent",
|
||||
defaultValue=>'javascript'
|
||||
},
|
||||
allowRichEdit =>{
|
||||
fieldType=>"yesNo",
|
||||
defaultValue=>0
|
||||
richEditor =>{
|
||||
fieldType=>"selectList",
|
||||
defaultValue=>"PBrichedit000000000002"
|
||||
},
|
||||
attachmentsPerPost =>{
|
||||
fieldType=>"integer",
|
||||
|
|
@ -527,10 +527,11 @@ sub getEditForm {
|
|||
-label=>WebGUI::International::get('edit stamp', 'Asset_Collaboration'),
|
||||
-value=>$self->getValue("addEditStampToPosts")
|
||||
);
|
||||
$tabform->getTab("display")->yesNo(
|
||||
-name=>"allowRichEdit",
|
||||
-label=>WebGUI::International::get('rich edit', 'Asset_Collaboration'),
|
||||
-value=>$self->getValue("allowRichEdit")
|
||||
$tabform->getTab("display")->selectList(
|
||||
-name=>"richEditor",
|
||||
-label=>WebGUI::International::get('rich editor', 'Asset_Collaboration'),
|
||||
-options=>WebGUI::SQL->buildHashRef("select assetId, title from asset where className='WebGUI::Asset::RichEdit' order by title"),
|
||||
-value=>[$self->getValue("richEditor")]
|
||||
);
|
||||
$tabform->getTab("display")->yesNo(
|
||||
-name=>"useContentFilter",
|
||||
|
|
|
|||
|
|
@ -1178,7 +1178,7 @@ sub HTMLArea {
|
|||
my $params = shift;
|
||||
my $rows = $params->{rows} || ($session{setting}{textAreaRows}+20);
|
||||
my $columns = $params->{columns} || ($session{setting}{textAreaCols}+10);
|
||||
my $richEditId = $params->{richEditId} || "PBrichedit000000000001";
|
||||
my $richEditId = $params->{richEditId} || $session{setting}{richEditor} || "PBrichedit000000000001";
|
||||
my $output = textarea({
|
||||
name=>$params->{name},
|
||||
value=>$params->{value},
|
||||
|
|
|
|||
|
|
@ -102,10 +102,12 @@ sub www_editSettings {
|
|||
-value=>$session{setting}{metaDataEnabled}
|
||||
);
|
||||
# user interface settings
|
||||
$tabform->getTab("ui")->text(
|
||||
-name=>"richEditCss",
|
||||
-label=>"Rich Edit CSS URL",
|
||||
-value=>$session{setting}{richEditCss}
|
||||
$tabform->getTab("ui")->selectList(
|
||||
-name=>"richEditor",
|
||||
-label=>"Default Rich Editor",
|
||||
-value=>[$session{setting}{richEditor}],
|
||||
-options=>WebGUI::SQL->buildHashRef("select assetId,title from asset where className='WebGUI::Asset::RichEdit' order by title"),
|
||||
-defaultValue=>["PBrichedit000000000001"]
|
||||
);
|
||||
$tabform->getTab("ui")->integer(
|
||||
-name=>"textAreaRows",
|
||||
|
|
|
|||
|
|
@ -481,9 +481,9 @@ our $I18N = {
|
|||
lastUpdated => 1109698614,
|
||||
},
|
||||
|
||||
'rich edit' => {
|
||||
message => q|Allow rich edit?|,
|
||||
lastUpdated => 1109698614,
|
||||
'rich editor' => {
|
||||
message => q|Rich Editor|,
|
||||
lastUpdated => 0,
|
||||
},
|
||||
|
||||
'content filter' => {
|
||||
|
|
|
|||
|
|
@ -3899,6 +3899,9 @@ The primary URL of your company. This will appear on all automated emails sent f
|
|||
|
||||
<P><B>Thumbnail Size</B><BR>When images are uploaded to your system, they will automatically have thumbnails generated at the size specified here (unless overridden on a case-by-case basis). Thumbnail size is measured in pixels.
|
||||
|
||||
<p><b>Default Rich Editor</b><br />
|
||||
This is the rich editor configuration that will be used by default when a rich editor is needed. This can be overridden in certain applications such as the Collaboration System.</p>
|
||||
|
||||
<B>Text Area Rows</B>, <B>Text Area Columns</B> and <B>Text Box Size</B> allow the size of
|
||||
forms that WebGUI generates to be customized on a site-by-site basis.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue