added hide option to layout
fixed typo in events calendar added context menu stuff that i forgot to check in added richEditId option to the HTMLArea method in HTMLForm
This commit is contained in:
parent
c1303373f0
commit
10285b71cf
8 changed files with 202 additions and 8 deletions
|
|
@ -465,7 +465,7 @@ sub view {
|
|||
}
|
||||
$var{'pagination.previousPage'} = '<form method="GET" style="inline;" action="'.
|
||||
$self->getUrl.'?calMonthStart='.$calMonthStart.
|
||||
'&reload='.WebGUI::Id::Generate.'"><a href="'.$self->getUrl.
|
||||
'&reload='.WebGUI::Id::generate().'"><a href="'.$self->getUrl.
|
||||
'?calMonthStart='.$prevCalMonthStart.'&calMonthEnd='.$prevCalMonthEnd.'">'.
|
||||
WebGUI::International::get(558,"Asset_EventsCalendar")." ".$monthRangeLength." ".
|
||||
$monthLabel.'</a>';
|
||||
|
|
|
|||
|
|
@ -70,6 +70,10 @@ sub definition {
|
|||
noFormPost=>1,
|
||||
defaultValue=>undef,
|
||||
fieldType=>"hidden"
|
||||
},
|
||||
assetsToHide => {
|
||||
defaultValue=>undef,
|
||||
fieldType=>"checkList"
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
@ -101,6 +105,21 @@ sub getEditForm {
|
|||
},
|
||||
-value=>"view"
|
||||
);
|
||||
} else {
|
||||
my @assetsToHide = split("\n",$self->getValue("assetsToHide"));
|
||||
my $children = $self->getLineage(["children"],{"returnQuickReadObjects"=>1, excludeClasses=>["WebGUI::Asset::Wobject::Layout"]});
|
||||
my %childIds;
|
||||
foreach my $child (@{$children}) {
|
||||
$childIds{$child->getId} = $child->getTitle;
|
||||
}
|
||||
$tabform->getTab("display")->checkList(
|
||||
-name=>"assetsToHide",
|
||||
-value=>\@assetsToHide,
|
||||
-options=>\%childIds,
|
||||
-label=>"Assets To Hide",
|
||||
-vertical=>1,
|
||||
-uiLevel=>9
|
||||
);
|
||||
}
|
||||
return $tabform;
|
||||
}
|
||||
|
|
@ -147,6 +166,7 @@ sub view {
|
|||
my %vars;
|
||||
# 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->getValue("assetsToHide"));
|
||||
my $i = 1;
|
||||
my @found;
|
||||
foreach my $position (@positions) {
|
||||
|
|
@ -154,10 +174,12 @@ sub view {
|
|||
foreach my $asset (@assets) {
|
||||
foreach my $child (@{$children}) {
|
||||
if ($asset eq $child->getId) {
|
||||
push(@{$vars{"position".$i."_loop"}},{
|
||||
id=>$child->getId,
|
||||
content=>$child->view
|
||||
}) if $child->canView;
|
||||
unless (isIn($asset,@hidden)) {
|
||||
push(@{$vars{"position".$i."_loop"}},{
|
||||
id=>$child->getId,
|
||||
content=>$child->view
|
||||
}) if $child->canView;
|
||||
}
|
||||
push(@found, $child->getId);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue