diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index b81d118f553d852e313c9defb9cb2f93e4fbe26d..cd93e0b43fffb5a3f09d55362bf9db5f72fe24f8 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -6,7 +6,6 @@ class ApplicationController < ActionController::Base has_mobile_fu protect_from_forgery :except => :receive - #before_filter :mobile_except_ipad before_filter :set_contacts_notifications_and_status, :except => [:create, :update] before_filter :count_requests before_filter :set_invites @@ -21,16 +20,6 @@ class ApplicationController < ActionController::Base end end - def mobile_except_ipad - if is_mobile_device? - if request.env["HTTP_USER_AGENT"].include? "iPad" - session[:mobile_view] = false - else - session[:mobile_view] = true - end - end - end - def count_requests @request_count = Request.where(:recipient_id => current_user.person.id).count if current_user end diff --git a/app/views/layouts/application.mobile.haml b/app/views/layouts/application.mobile.haml index e301d75b9e097267c9897a70c114f3e1758c33b9..0d0fa3f0b0bc835e6bbe1cdb01dc74d893bd094a 100644 --- a/app/views/layouts/application.mobile.haml +++ b/app/views/layouts/application.mobile.haml @@ -90,7 +90,7 @@ #footer - = link_to t('.logged_in_as' :name => current_user.name), current_user.person + = link_to t('.logged_in_as', :name => current_user.name), current_user.person %br %br diff --git a/vendor/plugins/mobile-fu/lib/mobile_fu.rb b/vendor/plugins/mobile-fu/lib/mobile_fu.rb index fbe49f28afe2d486b19da5bb8243dded01adfe6b..593ad7660d89a6b69a05af6fb59ba5eeb5f8d3bb 100644 --- a/vendor/plugins/mobile-fu/lib/mobile_fu.rb +++ b/vendor/plugins/mobile-fu/lib/mobile_fu.rb @@ -2,11 +2,12 @@ module ActionController module MobileFu # These are various strings that can be found in mobile devices. Please feel free # to add on to this list. + # removed ipad because ipad isn't a mobile device MOBILE_USER_AGENTS = 'palm|blackberry|nokia|phone|midp|mobi|symbian|chtml|ericsson|minimo|' + 'audiovox|motorola|samsung|telit|upg1|windows ce|ucweb|astel|plucker|' + 'x320|x240|j2me|sgh|portable|sprint|docomo|kddi|softbank|android|mmp|' + 'pdxgw|netfront|xiino|vodafone|portalmmm|sagem|mot-|sie-|ipod|up\\.b|' + - 'webos|amoi|novarra|cdm|alcatel|pocket|ipad|iphone|mobileexplorer|' + + 'webos|amoi|novarra|cdm|alcatel|pocket|iphone|mobileexplorer|' + 'mobile' def self.included(base)