From 2e1de9d214e309e80b090e397ba3169796f5c20b Mon Sep 17 00:00:00 2001 From: JT Smith Date: Tue, 30 May 2006 15:50:13 +0000 Subject: [PATCH] - fix: Column Layout seems a little messed up - Fixed the EMS default templates to expose all functionality. - Fixed a problem in the EMS where it wouldn't let you add any events. - fix: FieldName incorrect after adding profile field - fix: preload.perl for other roots than /data/WebGUI - Fixed a bug where polls weren't distributing karma. --- docs/changelog/6.x.x.txt | 6 ++++++ lib/WebGUI/Asset/Wobject/Layout.pm | 14 +++++++------- lib/WebGUI/Asset/Wobject/Poll.pm | 3 +-- lib/WebGUI/ProfileField.pm | 2 +- lib/WebGUI/i18n/English/WebGUI.pm | 4 ++-- sbin/preload.perl | 2 +- 6 files changed, 18 insertions(+), 13 deletions(-) diff --git a/docs/changelog/6.x.x.txt b/docs/changelog/6.x.x.txt index e652e2386..02a5edc65 100644 --- a/docs/changelog/6.x.x.txt +++ b/docs/changelog/6.x.x.txt @@ -1,6 +1,12 @@ 6.99.3 - Someone removed the status from the submission templates. That has been fixed. + - fix: Column Layout seems a little messed up + - Fixed the EMS default templates to expose all functionality. + - Fixed a problem in the EMS where it wouldn't let you add any events. + - fix: FieldName incorrect after adding profile field + - fix: preload.perl for other roots than /data/WebGUI + - Fixed a bug where polls weren't distributing karma. 6.99.2 - fix - demo.plainblack.com getting started diff --git a/lib/WebGUI/Asset/Wobject/Layout.pm b/lib/WebGUI/Asset/Wobject/Layout.pm index b3e5c0737..1aeebf4b6 100644 --- a/lib/WebGUI/Asset/Wobject/Layout.pm +++ b/lib/WebGUI/Asset/Wobject/Layout.pm @@ -146,7 +146,8 @@ sub prepareView { # I'm sure there's a more efficient way to do this. We'll figure it out someday. my @positions = split(/\./,$self->get("contentPositions")); my @hidden = split("\n",$self->get("assetsToHide")); - my @placeHolder = (); + my @placeHolder1 = (); + my @placeHolderN = (); my $i = 1; my $template = WebGUI::Asset->new($self->session,$self->get("templateId"),"WebGUI::Asset::Template"); my $templateContent = $template->get("template"); @@ -164,13 +165,14 @@ sub prepareView { unless (isIn($asset,@hidden) || !($child->canView)) { $self->session->style->setRawHeadTags($child->getExtraHeadTags); $child->prepareView; - push(@placeHolder, $child); - if ($i > $numPositions) { + if ($i > $numPositions || $i==1) { + push(@placeHolder1, $child); push(@{$vars{"position1_loop"}},{ id=>$child->getId, content=>"~~~" }); } else { + push(@placeHolderN, $child); push(@{$vars{"position".$i."_loop"}},{ id=>$child->getId, content=>"~~~" @@ -188,7 +190,7 @@ sub prepareView { unless (isIn($child->getId, @found)||isIn($child->getId,@hidden)) { if ($child->canView) { $child->prepareView; - push(@placeHolder, $child); + push(@placeHolder1, $child); push(@{$vars{"position1_loop"}},{ id=>$child->getId, content=>"~~~" @@ -196,7 +198,7 @@ sub prepareView { } } } - $self->{_viewPlaceholders} = \@placeHolder; + @{$self->{_viewPlaceholders}} = (@placeHolder1, @placeHolderN); $vars{showAdmin} = ($self->session->var->isAdminOn && $self->canEdit); $self->{_viewVars} = \%vars; if ($vars{showAdmin}) { @@ -220,9 +222,7 @@ sub view { if ($self->{_viewVars}{showAdmin} && $self->canEditIfLocked) { # under normal circumstances we don't put HTML stuff in our code, but this will make it much easier # for end users to work with our templates - #$self->{_viewVars}{"dragger.icon"} = $self->session->icon->drag(); $self->{_viewVars}{"dragger.icon"} = '
'.$self->session->icon->drag('class="dragTrigger"').'
'; - #$self->{_viewVars}{"dragger.icon"} = '
/ / / / / / / / / /
'; $self->{_viewVars}{"dragger.init"} = '