Merge pull request #22 from ZeusWPI/21/buttons

Bigger order buttons on mobile devices
This commit is contained in:
benji 2015-02-19 15:34:31 +01:00
commit e037594d0e
3 changed files with 11 additions and 4 deletions

View file

@ -1,3 +1,10 @@
// Place all the styles related to the Orders controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
.form-control.input-lg{
height:65px;
}
.big-form-button{
height:65px;
width:65px;
}

View file

@ -49,7 +49,7 @@ class FormattedFormBuilder < ActionView::Helpers::FormBuilder
def counter(name, options = {})
form_group_builder(name, options) do
counter_button("btn-dec", "glyphicon-minus") +
text_field_without_format(name, options) +
text_field_without_format(name, options.merge({class: 'form-control input-lg row_counter'})) +
counter_button("btn-inc", "glyphicon-plus")
end
end
@ -164,8 +164,8 @@ class FormattedFormBuilder < ActionView::Helpers::FormBuilder
def counter_button(button, glyphicon)
content_tag :span, class: "input-group-btn" do
content_tag :button, class: "btn btn-default #{button}", type: "button" do
content_tag :span, "", class: "glyphicon #{glyphicon}"
content_tag :button, class: "btn btn-default btn-lg #{button}", type: "button" do
content_tag :span, "", class: "glyphicon btn-lg #{glyphicon}"
end
end
end

View file

@ -4,7 +4,7 @@
<span class="input-group-addon">&euro;</span>
<%= f.number_field :total_price, skip_label: true, step: :any, class: 'form-control input-lg' %>
<span class="input-group-btn">
<%= f.submit "Order!", class: "btn btn-primary input-lg" %>
<%= f.submit "Order!", class: "btn btn-primary big-form-button" %>
</span>
</div>
</div>