我希望在動畫下按下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