putting mobile interface back in so we can get it cleaned up
This commit is contained in:
parent
40cc829419
commit
c4a270ef8b
2 changed files with 11 additions and 5 deletions
|
|
@ -3,9 +3,10 @@
|
||||||
# the COPYRIGHT file.
|
# the COPYRIGHT file.
|
||||||
|
|
||||||
class ApplicationController < ActionController::Base
|
class ApplicationController < ActionController::Base
|
||||||
#has_mobile_fu
|
has_mobile_fu
|
||||||
protect_from_forgery :except => :receive
|
protect_from_forgery :except => :receive
|
||||||
|
|
||||||
|
before_filter :mobile_except_ipad
|
||||||
before_filter :set_contacts_and_status, :except => [:create, :update]
|
before_filter :set_contacts_and_status, :except => [:create, :update]
|
||||||
before_filter :count_requests
|
before_filter :count_requests
|
||||||
before_filter :set_invites
|
before_filter :set_invites
|
||||||
|
|
@ -25,6 +26,12 @@ class ApplicationController < ActionController::Base
|
||||||
end
|
end
|
||||||
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
|
def count_requests
|
||||||
@request_count = current_user.requests_for_me.size if current_user
|
@request_count = current_user.requests_for_me.size if current_user
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -10,10 +10,9 @@
|
||||||
|
|
||||||
%meta{"http-equiv"=>"Content-Type", :content=>"text/html; charset=utf-8"}/
|
%meta{"http-equiv"=>"Content-Type", :content=>"text/html; charset=utf-8"}/
|
||||||
|
|
||||||
= javascript_include_tag 'vendor/jquery144.min'
|
= javascript_include_tag 'vendor/jquery144.min','rails'
|
||||||
= javascript_include_tag 'vendor/jquery.mobile-1.0a1.js', 'rails'
|
= include_javascripts :mobile
|
||||||
= stylesheet_link_tag 'vendor/jquery_mobile.min'
|
= stylesheet_link_tag 'mobile', 'vendor/jquery_mobile.min'
|
||||||
= stylesheet_link_tag 'mobile'
|
|
||||||
= csrf_meta_tag
|
= csrf_meta_tag
|
||||||
|
|
||||||
= yield(:head)
|
= yield(:head)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue