Module: Card::Set::Right::Default::HtmlFormat

Extended by:
AbstractFormat
Defined in:
platypus/tmp/set/gem-defaults/mod003-content/right/default.rb

Instance Method Summary collapse

Instance Method Details

#quick_editorObject



23
24
25
26
27
28
29
30
# File 'platypus/tmp/set/gem-defaults/mod003-content/right/default.rb', line 23

def quick_editor
  wrap_type_formgroup do
    type_field class: "type-field rule-type-field _submit-on-select"
  end +
    wrap_content_formgroup do
      text_field :content, class: "d0-card-content _submit-after-typing"
    end
end

#quick_form_optsObject



16
17
18
19
20
21
# File 'platypus/tmp/set/gem-defaults/mod003-content/right/default.rb', line 16

def quick_form_opts
  super.merge "data-update-foreign-slot":
              ".card-slot.quick_edit-view.RIGHT-Xinput_type,"\
              ".card-slot.quick_edit-view.RIGHT-Xcontent_option"\
              ".card-slot.quick_edit-view.RIGHT-Xcontent_option_view"
end

#view: one_line_contentObject



11
12
13
14
# File 'platypus/tmp/set/gem-defaults/mod003-content/right/default.rb', line 11

view :one_line_content do
  raw = _render_raw
  "#{card.type_name} : #{raw.present? ? raw : '<em>empty</em>'}"
end

#visible_cardtype_groupsObject



32
33
34
35
36
# File 'platypus/tmp/set/gem-defaults/mod003-content/right/default.rb', line 32

def visible_cardtype_groups
  hash = All::CardtypeGroups::GROUP.slice("Text",  "Data", "Upload")
  hash["Organize"] = ["List", "Pointer", "Link list", "Nest list"]
  hash
end