Permalink
Browse files

Changed the color selection to a list on the iPhone

  • Loading branch information...
Bob Van Landuyt
Bob Van Landuyt committed Dec 20, 2010
1 parent d44c96d commit ecc6765e8af8f373c34c0a6fb1afa882b89ca065
Showing with 4 additions and 4 deletions.
  1. +1 −1 Gemfile.lock
  2. +2 −2 app/views/interfaces/_form.iphone.erb
  3. +1 −1 features/iphone_manage_interfaces.feature
View
@@ -6,7 +6,7 @@ GIT
GIT
remote: git://github.com/Reprazent/convert_colors.git
- revision: f474a559fe81b5c74aaa3a2bcb757e1fc2734bbe
+ revision: 0489d05e93453b88489e2501ae3110d29e313d50
specs:
convert_colors (0.0.1)
@@ -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;">
@@ -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"

0 comments on commit ecc6765

Please sign in to comment.