Module: Card::Set::All::ReferenceEditor::NestImage::HtmlFormat

Extended by:
Card::Set::AbstractFormat
Defined in:
card/tmpsets/set/mod037-card-mod-tinymce_editor/all/reference_editor/nest_image.rb,
card/tmpsets/set/mod038-card-mod-tinymce_editor/all/reference_editor/nest_image.rb

Instance Method Summary collapse

Instance Method Details

#adapt_reference_editor_for_imagesObject



31
32
33
34
35
36
37
38
# File 'card/tmpsets/set/mod037-card-mod-tinymce_editor/all/reference_editor/nest_image.rb', line 31

def adapt_reference_editor_for_images
  nest_name = card.autoname(card.name.field("image01"))
  voo.show! :content_tab
  @nest_content_tab = nest(nest_name, view: :new_image, type: :image, hide: :guide)

  image_name = nest_name.to_name.right
  @nest_snippet = Card::Reference::NestParser.new_image image_name
end

#nest_image_editor(editor_mode) ⇒ Object



25
26
27
28
# File 'card/tmpsets/set/mod037-card-mod-tinymce_editor/all/reference_editor/nest_image.rb', line 25

def nest_image_editor editor_mode
  adapt_reference_editor_for_images
  nest_editor editor_mode
end

#new_image_buttonsObject



47
48
49
50
51
# File 'card/tmpsets/set/mod037-card-mod-tinymce_editor/all/reference_editor/nest_image.rb', line 47

def new_image_buttons
  button_formgroup do
    [standard_save_button(no_origin_update: true, class: "_change-create-to-update")]
  end
end

#new_image_form_optsObject



41
42
43
44
45
# File 'card/tmpsets/set/mod037-card-mod-tinymce_editor/all/reference_editor/nest_image.rb', line 41

def new_image_form_opts
  { buttons: new_image_buttons,
    success: { tinymce_id: Env.params[:tinymce_id],
               view: :open } }
end


16
17
18
19
# File 'card/tmpsets/set/mod037-card-mod-tinymce_editor/all/reference_editor/nest_image.rb', line 16

view :modal_nest_image, unknown: true, cache: :never,
                        wrap: { slot: { class: "nodblclick" } } do
  nest_image_editor :modal
end

#view: nest_imageObject



9
10
11
12
13
14
# File 'card/tmpsets/set/mod037-card-mod-tinymce_editor/all/reference_editor/nest_image.rb', line 9

view :nest_image, unknown: true, cache: :never,
                  wrap: {
                    slot: { class: "_overlay d0-card-overlay card nodblclick" }
                  } do
  nest_image_editor :overlay
end

#view: new_imageObject



21
22
23
# File 'card/tmpsets/set/mod037-card-mod-tinymce_editor/all/reference_editor/nest_image.rb', line 21

view :new_image, perms: :create, unknown: true, cache: :never do
  new_view_frame_and_form new_image_form_opts
end