a few more bug fixes
This commit is contained in:
parent
45eb557978
commit
c7c968eaf2
6 changed files with 60 additions and 11 deletions
|
|
@ -399,6 +399,18 @@ sub render {
|
|||
$var{"console.canUse"} = $acParams->{canUse};
|
||||
$var{"console.icon"} = $acParams->{icon};
|
||||
$var{"help.url"} = $self->{_helpUrl};
|
||||
if (exists $session{asset}) {
|
||||
my $importNode = $session{asset}->getImportNode;
|
||||
my $importNodeLineage = $importNode->get("lineage");
|
||||
my $assetLineage = $session{asset}->get("lineage");
|
||||
if ($assetLineage =~ /^$importNodeLineage/) {
|
||||
$var{"backtosite.url"} = $session{asset}->getDefault->getUrl;
|
||||
} else {
|
||||
$var{"backtosite.url"} = $session{asset}->getContainer->getUrl;
|
||||
}
|
||||
} else {
|
||||
$var{"backtosite.url"} = WebGUI::URL::page();
|
||||
}
|
||||
$var{"application_loop"} = $self->getAdminFunction;
|
||||
return WebGUI::Style::process(WebGUI::Asset::Template->new($session{setting}{AdminConsoleTemplate})->process(\%var),"PBtmpl0000000000000137");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,10 +51,10 @@ A lineage is a concatenated series of sequence numbers, each six digits long, th
|
|||
|
||||
use WebGUI::Asset;
|
||||
|
||||
$AssetObject= WebGUI::Asset->addChild(\%properties);
|
||||
$integer= WebGUI::Asset->canEdit("An_Id_AbCdeFGHiJkLMNOP");
|
||||
$integer= WebGUI::Asset->canView("An_Id_AbCdeFGHiJkLMNOP");
|
||||
WebGUI::Asset->cascadeLineage(100001,100101110111);
|
||||
$newAsset = $asset->addChild(\%properties);
|
||||
$boolean = $asset->canEdit("An_Id_AbCdeFGHiJkLMNOP");
|
||||
$boolean = $asset->canView("An_Id_AbCdeFGHiJkLMNOP");
|
||||
$asset->cascadeLineage(100001,100101110111);
|
||||
$html= WebGUI::Asset->checkExportPath();
|
||||
WebGUI::Asset->cut();
|
||||
$arrayRef= WebGUI::Asset->definition(\@arr);
|
||||
|
|
@ -71,7 +71,8 @@ A lineage is a concatenated series of sequence numbers, each six digits long, th
|
|||
$JavaScript= WebGUI::Asset->getAssetManagerControl(\%hashref, $string, $bool);
|
||||
$arrayRef= WebGUI::Asset->getAssetsInClipboard($boolean, $string);
|
||||
$arrayRef= WebGUI::Asset->getAssetsInTrash($boolean, $string);
|
||||
$containerRef= WebGUI::Asset->getContainer();
|
||||
$containerRef= $asset->getContainer();
|
||||
$asset = WebGUI::Asset->getDefault();
|
||||
$tabform= WebGUI::Asset->getEditForm();
|
||||
getFirstChild
|
||||
getIcon
|
||||
|
|
@ -83,6 +84,7 @@ A lineage is a concatenated series of sequence numbers, each six digits long, th
|
|||
getMetaDataFields
|
||||
getName
|
||||
getNextChildRank
|
||||
getNotFound
|
||||
getParent
|
||||
getParentLineage
|
||||
getRank
|
||||
|
|
@ -966,6 +968,20 @@ sub getContainer {
|
|||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getDefault ( )
|
||||
|
||||
Returns the default object, which is also known by some as the "Home Page". The default object is set in the settings.
|
||||
|
||||
=cut
|
||||
|
||||
sub getDefault {
|
||||
my $class = shift;
|
||||
return $class->newByDynamicClass($session{setting}{defaultPage});
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getEditForm ( )
|
||||
|
|
@ -976,7 +992,7 @@ Creates and returns a tabform to edit parameters of an Asset.
|
|||
|
||||
sub getEditForm {
|
||||
my $self = shift;
|
||||
my $tabform = WebGUI::TabForm->new();
|
||||
my $tabform = WebGUI::TabForm->new(undef,undef,$self->getContainer->getUrl());
|
||||
$tabform->hidden({
|
||||
name=>"func",
|
||||
value=>"editSave"
|
||||
|
|
@ -1539,6 +1555,20 @@ sub getNextChildRank {
|
|||
return $self->formatRank($rank);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getNotFound ( )
|
||||
|
||||
Returns the not found object. The not found object is set in the settings.
|
||||
|
||||
=cut
|
||||
|
||||
sub getNotFound {
|
||||
my $class = shift;
|
||||
return $class->newByDynamicClass($session{setting}{notFoundPage});
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getPackageList ( )
|
||||
|
|
@ -1884,7 +1914,7 @@ sub newByDynamicClass {
|
|||
if ($className eq "") {
|
||||
WebGUI::HTTP::setStatus('404',"Page Not Found");
|
||||
WebGUI::ErrorHandler::fatal("The page not found page doesn't exist.") if ($assetId eq $session{setting}{notFoundPage});
|
||||
return WebGUI::Asset->newByDynamicClass($session{setting}{notFoundPage});
|
||||
return $class->getNotFound;
|
||||
}
|
||||
my $cmd = "use ".$className;
|
||||
eval ($cmd);
|
||||
|
|
@ -1972,10 +2002,10 @@ sub newByUrl {
|
|||
if ($asset->{assetId} ne "" || $asset->{className} ne "") {
|
||||
return WebGUI::Asset->newByDynamicClass($asset->{assetId}, $asset->{className});
|
||||
} else {
|
||||
return $class->newByDynamicClass($session{setting}{notFoundPage});
|
||||
return $class->getNotFound;
|
||||
}
|
||||
}
|
||||
return $class->newByDynamicClass($session{setting}{defaultPage});
|
||||
return $class->getDefault;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -185,6 +185,10 @@ A hash reference containing the definition of the tabs. It should be constructed
|
|||
A string containing the link to the tab-CascadingStyleSheet
|
||||
|
||||
default = extrasPath.'/tabs/tabs.css'
|
||||
|
||||
=head3 cancelUrl
|
||||
|
||||
A URL to go to when the cancel button is pressed.
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -192,6 +196,7 @@ sub new {
|
|||
my $class = shift;
|
||||
my $startingTabs = shift;
|
||||
my $css = shift || $session{config}{extrasURL}.'/tabs/tabs.css';
|
||||
my $cancelUrl = shift || WebGUI::URL::page();
|
||||
my %tabs;
|
||||
tie %tabs, 'Tie::IxHash';
|
||||
foreach my $key (keys %{$startingTabs}) {
|
||||
|
|
@ -201,7 +206,7 @@ sub new {
|
|||
}
|
||||
my $cancel = WebGUI::Form::button({
|
||||
value=>WebGUI::International::get('cancel'),
|
||||
extras=>q|onClick="location.href='|.WebGUI::URL::page().q|'"|
|
||||
extras=>q|onClick="location.href='|.$cancelUrl.q|'"|
|
||||
});
|
||||
bless { _cancel=>$cancel, _submit=>WebGUI::Form::submit(), _form=>WebGUI::Form::formHeader(), _hidden=>"", _tab=>\%tabs, _css=>$css }, $class;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue