Module: Engine2::ActionPanelSupport

Instance Method Summary collapse

Instance Method Details



514
515
516
# File 'lib/engine2/action.rb', line 514

def modal_action modal = true
    panel[:modal_action] = modal
end

#panelObject



510
511
512
# File 'lib/engine2/action.rb', line 510

def panel
    @meta[:panel] ||= {}
end

#panel_class(cls) ⇒ Object



526
527
528
# File 'lib/engine2/action.rb', line 526

def panel_class cls
    panel[:class] = cls
end


538
539
540
# File 'lib/engine2/action.rb', line 538

def panel_footer ftr
    panel[:footer] = ftr
end

#panel_header(hdr) ⇒ Object



534
535
536
# File 'lib/engine2/action.rb', line 534

def panel_header hdr
    panel[:header] = hdr
end

#panel_panel_template(tmpl) ⇒ Object



522
523
524
# File 'lib/engine2/action.rb', line 522

def panel_panel_template tmpl
    panel[:panel_template] = tmpl
end

#panel_template(tmpl) ⇒ Object



518
519
520
# File 'lib/engine2/action.rb', line 518

def panel_template tmpl
    panel[:template] = tmpl
end

#panel_title(tle) ⇒ Object



530
531
532
# File 'lib/engine2/action.rb', line 530

def panel_title tle
    panel[:title] = tle
end

#post_runObject



499
500
501
502
503
504
505
506
507
508
# File 'lib/engine2/action.rb', line 499

def post_run
    super
    if @meta[:panel]
        panel_panel_template 'menu_m' if panel[:panel_template].nil?
        # modal_action false if panel[:panel_template] == false
        panel_class '' unless panel[:class]
        panel_footer true if panel[:footer] != false && menu?(:panel_menu)
        panel_header true if panel[:header] != false
    end
end

#pre_runObject



494
495
496
497
# File 'lib/engine2/action.rb', line 494

def pre_run
    modal_action true
    super
end