fixed: IE6 shows Admin Bar over Asset Manager

This commit is contained in:
Doug Bell 2009-02-25 23:55:40 +00:00
parent a18bccd543
commit 0828ecfef5
4 changed files with 93 additions and 68 deletions

View file

@ -215,17 +215,27 @@ A reference to the current session.
If supplied, provides a list of defaults such as title and icons for the admin console.
=head3 options
A hash reference of options with the following keys
=head4 showAdminBar
If true, will show the admin bar on this admin console page
=cut
sub new {
my $class = shift;
my $session = shift;
my $id = shift;
my $options = shift;
my $self;
$self->{_session} = $session;
bless $self, $class;
$self->{_function} = {};
$self->{_functionId} = $id;
$self->{_options} = $options;
return $self;
}
@ -289,7 +299,17 @@ sub render {
}
$var{"backtosite.url"} = $self->session->url->getBackToSiteURL();
return $self->session->style->process(WebGUI::Asset::Template->new($self->session,$self->session->setting->get("AdminConsoleTemplate"))->process(\%var),"PBtmpl0000000000000137");
my $template
= WebGUI::Asset::Template->new(
$self->session,
$self->session->setting->get("AdminConsoleTemplate")
);
if ( $self->{_options}->{showAdminBar} ) {
$var{adminBar}
= WebGUI::Macro::AdminBar::process($self->session);
}
my $output = $template->process(\%var);
return $self->session->style->process($output,"PBtmpl0000000000000137");
}
#-------------------------------------------------------------------

View file

@ -323,7 +323,9 @@ JavaScript that will take over if the browser has the cojones.
sub www_manage {
my ( $session ) = @_;
my $ac = WebGUI::AdminConsole->new( $session, "assets" );
my $ac = WebGUI::AdminConsole->new( $session, "assets", {
showAdminBar => 1
} );
my $currentAsset = getCurrentAsset( $session );
my $i18n = WebGUI::International->new( $session, "Asset" );
@ -413,7 +415,7 @@ sub www_manage {
YAHOO.util.Event.onDOMReady( WebGUI.AssetManager.initManager );
</script>
ENDHTML
my $output = WebGUI::Macro::AdminBar::process($session).'<div class="yui-skin-sam" id="assetManager">' . getHeader( $session );
my $output = '<div class="yui-skin-sam" id="assetManager">' . getHeader( $session );
### Crumbtrail
my $crumb_markup = '<li><a href="%s">%s</a> &gt;</li>';