fix annoying bug about popups within the submenu

This commit is contained in:
did 2012-01-18 01:54:26 +01:00
parent b8b8cef089
commit fc20fe70c9
2 changed files with 6 additions and 5 deletions

View File

@ -35,11 +35,12 @@ class Locomotive.Views.ApplicationView extends Backbone.View
$('#submenu ul li.hoverable').each -> $('#submenu ul li.hoverable').each ->
timer = null timer = null
link = $(@) link = $(@)
(popup = link.find('.popup')).removeClass('popup').addClass('submenu-popup').css( (popup = link.find('.popup')).removeClass('popup').addClass('submenu-popup'
top: link.offset().top + link.height() - 2
left: link.offset().left - parseInt(popup.css('padding-left'))
).bind('show', -> ).bind('show', ->
link.find('a').addClass('hover') & popup.show() link.find('a').addClass('hover') & popup.css(
top: link.offset().top + link.height() - 2
left: link.offset().left - parseInt(popup.css('padding-left'))
).show()
).bind('hide', -> ).bind('hide', ->
link.find('a').removeClass('hover') & $(@).hide() link.find('a').removeClass('hover') & $(@).hide()
).bind('mouseleave', -> popup.trigger('hide') ).bind('mouseleave', -> popup.trigger('hide')

View File

@ -64,8 +64,8 @@ x edit my site
x public_form (previously api something) x public_form (previously api something)
x bug text formatting x bug text formatting
x custom_fields: use the appropriate icon to drag select options x custom_fields: use the appropriate icon to drag select options
x bug ui with contents popup
- use list_or_group_entries instead of ordered_entries - use list_or_group_entries instead of ordered_entries
- bug ui with contents popup
- i18n - i18n
x add locales a site responds to x add locales a site responds to
x locale switcher x locale switcher