Allow the Rich Editor used by the Carousel to be customized for each Carousel asset instead of inheriting the Editor from the site's Settings. Fixes bug #12100.
This commit is contained in:
parent
38de00f931
commit
96ee557586
4 changed files with 30 additions and 1 deletions
|
|
@ -9,6 +9,7 @@
|
||||||
- fixed #12056: Adding a Thing always creates a table
|
- fixed #12056: Adding a Thing always creates a table
|
||||||
- fixed #11955: Rich Text Editor for Forums doesn't work on the iPad
|
- fixed #11955: Rich Text Editor for Forums doesn't work on the iPad
|
||||||
- fixed #11992: html source editor
|
- fixed #11992: html source editor
|
||||||
|
- fixed #12100: Carousel and/or RichEdit
|
||||||
|
|
||||||
7.10.13
|
7.10.13
|
||||||
- added #12079: Carousel Auto Play
|
- added #12079: Carousel Auto Play
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,7 @@ my $session = start(); # this line required
|
||||||
# upgrade functions go here
|
# upgrade functions go here
|
||||||
addOrganizationsToTransaction($session);
|
addOrganizationsToTransaction($session);
|
||||||
removeDuplicateUndergroundStyleTemplates($session);
|
removeDuplicateUndergroundStyleTemplates($session);
|
||||||
|
addRichEditToCarousel($session);
|
||||||
|
|
||||||
finish($session); # this line required
|
finish($session); # this line required
|
||||||
|
|
||||||
|
|
@ -73,6 +74,17 @@ sub removeDuplicateUndergroundStyleTemplates {
|
||||||
print "DONE!\n" unless $quiet;
|
print "DONE!\n" unless $quiet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
# Describe what our function does
|
||||||
|
sub addRichEditToCarousel {
|
||||||
|
my $session = shift;
|
||||||
|
print "\tAdd RichEdit option to the Carousel" unless $quiet;
|
||||||
|
# and here's our code
|
||||||
|
$session->db->write('ALTER TABLE Carousel ADD COLUMN richEditor CHAR(22) BINARY');
|
||||||
|
$session->db->write(q!update Carousel set richEditor='PBrichedit000000000001'!);
|
||||||
|
print "DONE!\n" unless $quiet;
|
||||||
|
}
|
||||||
|
|
||||||
# -------------- DO NOT EDIT BELOW THIS LINE --------------------------------
|
# -------------- DO NOT EDIT BELOW THIS LINE --------------------------------
|
||||||
|
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -60,6 +60,13 @@ sub definition {
|
||||||
hoverHelp => $i18n->get('carousel slideHeight description'),
|
hoverHelp => $i18n->get('carousel slideHeight description'),
|
||||||
label => $i18n->get('carousel slideHeight label'),
|
label => $i18n->get('carousel slideHeight label'),
|
||||||
},
|
},
|
||||||
|
richEditor =>{
|
||||||
|
fieldType => "selectRichEditor",
|
||||||
|
defaultValue => "PBrichedit000000000001",
|
||||||
|
tab => 'display',
|
||||||
|
label => $i18n->get('rich editor', 'Asset_Collaboration'),
|
||||||
|
hoverHelp => $i18n->get('rich editor description'),
|
||||||
|
},
|
||||||
items =>{
|
items =>{
|
||||||
noFormPost =>1,
|
noFormPost =>1,
|
||||||
fieldType =>'text',
|
fieldType =>'text',
|
||||||
|
|
@ -152,7 +159,9 @@ sub getEditForm {
|
||||||
$tabform->getTab("properties")->raw($tableRowStart);
|
$tabform->getTab("properties")->raw($tableRowStart);
|
||||||
|
|
||||||
|
|
||||||
my $richedit = WebGUI::Asset->newByDynamicClass( $self->session, $self->session->setting->get('richEditor') );
|
$self->session->log->warn('richedit:' .$self->get('richEditor'));
|
||||||
|
my $richEditId = $self->get('richEditor') || "PBrichedit000000000001";
|
||||||
|
my $richedit = WebGUI::Asset->newByDynamicClass( $self->session, $richEditId );
|
||||||
my $config = JSON->new->encode( $richedit->getConfig );
|
my $config = JSON->new->encode( $richedit->getConfig );
|
||||||
my $loadMcePlugins = $richedit->getLoadPlugins;
|
my $loadMcePlugins = $richedit->getLoadPlugins;
|
||||||
my $items = $self->get('items') ? JSON->new->decode($self->get('items'))->{items} : [];
|
my $items = $self->get('items') ? JSON->new->decode($self->get('items'))->{items} : [];
|
||||||
|
|
|
||||||
|
|
@ -140,6 +140,13 @@ our $I18N = {
|
||||||
lastUpdated => 0,
|
lastUpdated => 0,
|
||||||
context => 'Description of asset property',
|
context => 'Description of asset property',
|
||||||
},
|
},
|
||||||
|
|
||||||
|
'rich editor description' => {
|
||||||
|
message => q{Choose a rich editor to use for entering content in each pane of the Carousel. The new setting will take effect the next time the Carousel is edited.},
|
||||||
|
lastUpdated => 0,
|
||||||
|
context => 'Description of asset property',
|
||||||
|
},
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue