From 6781b41e0434bead6750ce779422398136fbb552 Mon Sep 17 00:00:00 2001 From: Godwin Date: Mon, 13 Jun 2016 23:03:29 -0700 Subject: [PATCH] Fix for focus and error reporting --- app/assets/stylesheets/_application.scss | 7 +--- app/controllers/application_controller.rb | 10 ++++- app/views/shared/_navbar.html.haml | 45 ++++++++++++----------- 3 files changed, 33 insertions(+), 29 deletions(-) diff --git a/app/assets/stylesheets/_application.scss b/app/assets/stylesheets/_application.scss index cd218b4..a26c3f4 100644 --- a/app/assets/stylesheets/_application.scss +++ b/app/assets/stylesheets/_application.scss @@ -2340,14 +2340,9 @@ html[data-lingua-franca-example="html"] { .select-field select:focus, .workshop-link:focus .title, #main-nav .nav a:focus .title { - html & { - outline: 0.25rem solid rgba($colour-2, 0); - outline-offset: 0.2rem; - @include _(transition, outline 150ms ease-in-out); - } - html[data-input="kb"] & { outline: 0.25rem solid rgba($colour-2, 0.5); + outline-offset: 0.2rem; z-index: 1; } } diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index e06c738..af72bb8 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -159,10 +159,16 @@ class ApplicationController < LinguaFrancaApplicationController params, current_user, ).deliver_now if Rails.env.preview? || Rails.env.production? - + + # log the error + logger.info exception.to_s + logger.info exception.backtrace.join("\n") + # show the error page error_500 exception - raise exception + + # raise the error if we are in development so that we can debug it + raise exception if Rails.env.development? end def generate_confirmation(user, url, expiry = nil) diff --git a/app/views/shared/_navbar.html.haml b/app/views/shared/_navbar.html.haml index 81250ef..0f7eb29 100644 --- a/app/views/shared/_navbar.html.haml +++ b/app/views/shared/_navbar.html.haml @@ -1,23 +1,26 @@ %nav #main-nav - = row(class: 'inner-nav') do - - if logged_in? - = columns(medium: 12, class: 'user-nav') do - .user-nav-bar - =link_to (_!current_user.name), register_step_path(@conference.slug, :contact_info), class: 'my-account' - =link_to (_'forms.actions.generic.Log_out'), logout_path - = columns(medium: 4, class: 'inner-nav') do - = link_to home_path, :class => 'logo' do - = svg_sprite('icons', "bb-icon-logo", "Logo") - = svg_sprite('icons', "bb-icon-logo-text", "Logo Text") - = off_screen _!'Bike Bike' - = columns(medium: 8, class: 'nav') do - = nav_link :about - = nav_link :policy - - case (@conference ? @conference.registration_status.to_sym : :closed) - - when :pre - = nav_link register_path(@conference.slug), :pre_register, :register - - when :open - = nav_link register_path(@conference.slug), :register - - else - = render 'shared/donate_button', :email_address => (@conference.paypal_email_address || @conference.email_address || @conference.organizations.first.email_address) \ No newline at end of file + - begin + = row(class: 'inner-nav') do + - if logged_in? + = columns(medium: 12, class: 'user-nav') do + .user-nav-bar + =link_to (_!current_user.name), register_step_path(@conference.slug, :contact_info), class: 'my-account' + =link_to (_'forms.actions.generic.Log_out'), logout_path + = columns(medium: 4, class: 'inner-nav') do + = link_to home_path, :class => 'logo' do + = svg_sprite('icons', "bb-icon-logo", "Logo") + = svg_sprite('icons', "bb-icon-logo-text", "Logo Text") + = off_screen _!'Bike Bike' + = columns(medium: 8, class: 'nav') do + = nav_link :about + = nav_link :policy + - case (@conference && @conference.registration_status ? @conference.registration_status.to_sym : :closed) + - when :pre + = nav_link register_path(@conference.slug), :pre_register, :register + - when :open + = nav_link register_path(@conference.slug), :register + - else + = render 'shared/donate_button', :email_address => (@conference.paypal_email_address || @conference.email_address || (@conference.organizations.present? && @conference.organizations.first.present? ? @conference.organizations.first.email_address : nil)) + - rescue + \ No newline at end of file