app/controllers/application_controller.rb
# RJS code to show tag box effects and replace the main list view area
RJS code to show tag box effects and replace the main list view area
RJS code to show tag box effects and replace the main list view area
def replace_gtl_main_div(options = {})
    action_url = options[:action_url] || @lastaction
    return if params[:action] == "button" && @lastaction == "show"
    if @grid_hash
      grid_options, js_options = replace_list_grid
    end
    render :update do |page|                        
      page.replace(:flash_msg_div, :partial => "layouts/flash_msg")           
      page << "miqSetButtons(0, 'center_tb');" 
      if layout_uses_listnav?
        page.replace(:listnav_div, :partial => "layouts/listnav")               
      end
      if @grid_hash
        page.replace_html("list_grid", :partial => "layouts/list_grid",
                                       :locals => {:options    => grid_options,
                                                   :js_options => js_options})
        page << "miqGridOnCheck();"
      else
        page.replace_html("main_div", :partial => "layouts/gtl")
        page << "$('#adv_div').slideUp(0.3);" if params[:entry]
      end
      page.replace_html("paging_div", :partial => 'layouts/pagingcontrols',
                                      :locals  => {:pages      => @pages,
                                                   :action_url => action_url,
                                                   :db         => @view.db,
                                                   :headers    => @view.headers})
    end
  end
def replace_gtl_main_div ( options = { } ) action_url = options [ :action_url ] || @lastaction return if params [ :action ] == "button" && @lastaction == "show" if @grid_hash grid_options , js_options = replace_list_grid end render :update do | page | page . replace ( :flash_msg_div , :partial => "layouts/flash_msg" ) page << "miqSetButtons(0, 'center_tb');" if layout_uses_listnav? page . replace ( :listnav_div , :partial => "layouts/listnav" ) end if @grid_hash page . replace_html ( "list_grid" , :partial => "layouts/list_grid" , :locals => { :options => grid_options , :js_options => js_options } ) page << "miqGridOnCheck();" else page . replace_html ( "main_div" , :partial => "layouts/gtl" ) page << "$('#adv_div').slideUp(0.3);" if params [ :entry ] end page . replace_html ( "paging_div" , :partial => 'layouts/pagingcontrols' , :locals => { :pages => @pages , :action_url => action_url , :db => @view . db , :headers => @view . headers } ) end end
RJS code to show tag box effects and replace the main list view area
RJS code to show tag box effects and replace the main list view area
# need to call this outside render :update # Use RJS to update the display # Replace the flash message # Reset the center toolbar # Replace accordion, if list_nav_div is there # Reset the center buttons # No grid, replace the gtl div # Replace the main div area contents
options
<not_specific>