Commit 18110577a424dcbcfbcb327d70482f1a7fa14ea6
Committed by
Rafael Manzo
1 parent
23e69676
Exists in
colab
and in
4 other branches
Fix indentation and cleaned code
Showing
1 changed file
with
13 additions
and
16 deletions
Show diff stats
app/views/readings/_form.html.erb
... | ... | @@ -13,27 +13,24 @@ |
13 | 13 | <div class="form-group"> |
14 | 14 | <%= f.label :color, class: 'control-label' %><br> |
15 | 15 | <div id="color_div"> |
16 | - <%= f.text_field :color, class: 'form-control' %> | |
16 | + <%= f.text_field :color, class: 'form-control' %> | |
17 | 17 | <!-- We should use the glyph from bootstrap instead of loading a custom img --> |
18 | 18 | <input type="image" id="colorpicker_button" src="/assets/colorpicker.png"</input> |
19 | 19 | </div> |
20 | - | |
21 | 20 | <script> |
22 | - options = { | |
23 | - trigger_event: "click", | |
24 | - color: { | |
25 | - r: 0, | |
26 | - g: 0, | |
27 | - b: 0 | |
28 | - }, | |
29 | - onChange: function(colorHSB) { | |
30 | - //$("#reading_color").val(colorHSB.toHex()); | |
31 | - $("#color_div").children().val(colorHSB.toHex()); | |
32 | - } | |
33 | - } | |
34 | - new ColorPicker($("#colorpicker_button"), options); | |
21 | + options = { | |
22 | + trigger_event: "click", | |
23 | + color: { | |
24 | + r: 0, | |
25 | + g: 0, | |
26 | + b: 0 | |
27 | + }, | |
28 | + onChange: function(colorHSB) { | |
29 | + $("#color_div").children().val(colorHSB.toHex()); | |
30 | + } | |
31 | + } | |
32 | + new ColorPicker($("#colorpicker_button"), options); | |
35 | 33 | </script> |
36 | - | |
37 | 34 | </div> |
38 | 35 | |
39 | 36 | <%= f.submit 'Save', class: 'btn btn-primary' %> | ... | ... |