Add an 'open' class to opened menus.

Never hide opened menus in the catalog.
This commit is contained in:
Mayhem 2014-02-04 10:37:51 +01:00
parent 65e8b585bd
commit 12ffcb3309
2 changed files with 4 additions and 2 deletions

View File

@ -447,8 +447,8 @@ a[href="javascript:;"] {
margin: 0;
vertical-align: text-top;
}
.thumb:not(:hover) > .menu-button > i {
visibility: hidden;
.thumb:not(:hover) > .menu-button:not(.open) > i {
display: none;
}
.thumb > .menu-button {
position: absolute;

View File

@ -47,6 +47,7 @@ UI = do ->
menu = @makeMenu()
currentMenu = menu
lastToggledButton = button
$.addClass button, 'open'
for entry in @entries
@insertEntry entry, menu, data
@ -99,6 +100,7 @@ UI = do ->
close: =>
$.rm currentMenu
$.rmClass lastToggledButton, 'open'
currentMenu = null
lastToggledButton = null
$.off d, 'click CloseMenu', @close