Changed Mobile App, fixed announcement default widget

This commit is contained in:
Saurabh Bhatia 2014-03-18 14:59:30 +08:00
parent 2725aefb71
commit c0105e7cb8
1 changed files with 6 additions and 4 deletions

View File

@ -467,8 +467,9 @@ class ApplicationController < ActionController::Base
end end
def prepare_for_mobile def prepare_for_mobile
if @site.mobile_on if (@site.mobile_on.eql?(true) && mobile_device?)
session[:mobile_param] = if request.path =~ /mobile/ mobile_path = "/mobile"
session[:mobile_param] = if request.path.eql?(mobile_path)
'1' '1'
elsif params[:mobile] elsif params[:mobile]
params[:mobile] params[:mobile]
@ -476,8 +477,9 @@ class ApplicationController < ActionController::Base
session[:mobile_param] session[:mobile_param]
end end
request.format = :mobile if mobile_device? request.format = :mobile if mobile_device?
else elsif (@site.mobile_on.eql?(false) && mobile_device?)
session[:mobile_param] = if request.path =~ /app/ mobile_path = "/mobile/app"
session[:mobile_param] = if request.path.eql?(mobile_path)
'1' '1'
elsif params[:mobile] elsif params[:mobile]
params[:mobile] params[:mobile]