Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Changed the color selection to a list on the iPhone

  • Loading branch information...
commit ecc6765e8af8f373c34c0a6fb1afa882b89ca065 1 parent d44c96d
Bob Van Landuyt authored
View
2  Gemfile.lock
@@ -6,7 +6,7 @@ GIT
GIT
remote: git://github.com/Reprazent/convert_colors.git
- revision: f474a559fe81b5c74aaa3a2bcb757e1fc2734bbe
+ revision: 0489d05e93453b88489e2501ae3110d29e313d50
specs:
convert_colors (0.0.1)
View
4 app/views/interfaces/_form.iphone.erb
@@ -8,11 +8,11 @@
</div>
<div class="fieldcontain">
<%= form.label :connected_to %>
- <%= form.select :connected_to, interfaces.map {|i| [i.to_s, i.id, {:type => i.interface_type}] } << ["disconnect", nil],{:prompt => 'Connect this interface?', :selected => interface.other.try(:id) } %>
+ <%= form.select :connected_to, [["disconnect", nil]] + interfaces.map {|i| [i.to_s, i.id, {:type => i.interface_type}] }, {:selected => interface.other.try(:id)} %>
</div>
<div class="fieldcontain">
<%= form.label :cable_connection_color%>
- <%= form.text_field :cable_connection_color, :value => (interface.cable_connection.color if interface.cable_connection) %>
+ <%= form.select :cable_connection_color, ConvertColors.base_colors.map {|color| color.name}, {:prompt => 'Select a color?', :selected => interface.cable_connection.try(:color) } %>
</div>
<div id="hiddenOptions" style="display: none;">
View
2  features/iphone_manage_interfaces.feature
@@ -31,7 +31,7 @@ Scenario: Connect two interfaces
And I follow "Add interface"
When I fill in "interface_name" with "eth0"
And I select "Testdevice: eth0" from "interface_connected_to"
- And I fill in "interface_cable_connection_color" with "Blue"
+ And I select "Blue" from "interface_cable_connection_color"
And I press "Save"
And I should see "eth0 Testdevice: eth0"
And I should see "eth0 Connected server: eth0"
Please sign in to comment.
Something went wrong with that request. Please try again.