Fix the desktop dropdown to not close on click

This commit is contained in:
Henne Vogelsang 2013-06-28 00:37:11 +02:00 committed by Henne Vogelsang
parent ba21da5d72
commit 8286c8130d
2 changed files with 22 additions and 6 deletions

View file

@ -68,12 +68,22 @@
= render 'layouts/user_menu'
- else
%ul.nav.pull-right
- if current_page?(new_registration_path('user'))
%li.active
= link_to(new_registration_path('user')) do
%i.icon-heart
Sign Up
- else
%li
= link_to(new_registration_path('user')) do
%i.icon-heart
Sign Up
%li.dropdown.visible-desktop
%a.dropdown-toggle{"data-toggle" => "dropdown", :href => "#"}
%i.icon-user.icon-2x
Sign In
%i.icon-angle-down
.dropdown-menu{:style => "padding: 15px; padding-bottom: 0px;"}
.dropdown-menu{:style => "padding: 17px;"}
= form_tag user_session_path do
= text_field_tag 'user[email]'
= password_field_tag 'user[password]'

View file

@ -9,6 +9,12 @@
= stylesheet_link_tag "application"
= javascript_include_tag "application"
= csrf_meta_tags
:javascript
$(function() {
$('.dropdown input, .dropdown label').click(function(e) {
e.stopPropagation();
});
});
= yield(:head)
%body
#wrap