Commit cbda52f1207add1685712a32d23d6ec1b00a6aa6
Committed by
Diego Camarinha
1 parent
97dd8eec
Exists in
colab
and in
4 other branches
Created buttons in range form for infinity symbols.
Signed off by: Diego Araújo <diegoamc90@gmail.com>
Showing
2 changed files
with
16 additions
and
5 deletions
Show diff stats
app/assets/stylesheets/form_with_tooltip.css
| ... | ... | @@ -35,6 +35,11 @@ |
| 35 | 35 | background: #f9f9f9; |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | +.diminished-text-field { | |
| 39 | + width: 80%; | |
| 40 | + background: #f9f9f9; | |
| 41 | +} | |
| 42 | + | |
| 38 | 43 | .text-area { |
| 39 | 44 | width: 95% !important; |
| 40 | 45 | margin: 0; |
| ... | ... | @@ -44,3 +49,7 @@ |
| 44 | 49 | width: 99% !important; |
| 45 | 50 | margin: 0; |
| 46 | 51 | } |
| 52 | + | |
| 53 | +.align-button { | |
| 54 | + margin-bottom: 10px; | |
| 55 | +} | |
| 47 | 56 | \ No newline at end of file | ... | ... |
app/views/mezuro_ranges/_form.html.erb
| 1 | 1 | <%= render :partial => 'shared/form_errors', :locals => {:object => @mezuro_range} %> |
| 2 | - | |
| 2 | + | |
| 3 | 3 | <div class="row margin-left-none"> |
| 4 | 4 | <div class="form-table span9"> |
| 5 | 5 | |
| 6 | 6 | <div class="form-row"> |
| 7 | - <div class="field-container"> | |
| 7 | + <div class="field-container" > | |
| 8 | 8 | <%= f.label :beginning, class: 'control-label' %> |
| 9 | - <%= f.text_field :beginning, class: 'text-field' %> | |
| 9 | + <%= f.text_field :beginning, class: 'diminished-text-field' %> | |
| 10 | + <%= link_to '-∞'.html_safe, 'javascript:void(0)', :onClick => "jQuery( '#mezuro_range_beginning' ).val('-INF');", class: 'btn btn-default align-button' %> | |
| 10 | 11 | </div> |
| 11 | 12 | <div class="help-container"> |
| 12 | 13 | <p> |
| ... | ... | @@ -18,7 +19,8 @@ |
| 18 | 19 | <div class="form-row"> |
| 19 | 20 | <div class="field-container"> |
| 20 | 21 | <%= f.label :end, class: 'control-label' %> |
| 21 | - <%= f.text_field :end, class: 'text-field' %> | |
| 22 | + <%= f.text_field :end, class: 'diminished-text-field' %> | |
| 23 | + <%= link_to '∞'.html_safe, 'javascript:void(0)', :onClick => "jQuery( '#mezuro_range_end' ).val('INF');", class: 'btn btn-default align-button' %> | |
| 22 | 24 | </div> |
| 23 | 25 | <div class="help-container"> |
| 24 | 26 | <p> |
| ... | ... | @@ -39,7 +41,7 @@ |
| 39 | 41 | </div> |
| 40 | 42 | </div> |
| 41 | 43 | |
| 42 | - <div class="form-row"> | |
| 44 | + <div class="form-row"> | |
| 43 | 45 | <% if @readings.size == 0 %> |
| 44 | 46 | <%= render partial: 'no_readings' %> |
| 45 | 47 | <% else %> | ... | ... |