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 {
|
.delta-input {
|
||||||
|
|
||||||
.btn {
|
.btn {
|
||||||
padding: 0;
|
padding: 4px 0;
|
||||||
width: 24px;
|
width: 24px;
|
||||||
height: 28px;
|
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
|
font-size: 10px;
|
||||||
}
|
}
|
||||||
input[data-delta] {
|
input[data-delta] {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
height: 18px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// handle error class outside of bootstrap controls
|
// 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
|
# 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
|
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
|
||||||
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') +
|
||||||
|
|
Loading…
Reference in a new issue