mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX: fixed submenu not opening in cms-menu when cms loads on page other than edit page section
This commit is contained in:
parent
65b3c3a894
commit
60cba7dd76
@ -452,7 +452,7 @@ class LeftAndMain extends Controller {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$linkingmode = "";
|
$linkingmode = "link";
|
||||||
|
|
||||||
if($menuItem->controller && get_class($this) == $menuItem->controller) {
|
if($menuItem->controller && get_class($this) == $menuItem->controller) {
|
||||||
$linkingmode = "current";
|
$linkingmode = "current";
|
||||||
|
@ -162,6 +162,7 @@ li.class-ErrorPage a .jstree-pageicon { background-position: 0 -112px; }
|
|||||||
.cms-menu-list li a:focus, .cms-menu-list li a:active { border-top: 1px solid #a1b2bc; text-decoration: none; background-color: #a1b2bc; color: #393939; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #92a5b2), color-stop(100%, #a1b2bc)); background-image: -webkit-linear-gradient(#92a5b2, #a1b2bc); background-image: -moz-linear-gradient(#92a5b2, #a1b2bc); background-image: -o-linear-gradient(#92a5b2, #a1b2bc); background-image: -ms-linear-gradient(#92a5b2, #a1b2bc); background-image: linear-gradient(#92a5b2, #a1b2bc); }
|
.cms-menu-list li a:focus, .cms-menu-list li a:active { border-top: 1px solid #a1b2bc; text-decoration: none; background-color: #a1b2bc; color: #393939; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #92a5b2), color-stop(100%, #a1b2bc)); background-image: -webkit-linear-gradient(#92a5b2, #a1b2bc); background-image: -moz-linear-gradient(#92a5b2, #a1b2bc); background-image: -o-linear-gradient(#92a5b2, #a1b2bc); background-image: -ms-linear-gradient(#92a5b2, #a1b2bc); background-image: linear-gradient(#92a5b2, #a1b2bc); }
|
||||||
.cms-menu-list li a .icon { display: block; float: left; margin: 4px 10px 0 4px; filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=70); opacity: 0.7; }
|
.cms-menu-list li a .icon { display: block; float: left; margin: 4px 10px 0 4px; filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=70); opacity: 0.7; }
|
||||||
.cms-menu-list li a .text { display: block; }
|
.cms-menu-list li a .text { display: block; }
|
||||||
|
.cms-menu-list li ul { display: none; }
|
||||||
.cms-menu-list li.current a { color: white; text-shadow: #1e5270 0 -1px 0; border-top: 1px solid #55a4d2; border-bottom: 1px solid #1e5270; background-color: #338dc1; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #338dc1), color-stop(100%, #287099)); background-image: -webkit-linear-gradient(#338dc1, #287099); background-image: -moz-linear-gradient(#338dc1, #287099); background-image: -o-linear-gradient(#338dc1, #287099); background-image: -ms-linear-gradient(#338dc1, #287099); background-image: linear-gradient(#338dc1, #287099); }
|
.cms-menu-list li.current a { color: white; text-shadow: #1e5270 0 -1px 0; border-top: 1px solid #55a4d2; border-bottom: 1px solid #1e5270; background-color: #338dc1; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #338dc1), color-stop(100%, #287099)); background-image: -webkit-linear-gradient(#338dc1, #287099); background-image: -moz-linear-gradient(#338dc1, #287099); background-image: -o-linear-gradient(#338dc1, #287099); background-image: -ms-linear-gradient(#338dc1, #287099); background-image: linear-gradient(#338dc1, #287099); }
|
||||||
.cms-menu-list li.current ul { border-top: 1px solid #1e5270; }
|
.cms-menu-list li.current ul { border-top: 1px solid #1e5270; }
|
||||||
.cms-menu-list li.current li { background-color: #287099; }
|
.cms-menu-list li.current li { background-color: #287099; }
|
||||||
|
@ -27,11 +27,6 @@
|
|||||||
onmatch: function() {
|
onmatch: function() {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
// TODO Fix icon etc.
|
|
||||||
// this.children('li').each(function() {
|
|
||||||
// $(this).find('a:first').append('<span class="toggle">o</span>');
|
|
||||||
// });
|
|
||||||
|
|
||||||
$('.cms-container').bind('afterstatechange', function(e, data) {
|
$('.cms-container').bind('afterstatechange', function(e, data) {
|
||||||
var controller = data.xhr.getResponseHeader('X-Controller');
|
var controller = data.xhr.getResponseHeader('X-Controller');
|
||||||
if(controller) {
|
if(controller) {
|
||||||
|
@ -118,6 +118,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ul {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
&.current {
|
&.current {
|
||||||
a {
|
a {
|
||||||
color: $color-text-light;
|
color: $color-text-light;
|
||||||
|
@ -24,14 +24,13 @@
|
|||||||
|
|
||||||
<ul class="cms-menu-list">
|
<ul class="cms-menu-list">
|
||||||
<% control MainMenu %>
|
<% control MainMenu %>
|
||||||
<li class="$LinkingMode $FirstLast <% if LinkingMode == 'current' %>opened<% end_if %>" id="Menu-$Code">
|
<li class="$LinkingMode $FirstLast <% if LinkingMode == 'link' %><% else %>opened<% end_if %>" id="Menu-$Code">
|
||||||
<a href="$Link">
|
<a href="$Link">
|
||||||
<span class="icon icon-16 icon-{$Code.LowerCase}"> </span>
|
<span class="icon icon-16 icon-{$Code.LowerCase}"> </span>
|
||||||
<span class="text">$Title</span>
|
<span class="text">$Title</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<% if Code == 'CMSMain' %>
|
<% if Code == 'CMSMain' %>
|
||||||
<% if LinkingMode == 'current' %>
|
|
||||||
<ul>
|
<ul>
|
||||||
<li class="first <% if Top.class == 'CMSPageEditController' || Top.class == 'CMSMain' %>current<% end_if %>" id="Menu-CMSPageEditController"><a href="admin/page/edit/show/$Top.CurrentPageID">
|
<li class="first <% if Top.class == 'CMSPageEditController' || Top.class == 'CMSMain' %>current<% end_if %>" id="Menu-CMSPageEditController"><a href="admin/page/edit/show/$Top.CurrentPageID">
|
||||||
<span class="text">Content</span>
|
<span class="text">Content</span>
|
||||||
@ -46,7 +45,6 @@
|
|||||||
<span class="text">History</span>
|
<span class="text">History</span>
|
||||||
</a></li>
|
</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<% end_if %>
|
|
||||||
<% end_if %>
|
<% end_if %>
|
||||||
</li>
|
</li>
|
||||||
<% end_control %>
|
<% end_control %>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user