Add an option to disable a given rich editor Asset site wide.

Added new column in table(default 0), label, hoverHelp and help field entry.
This commit is contained in:
Colin Kuskie 2006-02-14 23:43:32 +00:00
parent cd6759f311
commit ac39689ddb
5 changed files with 36 additions and 0 deletions

View file

@ -68,6 +68,10 @@ sub definition {
tableName=>'RichEdit',
className=>'WebGUI::Asset::RichEdit',
properties=>{
disableRichEditor=>{
fieldType=>'yesNo',
defaultValue=>0
},
askAboutRichEdit=>{
fieldType=>'yesNo',
defaultValue=>0
@ -266,6 +270,12 @@ sub getEditForm {
-hoverHelp=>$i18n->get('toolbar buttons description'),
-value=>$buttonGrid
);
$tabform->getTab("properties")->yesNo(
-value=>$self->getValue("disableRichEditor"),
-label=>$i18n->get('disable rich edit'),
-hoverHelp=>$i18n->get('disable rich edit description'),
-name=>"disableRichEditor"
);
$tabform->getTab("properties")->yesNo(
-value=>$self->getValue("askAboutRichEdit"),
-label=>$i18n->get('using rich edit'),
@ -390,6 +400,7 @@ sub getToolbar {
#-------------------------------------------------------------------
sub getRichEditor {
my $self = shift;
return '' if $self->getValue('disableRichEditor');
my $nameId = shift;
my @toolbarRow1 = split("\n",$self->getValue("toolbarRow1"));
push(@toolbarRow1,"contextmenu") if ($self->getValue("enableContextMenu"));