diff --git a/lib/WebGUI/Content/AssetManager.pm b/lib/WebGUI/Content/AssetManager.pm index 585953972..c4e94afc8 100644 --- a/lib/WebGUI/Content/AssetManager.pm +++ b/lib/WebGUI/Content/AssetManager.pm @@ -147,70 +147,79 @@ sub getSearchPaginator { #---------------------------------------------------------------------------- -=head2 getMoreMenu ( asset, label ) +=head2 getMoreMenu ( session, label ) Gets the "More" menu with the specified label. =cut sub getMoreMenu { - my $asset = shift; + my $session = shift; my $label = shift || "More"; - my $userUiLevel = $asset->session->user->profileField("uiLevel"); - my $toolbarUiLevel = $asset->session->config->get("assetToolbarUiLevel"); - my $i18n = WebGUI::International->new( $asset->session, "Asset" ); + my $userUiLevel = $session->user->profileField("uiLevel"); + my $toolbarUiLevel = $session->config->get("assetToolbarUiLevel"); + my $i18n = WebGUI::International->new( $session, "Asset" ); ### The More menu - my @more_fields = (); # The fields to fill in the more menu - my $more_markup = q{} . $label . q{} - . q{} - . q{} - ; - - return sprintf $more_markup, @more_fields; + return to_json \@more_fields; } #---------------------------------------------------------------------------- @@ -362,6 +371,7 @@ sub www_manage { # Show the page $session->style->setLink( $session->url->extras('yui/build/datatable/assets/skins/sam/datatable.css'), {rel=>'stylesheet', type=>'text/css'}); + $session->style->setLink( $session->url->extras('yui/build/menu/assets/skins/sam/menu.css'), {rel=>'stylesheet', type=>'text/css'}); $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/yahoo.js' ) ); $session->style->setScript( $session->url->extras( 'yui/build/dom/dom.js' ) ); @@ -370,6 +380,8 @@ sub www_manage { $session->style->setScript( $session->url->extras( 'yui/build/connection/connection-min.js ' ) ); $session->style->setScript( $session->url->extras( 'yui/build/datasource/datasource-beta.js ' ) ); $session->style->setScript( $session->url->extras( 'yui/build/datatable/datatable-beta.js ' ) ); + $session->style->setScript( $session->url->extras( 'yui/build/container/container-min.js' ) ); + $session->style->setScript( $session->url->extras( 'yui/build/menu/menu-min.js' ) ); $session->style->setScript( $session->url->extras( 'yui-webgui/build/assetManager/assetManager.js' ) ); $session->style->setScript( $session->url->extras( 'yui-webgui/build/form/form.js' ) ); my $extras = $session->url->extras; @@ -382,7 +394,7 @@ ENDHTML my $output = '
' . getHeader( $session ); ### Crumbtrail - my $crumb_markup = '
  • > %s
  • '; + my $crumb_markup = '
  • %s >
  • '; my $ancestors = $currentAsset->getLineage( ['ancestors'], { returnObjects => 1 } ); $output .= '
      '; @@ -394,13 +406,14 @@ ENDHTML } # And ourself - $output .= sprintf '
    1. > %s
    2. ', - getMoreMenu( $currentAsset, $currentAsset->get( "menuTitle" ) ), + $output .= sprintf q{
    3. %s
    4. }, + $currentAsset->getUrl, + $currentAsset->get( "menuTitle" ), ; $output .= '
    '; ### The page of assets - $output .= q{
    } + $output .= q{
    } . q{
    } . q{} . q{} @@ -496,8 +509,12 @@ ENDHTML $output .= q{
    }; ### Write the JavaScript that will take over + $output .= '