If adding content from the asset manager, return user to the asset manager.

This commit is contained in:
Colin Kuskie 2009-06-05 23:31:28 +00:00
parent 87f1290047
commit 7016594da1
2 changed files with 4 additions and 1 deletions

View file

@ -87,6 +87,7 @@ sub process {
# stuff to do if we're on a page with an asset
if ($asset) {
my $inAssetManager = $session->form->get('op') eq 'assetManager';
# clipboard
my $clipboardItems = $session->asset->getAssetsInClipboard(1);
if (scalar (@$clipboardItems)) {
@ -118,6 +119,7 @@ sub process {
# assets
my %assetList = %{$config->get('assets')};
my $proceed = $inAssetManager ? ';proceed=manageAssets' : '';
foreach my $assetClass (keys %assetList) {
my $dummy = WebGUI::Asset->newByPropertyHashRef($session,{dummy=>1, className=>$assetClass});
next unless defined $dummy;
@ -126,7 +128,7 @@ sub process {
next unless exists $categories{$assetList{$assetClass}{category}};
$categories{$assetList{$assetClass}{category}}{items}{$dummy->getTitle} = {
icon => $dummy->getIcon(1),
url => $asset->getUrl("func=add;class=".$dummy->get('className')),
url => $asset->getUrl("func=add;class=".$dummy->get('className').$proceed),
};
}