Improve delta-input styling
This commit is contained in:
parent
496dd34cc3
commit
dcf921dc8d
2 changed files with 5 additions and 5 deletions
|
@ -8,14 +8,13 @@ form.delta-input, .delta-input form {
|
|||
.delta-input {
|
||||
|
||||
.btn {
|
||||
padding: 0;
|
||||
padding: 4px 0;
|
||||
width: 24px;
|
||||
height: 28px;
|
||||
vertical-align: middle;
|
||||
font-size: 10px;
|
||||
}
|
||||
input[data-delta] {
|
||||
text-align: center;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
// handle error class outside of bootstrap controls
|
||||
|
@ -30,4 +29,3 @@ form.delta-input, .delta-input form {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,9 @@ class DeltaInput < SimpleForm::Inputs::StringInput
|
|||
# TODO get generated id, don't know how yet - `add_default_name_and_id_for_value` might be an option
|
||||
|
||||
template.content_tag :div, class: 'delta-input input-prepend input-append' do
|
||||
delta_button('−', -1, options) + @builder.text_field(attribute_name, options) + delta_button('+', 1, options)
|
||||
delta_button(content_tag(:i, nil, class: 'icon icon-minus'), -1, options) +
|
||||
@builder.text_field(attribute_name, options) +
|
||||
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') +
|
||||
|
|
Loading…
Reference in a new issue