changes weren't added last commit
This commit is contained in:
parent
80fbfd77e8
commit
d04a8bff09
1 changed files with 3 additions and 9 deletions
12
vendor/plugins/mobile-fu/lib/mobile_fu.rb
vendored
12
vendor/plugins/mobile-fu/lib/mobile_fu.rb
vendored
|
|
@ -2,12 +2,11 @@ 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|iphone|mobileexplorer|' +
|
||||
'webos|amoi|novarra|cdm|alcatel|pocket|ipad|iphone|mobileexplorer|' +
|
||||
'mobile'
|
||||
|
||||
def self.included(base)
|
||||
|
|
@ -60,13 +59,8 @@ module ActionController
|
|||
# Forces the request format to be :mobile
|
||||
|
||||
def force_mobile_format
|
||||
#request.format = :mobile
|
||||
#session[:mobile_view] = true if session[:mobile_view].nil?
|
||||
|
||||
if !request.xhr?
|
||||
request.format = :mobile
|
||||
session[:mobile_view] = true if session[:mobile_view].nil?
|
||||
end
|
||||
request.format = :mobile
|
||||
session[:mobile_view] = true if session[:mobile_view].nil?
|
||||
end
|
||||
|
||||
# Determines the request format based on whether the device is mobile or if
|
||||
|
|
|
|||
Loading…
Reference in a new issue