Sha256: fefbbe3e5802e802c7f6a092c07f8959698a1283f8f5845e3d7c24b501881a87

Contents?: true

Size: 960 Bytes

Versions: 12

Compression:

Stored size: 960 Bytes

Contents

format :html do
  view :quick_edit, unknown: true, wrap: :slot do
    quick_edit
  end

  view :quick_edit_success do
    set_info true
  end

  def quick_edit
    haml :quick_edit
  end

  def quick_form
    card_form :update, quick_form_opts do
      quick_editor
    end
  end

  def quick_form_opts
    { "data-slot-selector": ".set-info.card-slot",
      success: { view: :quick_edit_success } }
  end

  def set_info notify_change=nil
    wrap true, class: "set-info" do
      haml :set_info, notify_change: notify_change
    end
  end

  def undo_button
    link_to "undo", method: :post, rel: "nofollow", remote: true,
                    class: "btn btn-secondary ms-2 btn-sm btn-reduced-padding slotter",
                    "data-slot-selector": ".card-slot.quick_edit-view",
                    path: { action: :update,
                            revert_actions: [card.last_action_id],
                            revert_to: :previous }
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
card-mod-rules-0.18.1 set/rule/quick_editor.rb
card-mod-rules-0.18.0 set/rule/quick_editor.rb
card-mod-rules-0.17.0 set/rule/quick_editor.rb
card-mod-rules-0.16.0 set/rule/quick_editor.rb
card-mod-rules-0.15.6 set/rule/quick_editor.rb
card-mod-rules-0.15.5 set/rule/quick_editor.rb
card-mod-rules-0.15.4 set/rule/quick_editor.rb
card-mod-rules-0.15.3 set/rule/quick_editor.rb
card-mod-rules-0.15.2.pre1 set/rule/quick_editor.rb
card-mod-rules-0.15.1.1 set/rule/quick_editor.rb
card-mod-rules-0.15.1 set/rule/quick_editor.rb
card-mod-rules-0.15.0 set/rule/quick_editor.rb