From 784461481f267d91a1146e191b4f42068b027268 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Wed, 17 Dec 2008 23:12:01 +0000 Subject: [PATCH] Forward port asset manager button fixes for search form. --- docs/changelog/7.x.x.txt | 1 + lib/WebGUI/Content/AssetManager.pm | 25 +++++++++++++------------ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index bc4c833f1..01c303ae5 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -1,6 +1,7 @@ 7.6.8 - Updated captcha images to be more legible. - fixed #9285: modifing template prevents edit of syncontent + - fixed #8886: Search button in Asset manager 7.6.7 - fixed #9263: Thingy possibleValues processing, and List type autodetection. diff --git a/lib/WebGUI/Content/AssetManager.pm b/lib/WebGUI/Content/AssetManager.pm index 85c8892e1..bf0abdaf5 100644 --- a/lib/WebGUI/Content/AssetManager.pm +++ b/lib/WebGUI/Content/AssetManager.pm @@ -553,10 +553,11 @@ Search assets underneath this asset. =cut sub www_search { - my $session = shift; - my $ac = WebGUI::AdminConsole->new( $session, "assets" ); - my $i18n = WebGUI::International->new( $session, "Asset" ); - my $output = '
' . getHeader( $session ); + my $session = shift; + my $ac = WebGUI::AdminConsole->new( $session, "assets" ); + my $i18n = WebGUI::International->new( $session, "Asset" ); + my $currentAsset = getCurrentAsset($session); + my $output = '
' . getHeader( $session ); $session->style->setLink( $session->url->extras( 'yui-webgui/build/assetManager/assetManager.css' ), { rel => "stylesheet", type => 'text/css' } ); $session->style->setScript( $session->url->extras( 'yui/build/yahoo-dom-event/yahoo-dom-event.js' ) ); @@ -564,20 +565,20 @@ sub www_search { $session->style->setScript( $session->url->extras( 'yui-webgui/build/form/form.js' ) ); ### Show the form - $output .= q{

} + $output .= q{

} . q{} . q{} . q{} . getClassSelectBox( $session ) - . q{} + . q{} . q{

} ; ### Actions - if ( my $action = $session->form->get( 'action' ) ) { - my @assetIds = $session->form->get( 'assetId' ); + if ( my $action = lc $session->form->get( 'action' ) ) { + my @assetIds = $session->form->get( 'assetId' ); - if ( $action eq "trash" ) { + if ( $action eq "delete" ) { ##aka trash for my $assetId ( @assetIds ) { my $asset = WebGUI::Asset->newByDynamicClass( $session, $assetId ); next unless $asset; @@ -725,9 +726,9 @@ sub www_search { $output .= q{} . q{} . q{

} . $i18n->get( 'with selected' ) - . q{} - . q{} - . q{} + . q{} + . q{} + . q{} . q{

} . q{} ;