Class: Glib::JsonUi::ViewBuilder::Panels::BulkEdit3

Inherits:
View show all
Defined in:
app/helpers/glib/json_ui/view_builder/panels.rb

Overview

The generic bulk-edit table: bulkEdit2's skeleton plus everything bulkEditSg hard-coded for the Surfguard imports, expressed as config so any consumer can compose the same behavior (bulkEditSg's replacement -- see the component's header comment for the full mapping).

Instance Attribute Summary

Attributes inherited from JsonUiElement

#json, #page

Instance Method Summary collapse

Methods inherited from View

component_name

Methods inherited from JsonUiElement

action, any, array, badgeable, bool, color, component_name, date, date_time, enum, float, hash, icon, #initialize, int, length, menu, panels_builder, #props, required, singleton_array, string, text, url, views

Constructor Details

This class inherits a constructor from Glib::JsonUi::JsonUiElement

Instance Method Details

#createdObject

Override



617
618
619
620
621
622
# File 'app/helpers/glib/json_ui/view_builder/panels.rb', line 617

def created
  # Same form-peer rule as bulkEdit2 (see its comment).
  if page.current_form
    raise 'panels_bulkEdit3 is not allowed inside a form; place it as a sibling and target it with forms_submit targetId'
  end
end

#dataRows(value) ⇒ Object



709
710
711
# File 'app/helpers/glib/json_ui/view_builder/panels.rb', line 709

def dataRows(value)
  json.dataRows value
end

#viewCells(values) ⇒ Object



701
702
703
704
705
706
707
# File 'app/helpers/glib/json_ui/view_builder/panels.rb', line 701

def viewCells(values)
  json.set! 'viewCells' do
    values.each do |value|
      value.call(page.view_builder)
    end
  end
end

#viewRows(value) ⇒ Object



713
714
715
# File 'app/helpers/glib/json_ui/view_builder/panels.rb', line 713

def viewRows(value)
  json.viewRows value
end