From 24ed8f3e3f0b13b7f4e4e90a6e8ee3fefe534583 Mon Sep 17 00:00:00 2001 From: JT Smith Date: Wed, 14 Jun 2006 16:38:16 +0000 Subject: [PATCH] - fix: "Link to a page in the webgui asset tree" has default "open in a new window" - fix: cs - attachments fixed a tabbing problem in admin console introduced intraversion --- docs/changelog/6.x.x.txt | 3 +++ lib/WebGUI/Asset/Post.pm | 5 +++-- lib/WebGUI/Asset/Wobject/Collaboration.pm | 2 +- lib/WebGUI/Operation/FormHelpers.pm | 8 ++++++-- lib/WebGUI/Session.pm | 2 +- www/extras/adminConsole/adminConsole.js | 10 ++++++++-- 6 files changed, 22 insertions(+), 8 deletions(-) diff --git a/docs/changelog/6.x.x.txt b/docs/changelog/6.x.x.txt index 97f3d9e9a..134cdb2fb 100644 --- a/docs/changelog/6.x.x.txt +++ b/docs/changelog/6.x.x.txt @@ -41,6 +41,9 @@ - Fixed a macro processing problem on the Redirect asset. - Added a log info entry when a redirect occurs. - Better handling of automated messages and post bounces for CS Mail. + - fix: "Link to a page in the webgui asset tree" has default "open in a new + window" + - fix: cs - attachments - fix: op=listTransactions causes fatal - Session/DateTime addToDate, addToTime, and addToDateTime now default to the current epoch for a starting point. - fix: changed right click menu to left click for project management assets diff --git a/lib/WebGUI/Asset/Post.pm b/lib/WebGUI/Asset/Post.pm index e8dac6f72..bb870174d 100644 --- a/lib/WebGUI/Asset/Post.pm +++ b/lib/WebGUI/Asset/Post.pm @@ -681,7 +681,7 @@ sub processPropertiesFromFormPost { delete $self->{_storageLocation}; my $storage = $self->getStorageLocation; my $attachmentLimit = $self->getThread->getParent->get("attachmentsPerPost"); - $storage->addFileFromFormPost("image", $attachmentLimit) if $attachmentLimit; +# $storage->addFileFromFormPost("image", $attachmentLimit) if $attachmentLimit; $self->postProcess; $self->requestCommit; } @@ -957,7 +957,7 @@ sub www_edit { unless ($self->session->form->process("content") || $self->session->form->process("title")) { $content = "[quote]".$self->getParent->get("content")."[/quote]" if ($self->session->form->process("withQuote")); $title = $self->getParent->get("title"); - $title = "Re: ".$title unless ($title =~ /^Re:/); + $title = "Re: ".$title unless ($title =~ /^Re:/i); } $var{'subscribe.form'} = WebGUI::Form::yesNo($self->session, { name=>"subscribe", @@ -1080,6 +1080,7 @@ sub www_edit { value=>$i18n->get("preview","Asset_Collaboration") }); $var{'attachment.form'} = WebGUI::Form::image($self->session, { + name=>"storageId", value=>$self->get("storageId"), maxAttachments=>$self->getThread->getParent->getValue("attachmentsPerPost"), deleteFileUrl=>$self->getUrl("func=deleteFile;filename=") diff --git a/lib/WebGUI/Asset/Wobject/Collaboration.pm b/lib/WebGUI/Asset/Wobject/Collaboration.pm index f334616f5..033d72364 100644 --- a/lib/WebGUI/Asset/Wobject/Collaboration.pm +++ b/lib/WebGUI/Asset/Wobject/Collaboration.pm @@ -205,7 +205,7 @@ sub canModerate { #------------------------------------------------------------------- sub canPost { my $self = shift; - return ($self->get("status") eq "approved" && ($self->session->user->isInGroup($self->get("postGroupId")) || $self->canEdit)); + return (($self->get("status") eq "approved" || $self->getRevisionCount > 1) && ($self->session->user->isInGroup($self->get("postGroupId")) || $self->canEdit)); } diff --git a/lib/WebGUI/Operation/FormHelpers.pm b/lib/WebGUI/Operation/FormHelpers.pm index 3cebf4735..27c8df39e 100644 --- a/lib/WebGUI/Operation/FormHelpers.pm +++ b/lib/WebGUI/Operation/FormHelpers.pm @@ -11,6 +11,7 @@ package WebGUI::Operation::FormHelpers; #------------------------------------------------------------------- use strict; +use Tie::IxHash; use WebGUI::Asset; use WebGUI::Asset::Wobject::Folder; use WebGUI::Form::Group; @@ -149,12 +150,15 @@ sub www_richEditPageTree { -label=>$i18n->get(104), -hoverHelp=>$i18n->get('104 description'), ); + my %options = (); + tie %options, 'Tie::IxHash'; + %options = ("_self"=>$i18n->get('link in same window'), + "_blank"=>$i18n->get('link in new window')); $f->selectBox( -name=>"target", -label=>$i18n->get('target'), -hoverHelp=>$i18n->get('target description'), - -options=>{"_self"=>$i18n->get('link in same window'), - "_blank"=>$i18n->get('link in new window')}, + -options=>\%options ); $f->button( -name=>"button", diff --git a/lib/WebGUI/Session.pm b/lib/WebGUI/Session.pm index 66c9d1dec..c7df10ac9 100644 --- a/lib/WebGUI/Session.pm +++ b/lib/WebGUI/Session.pm @@ -440,7 +440,7 @@ An array of method names of the objects you want returned. sub quick { my $self = shift; - my @methods = shift; + my @methods = @_; my @list = (); foreach my $method (@methods) { push(@list, $self->$method); diff --git a/www/extras/adminConsole/adminConsole.js b/www/extras/adminConsole/adminConsole.js index 2d8701666..84e57987c 100644 --- a/www/extras/adminConsole/adminConsole.js +++ b/www/extras/adminConsole/adminConsole.js @@ -20,7 +20,10 @@ function switchToApplication () { document.getElementById("application_icon").className = "adminConsoleTitleIcon"; document.getElementById("application_title").className = "adminConsoleTitle"; if (adminConsoleApplicationSubmenu) { - document.getElementById("adminConsoleApplicationSubmenu").className = "adminConsoleSubmenu"; + var submenu = document.getElementById("adminConsoleApplicationSubmenu"); + if (submenu) { + submenu.className = "adminConsoleSubmenu"; + } } document.getElementById("application_workarea").className = "adminConsoleWorkArea"; document.getElementById("console_toggle_off").className = "adminConsoleHidden"; @@ -31,7 +34,10 @@ function switchToAdminConsole () { adminConsoleIsOn = true; document.getElementById("application_icon").className = "adminConsoleHidden"; document.getElementById("application_title").className = "adminConsoleHidden"; - document.getElementById("adminConsoleApplicationSubmenu").className = "adminConsoleHidden"; + var submenu = document.getElementById("adminConsoleApplicationSubmenu"); + if (submenu) { + submenu.className = "adminConsoleHidden"; + } document.getElementById("application_workarea").className = "adminConsoleHidden"; document.getElementById("application_help").className = "adminConsoleHidden"; document.getElementById("console_icon").className = "adminConsoleTitleIcon";