diff --git a/docs/changelog/6.x.x.txt b/docs/changelog/6.x.x.txt index c98f5f68c..c09df1680 100644 --- a/docs/changelog/6.x.x.txt +++ b/docs/changelog/6.x.x.txt @@ -14,6 +14,10 @@ - Fixed a bug that wouldn't allow the HTTP Proxy wobject to rewrite the URLs of SSL enabled sites. - Using the International Macro in Help to simplify management and translation. + - Fixed the rich edit bug on Collaboration System posts. + - Fixed a login bug that brought the user to the display account page rather + than the page they were trying to reach when they logged in. + - Fixed the Collaboration System search bug. 6.4.0 diff --git a/lib/WebGUI/Asset.pm b/lib/WebGUI/Asset.pm index 0364942f5..ee130faf2 100644 --- a/lib/WebGUI/Asset.pm +++ b/lib/WebGUI/Asset.pm @@ -1050,7 +1050,7 @@ sub getEditForm { -name=>"isPrototype", -label=>WebGUI::International::get("make prototype","Asset"), -value=>$self->getValue("isPrototype"), - -uiLevel=>7 + -uiLevel=>9 ); return $tabform; } diff --git a/lib/WebGUI/Asset/Post.pm b/lib/WebGUI/Asset/Post.pm index f71c39cd6..a08820b72 100644 --- a/lib/WebGUI/Asset/Post.pm +++ b/lib/WebGUI/Asset/Post.pm @@ -643,7 +643,10 @@ sub processPropertiesFromFormPost { $data{endDate} = $self->getThread->getParent->get("endDate") unless ($session{form}{endDate}); ($data{synopsis}, $data{content}) = $self->getSynopsisAndContentFromFormPost; if ($self->getThread->getParent->get("addEditStampToPosts")) { - $data{content} .= "
\n\n --- (Edited on ".WebGUI::DateTime::epochToHuman()." by ".$session{user}{alias}.") --- \n
"; + $data{content} .= "\n\n --- (Edited on ".WebGUI::DateTime::epochToHuman()." by ".$session{user}{alias}.") --- \n"; + if ($self->getValue("contentType") eq "mixed" || $self->getValue("contentType") eq "html") { + $data{content} = ''.$data{content}.'
'; + } } $self->update(\%data); $self->getThread->subscribe if ($session{form}{subscribe}); @@ -881,10 +884,6 @@ sub www_edit { $var{'preview.content'} = $self->formatContent($var{'preview.content'},$session{form}{contentType}); } $var{'form.preview'} = WebGUI::Form::submit({value=>"Preview"}); - $var{'form.submit'} = WebGUI::Form::button({ - value=>"Save", - extras=>"onclick=\"this.value='Please wait...'; this.form.func.value='editSave'; this.form.submit();\"" - }); $var{'form.footer'} = WebGUI::Form::formFooter(); $var{usePreview} = $self->getThread->getParent->get("usePreview"); $var{'user.isVisitor'} = ($session{user}{userId} eq '1'); @@ -919,16 +918,29 @@ sub www_edit { value=>$title }); if ($self->getThread->getParent->get("allowRichEdit")) { - $var{'content.form'} = WebGUI::Form::HTMLArea({ + $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'} = ' '; } else { $var{'content.form'} = WebGUI::Form::textarea({ name=>"content", value=>$content }); } + $var{'form.submit'} = WebGUI::Form::submit({ + extras=>"onclick=\"this.value='".WebGUI::International::get(452)."';tinyMCE.triggerSave(); this.form.func.value='editSave'; this.form.submit();\"" + }); + $var{'form.preview'} = WebGUI::Form::submit({ + value=>WebGUI::International::get("preview","Collaboration") + }); $var{'attachment.form'} = $self->getUploadControl; $var{'contentType.form'} = WebGUI::Form::contentType({ name=>'contentType', diff --git a/lib/WebGUI/Asset/Wobject/Collaboration.pm b/lib/WebGUI/Asset/Wobject/Collaboration.pm index f4dad9ffc..e27d439f1 100644 --- a/lib/WebGUI/Asset/Wobject/Collaboration.pm +++ b/lib/WebGUI/Asset/Wobject/Collaboration.pm @@ -848,7 +848,7 @@ sub www_search { WebGUI::Session::setScratch($self->getId."_without",$session{form}{without}); WebGUI::Session::setScratch($self->getId."_numResults",$session{form}{numResults}); my %var; - $var{'form.begin'} = WebGUI::Form::formHeader({action=>$self->getUrl}) + $var{'form.header'} = WebGUI::Form::formHeader({action=>$self->getUrl}) .WebGUI::Form::hidden({ name=>"func", value=>"search" }) .WebGUI::Form::hidden({ name=>"doit", value=>1 }); $var{'all.form'} = WebGUI::Form::text({ @@ -881,7 +881,7 @@ sub www_search { value=>[$numResults] }); $var{'form.search'} = WebGUI::Form::submit({value=>WebGUI::International::get(170)}); - $var{'form.end'} = WebGUI::Form::formFooter(); + $var{'form.footer'} = WebGUI::Form::formFooter(); $var{'back.url'} = $self->getUrl; $self->appendTemplateLabels(\%var); $var{doit} = $session{form}{doit}; diff --git a/lib/WebGUI/Auth.pm b/lib/WebGUI/Auth.pm index 54bf68a2d..9d5c1fa59 100644 --- a/lib/WebGUI/Auth.pm +++ b/lib/WebGUI/Auth.pm @@ -380,8 +380,7 @@ sub displayLogin { my $self = shift; my $method = $_[0] || "login"; my $vars = $_[1]; - unless ($session{env}{REQUEST_URI} =~ "displayLogin" || $session{env}{REQUEST_URI} =~ "displayAccount" || - $session{env}{REQUEST_URI} =~ "logout" || $session{env}{REQUEST_URI} =~ "deactivateAccount"){ + unless ($session{form}{op} eq "auth") { WebGUI::Session::setScratch("redirectAfterLogin",$session{env}{REQUEST_URI}); } $vars->{title} = WebGUI::International::get(66); diff --git a/lib/WebGUI/Form.pm b/lib/WebGUI/Form.pm index 1b7ca3df4..b2825de5e 100644 --- a/lib/WebGUI/Form.pm +++ b/lib/WebGUI/Form.pm @@ -1561,7 +1561,8 @@ sub submit { my $value = $params->{value} || $params->{defaultValue} || WebGUI::International::get(62); $value = _fixQuotes($value); my $wait = WebGUI::International::get(452); - return '{extras}.' />'; + my $extras = $params->{extras} || 'onclick="this.value=\''.$wait.'\'"'; + return '{extras}.' />'; } diff --git a/lib/WebGUI/i18n/English/Collaboration.pm b/lib/WebGUI/i18n/English/Collaboration.pm index d5470eb41..ffcee8ea7 100644 --- a/lib/WebGUI/i18n/English/Collaboration.pm +++ b/lib/WebGUI/i18n/English/Collaboration.pm @@ -1,6 +1,11 @@ package WebGUI::i18n::English::Collaboration; our $I18N = { + 'preview' => { + message => q|Preview|, + lastUpdated => 1109618544, + }, + 'add' => { message => q|Add|, lastUpdated => 1109618544,