Run rubocop --fix-layout and remove encoding comments

This commit is contained in:
Patrick Gansterer 2021-03-01 15:27:26 +01:00
parent fa63e6e81d
commit ea2862fdef
283 changed files with 1164 additions and 1969 deletions

View file

@ -12,12 +12,12 @@ class DatePickerTimeInput < SimpleForm::Inputs::StringInput
# In the future, use html5 date&time inputs. This needs modernizr or equiv. to avoid
# double widgets, and perhaps conditional css to adjust input width (chrome).
value = @builder.object.send attribute_name
date_options = {as: :string, class: 'input-small datepicker'}
time_options = {as: :string, class: 'input-mini'}
date_options = { as: :string, class: 'input-small datepicker' }
time_options = { as: :string, class: 'input-mini' }
@builder.input_field("#{attribute_name}_date_value", options.merge(date_options)) + ' ' +
@builder.input_field("#{attribute_name}_time_value", options.merge(time_options))
@builder.input_field("#{attribute_name}_time_value", options.merge(time_options))
# time_select requires a date_select
#@builder.time_select("#{attribute_name}_time", {ignore_date: true}, input_html_options.merge(time_options))
# @builder.time_select("#{attribute_name}_time", {ignore_date: true}, input_html_options.merge(time_options))
end
def label_target

View file

@ -1,5 +1,3 @@
# encoding: utf-8
class DeltaInput < SimpleForm::Inputs::StringInput
# for now, need to pass id or it won't work
def input(wrapper_options)
@ -16,12 +14,12 @@ class DeltaInput < SimpleForm::Inputs::StringInput
delta_button(content_tag(:i, nil, class: 'icon icon-plus'), 1, options)
end
end
#template.button_tag('', type: :submit, data: {decrement: options[:id]}, tabindex: -1, class: 'btn') +
# template.button_tag('', type: :submit, data: {decrement: options[:id]}, tabindex: -1, class: 'btn') +
private
def delta_button(title, direction, options)
data = { (direction>0 ? 'increment' : 'decrement') => options[:id] }
data = { (direction > 0 ? 'increment' : 'decrement') => options[:id] }
delta = direction * options[:data][:delta]
template.button_tag(title, type: :button, name: 'delta', value: delta, data: data, tabindex: -1, class: 'btn')
end