我希望在动画下按下html按钮时可以全屏显示我的Flash动画。我有一个../views/layout/viewer.rhtml(这个加载所有菜单)。我有./views/layout/fullscreen.rhtml(这个没有菜单,它只有100%的宽度和100%的高度以及flash对象)。我想避免使用Javascript方法。Ruby-在不更改URL的情况下更改按钮释放的布局
我有一个show_controller:
layout "viewer"
def index
h = Histoire.find_by_label(params[:story_name])
# Checks if current_user has a subscription which allows the story whose ID is passed by param to be seen
if h.price != 0 && (current_user.nil? || current_user.abonnement.histoires.delete_if{|histoire| histoire.label != params[:story_name]}.length == 0)
flash[:notice] = "Sorry, your subscription doesn't allow you to access this story, please contact sales service"
redirect_to index_url
else
@histoire = Histoire.find_by_label(params[:story_name])
render :action => :show
end
end
我有一个闪光对象:
我的Flash动画需要有一个固定的URL来运行:/显示/ Story_Name,目前的布局是观众。当我按FullScreen按钮时,我希望Ruby将布局从“查看器”更改为“全屏”。
当按下按钮时,是否有方法将布局从查看器更改为全屏?
我是这个问题的初学者。非常感谢能帮助我的人。
更好迟到比从不多谢谢你的回答和你的意见。 – Pierre