back button/menu working
This commit is contained in:
parent
2400f19099
commit
439eda2da2
4 changed files with 323 additions and 45 deletions
|
|
@ -235,7 +235,7 @@ __DATA__
|
|||
</a>
|
||||
</div>
|
||||
|
||||
<div id="tabs" class="yui-navset">
|
||||
<div id="tabBar" class="yui-navset">
|
||||
<ul class="yui-nav">
|
||||
<li class="selected"><a href="#tab1"><em>View</em></a></li>
|
||||
<li><a href="#tab2"><em>Tree</em></a></li>
|
||||
|
|
@ -245,8 +245,8 @@ __DATA__
|
|||
<input type="button" id="backButton" value="<" /><input type="button" id="forwardButton" value=">" />
|
||||
</span>
|
||||
<div id="location">
|
||||
<input type="text" id="locationUrl" value="/current/url" />
|
||||
<span id="locationTitle">Current Title</span>
|
||||
<input type="text" id="locationUrl" value="" />
|
||||
<span id="locationTitle"></span>
|
||||
</div>
|
||||
<span id="right">
|
||||
<input type="button" id="searchButton" value="S" /><input type="button" id="homeButton" value="H" />
|
||||
|
|
@ -264,11 +264,7 @@ __DATA__
|
|||
|
||||
<script type="text/javascript">
|
||||
YAHOO.util.Event.onDOMReady( function() {
|
||||
var myTabs = new YAHOO.widget.TabView("tabs");
|
||||
var bar = new WebGUI.Admin.LocationBar("locationBar");
|
||||
window.admin = {
|
||||
"bar" : bar,
|
||||
"tabs" : myTabs
|
||||
};
|
||||
window.admin = new WebGUI.Admin( {
|
||||
} );
|
||||
} );
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -260,9 +260,27 @@ if ($self->session->user->isRegistered || $self->session->setting->get("preventP
|
|||
$var{'head.tags'} .= '<meta http-equiv="Cache-Control" content="must-revalidate" />'
|
||||
}
|
||||
|
||||
|
||||
# TODO: Figure out if user is still in the admin console
|
||||
if ( $session->asset ) {
|
||||
my $assetDef = {
|
||||
assetId => $session->asset->getId,
|
||||
title => $session->asset->getTitle,
|
||||
url => $session->asset->getUrl,
|
||||
icon => $session->asset->getIcon(1),
|
||||
};
|
||||
$var{'head.tags'} .= sprintf <<'ADMINJS', JSON->new->encode( $assetDef );
|
||||
<script type="text/javascript">
|
||||
if ( window.parent && window.parent.admin ) {
|
||||
window.parent.admin.navigate( %s );
|
||||
}
|
||||
</script>
|
||||
ADMINJS
|
||||
}
|
||||
|
||||
# Removing the newlines will probably annoy people.
|
||||
# Perhaps turn it off under debug mode?
|
||||
$var{'head.tags'} =~ s/\n//g;
|
||||
#$var{'head.tags'} =~ s/\n//g;
|
||||
|
||||
# head.tags = head_attachments . body_attachments
|
||||
# keeping head.tags for backwards compatibility
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue