putting mobile interface back in so we can get it cleaned up

This commit is contained in:
maxwell 2010-11-21 17:14:43 -08:00
parent 40cc829419
commit c4a270ef8b
2 changed files with 11 additions and 5 deletions

View file

@ -3,9 +3,10 @@
# the COPYRIGHT file.
class ApplicationController < ActionController::Base
#has_mobile_fu
has_mobile_fu
protect_from_forgery :except => :receive
before_filter :mobile_except_ipad
before_filter :set_contacts_and_status, :except => [:create, :update]
before_filter :count_requests
before_filter :set_invites
@ -25,6 +26,12 @@ class ApplicationController < ActionController::Base
end
end
def mobile_except_ipad
if is_mobile_device?
session[:mobile_view] = false if request.env["HTTP_USER_AGENT"].include? "iPad"
end
end
def count_requests
@request_count = current_user.requests_for_me.size if current_user
end

View file

@ -10,10 +10,9 @@
%meta{"http-equiv"=>"Content-Type", :content=>"text/html; charset=utf-8"}/
= javascript_include_tag 'vendor/jquery144.min'
= javascript_include_tag 'vendor/jquery.mobile-1.0a1.js', 'rails'
= stylesheet_link_tag 'vendor/jquery_mobile.min'
= stylesheet_link_tag 'mobile'
= javascript_include_tag 'vendor/jquery144.min','rails'
= include_javascripts :mobile
= stylesheet_link_tag 'mobile', 'vendor/jquery_mobile.min'
= csrf_meta_tag
= yield(:head)