记住铁轨中的标签式面板

时间:2012-01-02 09:14:01

标签: ruby-on-rails

在我的ruby应用程序中,我使用了选项卡式菜单 假设我有3个标签tabA,tabB,tabC。我的默认选项卡是A. 假设我在tabB和页面刷新,它需要tabA而不是tabB。 有没有办法记住这个选项卡,并刷新自动选择到最后一个打开的选项卡。

-set_title "ICs"
-content_for :content_title do
  = link_to "Test Case Manager", "/"
  »
  = "IC Browser"
%table.grid.full
  %tr
    %td.grid.full_panels{:style => "width: 30%"}
      -panel "IC Filter" do
        = render "filter",:root_name=>params[:root_name],:suite_name=>params[:suite_name],:case_name=>params[:case_name],:name=>params[:name],:ic_filter=>1
    %td.grid.full_panels{:style => "width: 70%"}
      - tabbed_panel "ICs", [["Available", "all_ics"], ["New", "new_ics"], ["Obsolete", "obsolete_ics"], ['New IC', 'ic_stub']] do
        #all_ics.tab_container.table_wrapper{:class => "default_tab"}
          = render "browser_form", :show_check_boxes => true, :root_name=>params[:root_name],:suite_name=>params[:suite_name],:case_name=>params[:case_name],:name=>params[:name],:ic_filter=>1

        #new_ics.tab_container.table_wrapper
          = render "browser_form", :show_check_boxes => true, :ics => Ic.new_ics
        #obsolete_ics.tab_container.table_wrapper
          - form_tag "/ics/mass_action", :method => :post do
            = hidden_field_tag "obsolete", true
            = render "obsolete_ics", :show_check_boxes => true, :ics => Ic.obsolete,:obsolete=>true,:root_name=>params[:root_name],:suite_name=>params[:suite_name],:case_name=>params[:case_name],:name=>params[:name],:ic_filter=>1
            Make Active:
            = submit_tag "Go", :name => "set_obsolete_status"
        #ic_stub.tab_container
          = render "ic_stub_form"
/Execute the tree table javascript (hackish)
= javascript_tag "$('.treeTable').treeTable()"
/ Need some Ic javascript to (cascading selects, etc.)
= javascript_include_tag "pages/ic"

感谢您的帮助, 拉姆亚。

0 个答案:

没有答案