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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1454,13 +1454,17 @@ The UI level for this field. See the WebGUI developer's site for details. Defaul
|
|||
|
||||
If no value is specified, this will be used.
|
||||
|
||||
=head3 richEditId
|
||||
|
||||
An asset Id of a rich editor config. Defaults to the default rich editor in the settings.
|
||||
|
||||
=cut
|
||||
|
||||
sub HTMLArea {
|
||||
my ($output);
|
||||
my ($self, @p) = @_;
|
||||
my ($name, $label, $value, $subtext, $extras, $wrap, $rows, $columns, $uiLevel, $defaultValue) =
|
||||
rearrange([qw(name label value subtext extras wrap rows columns uiLevel defaultValue)], @p);
|
||||
my ($name, $label, $value, $subtext, $extras, $wrap, $rows, $columns, $uiLevel, $defaultValue, $richEditId) =
|
||||
rearrange([qw(name label value subtext extras wrap rows columns uiLevel defaultValue richEditId)], @p);
|
||||
if (_uiLevelChecksOut($uiLevel)) {
|
||||
$output = WebGUI::Form::HTMLArea({
|
||||
"name"=>$name,
|
||||
|
|
@ -1469,7 +1473,8 @@ sub HTMLArea {
|
|||
"columns"=>$columns,
|
||||
"rows"=>$rows,
|
||||
"extras"=>$extras,
|
||||
defaultValue=>$defaultValue
|
||||
defaultValue=>$defaultValue,
|
||||
richEditId=>$richEditId
|
||||
});
|
||||
$output .= _subtext($subtext);
|
||||
$output = $self->_tableFormRow($label,$output);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue