merging 6.5.6 bugfixes

This commit is contained in:
JT Smith 2005-04-19 20:55:11 +00:00
parent cd83598f7c
commit a58f2786f7
15 changed files with 207 additions and 88 deletions

View file

@ -755,6 +755,29 @@ sub recalculateRating {
}
#-------------------------------------------------------------------
=head2 setLastPost ( id, date )
Sets the most recent post in this collaboration system.
=head3 id
The assetId of the most recent post.
=head3 date
The date of the most recent post.
=cut
sub setLastPost {
my $self = shift;
my $id = shift;
my $date = shift;
$self->update(lastPostId=>$id, lastPostDate=>$date);
}
#-------------------------------------------------------------------
=head2 subscribe ( )

View file

@ -181,7 +181,7 @@ sub view {
WebGUI::Style::setLink($session{config}{extrasURL}."/draggable.css",{ type=>"text/css", rel=>"stylesheet", media=>"all" });
$vars{"dragger.icon"} = WebGUI::Icon::dragIcon();
$vars{"dragger.init"} = '
<iframe id="dragSubmitter" style="display: none;"></iframe>
<iframe id="dragSubmitter" style="display: none;" src="'.$session{config}{extrasURL}.'/spacer.gif"></iframe>
<script>
dragable_init("'.$self->getUrl("func=setContentPositions&map=").'");
</script>

View file

@ -85,7 +85,7 @@ sub getEditForm {
name=>"returnUrl",
value=>$session{form}{returnUrl}
});
my ($descendantsChecked, $selfChecked, $pedigreeChecked, $siblingsChecked);
my ($descendantsChecked, $ancestorsChecked, $selfChecked, $pedigreeChecked, $siblingsChecked);
my @assetsToInclude = split("\n",$self->getValue("assetsToInclude"));
my $afterScript;
foreach my $item (@assetsToInclude) {
@ -94,6 +94,8 @@ sub getEditForm {
} elsif ($item eq "descendants") {
$descendantsChecked = 1;
$afterScript = "displayNavEndPoint = false;";
} elsif ($item eq "ancestors") {
$ancestorsChecked = 1;
} elsif ($item eq "siblings") {
$siblingsChecked = 1;
} elsif ($item eq "pedigree") {
@ -118,7 +120,7 @@ sub getEditForm {
$tabform->getTab("properties")->readOnly(
-label=>"Relatives to Include",
-value=>WebGUI::Form::checkbox({
checked=>$selfChecked,
checked=>$ancestorsChecked,
name=>"assetsToInclude",
value=>"ancestors"
}).'Ancestors<br />'
@ -265,16 +267,16 @@ sub view {
if ($self->get("startType") eq "specificUrl") {
$start = WebGUI::Asset->newByUrl($self->get("startPoint"));
} elsif ($self->get("startType") eq "relativeToRoot") {
unless (($self->get("startPoint")+1) >= $self->getLineageLength) {
$start = WebGUI::Asset->newByLineage(substr($session{asset}->get("lineage"),0, ($self->get("startPoint") + 1) * 6));
unless (($self->get("startPoint")+1) >= $current->getLineageLength) {
$start = WebGUI::Asset->newByLineage(substr($current->get("lineage"),0, ($self->get("startPoint") + 1) * 6));
}
} elsif ($self->get("startType") eq "relativeToCurrentUrl") {
if ($self->get("startPoint") < 0) {
$start = WebGUI::Asset->newByLineage(substr($session{asset}->get("lineage"),0,
($session{asset}->getLineageLength - $self->get("startPoint") + 1) * 6
$start = WebGUI::Asset->newByLineage(substr($current->get("lineage"),0,
($current->getLineageLength - $self->get("startPoint") + 1) * 6
));
} elsif ($self->get("startPoint") > 0) {
my $lineage = $session{asset}->getLineage;
my $lineage = $current->getLineage;
for (1..$self->get("startPoint")) {
$lineage .= $self->formatRank(1);
}