app/controllers/report_controller/widgets.rb
# Shortcut was dropped, reorder the :shortcuts hash
Shortcut was dropped, reorder the :shortcuts hash
Shortcut was dropped reorder the : shortcuts hash
def widget_shortcut_dd_done
    new_hash = {}
    params[:col1].each { |sc| new_hash[sc.to_i] = @edit[:new][:shortcuts][sc.to_i] }
    @edit[:new][:shortcuts] = new_hash
    @edit[:new][:shortcut_keys] = @edit[:new][:shortcuts].keys  
    render :update do |page|                    
      changed = (@edit[:new] != @edit[:current])
      page << javascript_for_miq_button_visibility(changed)
    end
  end
def widget_shortcut_dd_done new_hash = { } params [ :col1 ] . each { | sc | new_hash [ sc . to_i ] = @edit [ :new ] [ :shortcuts ] [ sc . to_i ] } @edit [ :new ] [ :shortcuts ] = new_hash @edit [ :new ] [ :shortcut_keys ] = @edit [ :new ] [ :shortcuts ] . keys render :update do | page | changed = ( @edit [ :new ] != @edit [ :current ] ) page << javascript_for_miq_button_visibility ( changed ) end end
Shortcut was dropped, reorder the :shortcuts hash
Shortcut was dropped reorder the : shortcuts hash
# Save the keys array so we can compare the hash order # Use JS to update the display