fixed: Added the ability to choose which rich editor is used to compose inbox messages

This commit is contained in:
Doug Bell 2009-01-23 20:16:23 +00:00
parent 482dd9ffc5
commit 3837878fff
4 changed files with 44 additions and 0 deletions

View file

@ -6,6 +6,7 @@
- reverted #9386: Gallery: "Image resolutions" issue. This is a feature of the Galley.
- fixed #9236: Survey 2.0 missing hoverhelp
- added: Widget Macro now uses a style, defaulting to the users.
- added ability to select which rich editor is used to compose messages in the inbox
7.6.9
- fixed: ukplayer example is now loaded with swfobject.js released under the MIT licence, see gotcha's and /extras/ukplayer

View file

@ -31,6 +31,7 @@ my $quiet; # this line required
my $session = start(); # this line required
# upgrade functions go here
addRichEditorInboxSetting( $session );
finish($session); # this line required
@ -44,6 +45,16 @@ finish($session); # this line required
# print "DONE!\n" unless $quiet;
#}
#----------------------------------------------------------------------------
# Add ability to select which rich editor for messages between users
sub addRichEditorInboxSetting {
my $session = shift;
print "\tAdding rich editor selection to Inbox... " unless $quiet;
$session->setting->add("inboxRichEditId","PBrichedit000000000001");
print "DONE!\n" unless $quiet;
}
# -------------- DO NOT EDIT BELOW THIS LINE --------------------------------

View file

@ -217,6 +217,12 @@ sub editSettingsForm {
label => $i18n->get("invite user confirm template label"),
hoverHelp => $i18n->get("invite user confirm template hoverHelp")
);
$f->selectRichEditor(
name => "inboxRichEditorId",
value => $self->getRichEditorId,
label => $i18n->get("inbox rich editor label"),
hoverHelp => $i18n->get("inbox rich editor description"),
);
return $f->printRowsOnly;
}
@ -257,6 +263,7 @@ sub editSettingsFormSave {
$setting->set("inboxInviteUserTemplateId",$form->process("inboxInviteUserTemplateId","template"));
$setting->set("inboxInviteUserConfirmTemplateId",$form->process("inboxInviteUserConfirmTemplateId","template"));
$setting->set("inboxRichEditorId", $form->process("inboxRichEditorId", "selectRichEditor") );
}
@ -382,6 +389,18 @@ sub getMessageConfirmTemplateId {
return $self->session->setting->get("inboxMessageConfirmationTemplateId") || "DUoxlTBXhVS-Zl3CFDpt9g";
}
#-------------------------------------------------------------------
=head2 getRichEditorId
This method returns the rich editor ID users compose messages with.
=cut
sub getRichEditorId {
my $self = shift;
return $self->session->setting->get("inboxRichEditorId") || "PBrichedit000000000001";
}
#-------------------------------------------------------------------
@ -668,6 +687,7 @@ sub www_inviteUser {
name => "message",
value => $message,
width => "600",
richEditId => $self->getRichEditorId,
});
}
else {
@ -1037,6 +1057,7 @@ sub www_sendMessage {
name => "message",
value => $var->{'message_body'} || "",
width => "600",
richEditId => $self->getRichEditorId,
});
$var->{'form_header' } = WebGUI::Form::formHeader($session,{

View file

@ -535,6 +535,17 @@ our $I18N = {
lastUpdated => 1230867391,
},
'inbox rich editor label' => {
message => q{Inbox Rich Editor},
lastUpdated => 0,
context => q{Label for setting},
},
'inbox rich editor description' => {
message => q{The rich editor used to compose messages},
lastUpdated => 0,
context => "Description of Inbox setting",
},
};
1;