class ExtForm::Layouts::BootstrapLayout
Public Instance Methods
calc_actual_width()
click to toggle source
# File lib/ext_form/layouts/bootstrap_layout.rb, line 14 def calc_actual_width self.layout_config[:max_width].to_i - 2 * self.layout_config[:spacing].to_i end
calculate_input_width(max_width, label_width, spacing, cols_sum, c)
click to toggle source
# File lib/ext_form/layouts/bootstrap_layout.rb, line 18 def calculate_input_width(max_width, label_width, spacing, cols_sum, c) (((max_width.to_f - spacing.to_f * 2) / cols_sum * c).floor - label_width.to_i).to_s end
measure_available?(measure)
click to toggle source
# File lib/ext_form/layouts/bootstrap_layout.rb, line 10 def measure_available?(measure) true end
width_available?(width)
click to toggle source
# File lib/ext_form/layouts/bootstrap_layout.rb, line 6 def width_available?(width) width && width.match(/^\d+$/) && width.to_i <= 12 end