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,6 +35,11 @@ | ||
| 35 | background: #f9f9f9; | 35 | background: #f9f9f9; |
| 36 | } | 36 | } |
| 37 | 37 | ||
| 38 | +.diminished-text-field { | ||
| 39 | + width: 80%; | ||
| 40 | + background: #f9f9f9; | ||
| 41 | +} | ||
| 42 | + | ||
| 38 | .text-area { | 43 | .text-area { |
| 39 | width: 95% !important; | 44 | width: 95% !important; |
| 40 | margin: 0; | 45 | margin: 0; |
| @@ -44,3 +49,7 @@ | @@ -44,3 +49,7 @@ | ||
| 44 | width: 99% !important; | 49 | width: 99% !important; |
| 45 | margin: 0; | 50 | margin: 0; |
| 46 | } | 51 | } |
| 52 | + | ||
| 53 | +.align-button { | ||
| 54 | + margin-bottom: 10px; | ||
| 55 | +} | ||
| 47 | \ No newline at end of file | 56 | \ No newline at end of file |
app/views/mezuro_ranges/_form.html.erb
| 1 | <%= render :partial => 'shared/form_errors', :locals => {:object => @mezuro_range} %> | 1 | <%= render :partial => 'shared/form_errors', :locals => {:object => @mezuro_range} %> |
| 2 | - | 2 | + |
| 3 | <div class="row margin-left-none"> | 3 | <div class="row margin-left-none"> |
| 4 | <div class="form-table span9"> | 4 | <div class="form-table span9"> |
| 5 | 5 | ||
| 6 | <div class="form-row"> | 6 | <div class="form-row"> |
| 7 | - <div class="field-container"> | 7 | + <div class="field-container" > |
| 8 | <%= f.label :beginning, class: 'control-label' %> | 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 | </div> | 11 | </div> |
| 11 | <div class="help-container"> | 12 | <div class="help-container"> |
| 12 | <p> | 13 | <p> |
| @@ -18,7 +19,8 @@ | @@ -18,7 +19,8 @@ | ||
| 18 | <div class="form-row"> | 19 | <div class="form-row"> |
| 19 | <div class="field-container"> | 20 | <div class="field-container"> |
| 20 | <%= f.label :end, class: 'control-label' %> | 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 | </div> | 24 | </div> |
| 23 | <div class="help-container"> | 25 | <div class="help-container"> |
| 24 | <p> | 26 | <p> |
| @@ -39,7 +41,7 @@ | @@ -39,7 +41,7 @@ | ||
| 39 | </div> | 41 | </div> |
| 40 | </div> | 42 | </div> |
| 41 | 43 | ||
| 42 | - <div class="form-row"> | 44 | + <div class="form-row"> |
| 43 | <% if @readings.size == 0 %> | 45 | <% if @readings.size == 0 %> |
| 44 | <%= render partial: 'no_readings' %> | 46 | <%= render partial: 'no_readings' %> |
| 45 | <% else %> | 47 | <% else %> |