Skip to content

Commit

Permalink
Moved data-hook values to element id
Browse files Browse the repository at this point in the history
  • Loading branch information
cyu committed Jul 21, 2012
1 parent 80002e7 commit 2fe9899
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion app/views/spree/admin/comment_types/_form.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div data-hook="admin_comment_type_form_fields">
<div id="admin_comment_type_form_fields" data-hook>
<%= f.field_container :name do %>
<%= f.label :name, t(:name) %><br />
<%= f.text_field :name, :class => 'fullwidth title' %>
Expand Down
6 changes: 3 additions & 3 deletions app/views/spree/admin/comment_types/edit.html.erb
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<%= render :partial => 'spree/admin/shared/configuration_menu' %>

<div data-hook="admin_comment_type_edit_form_header">
<div id="admin_comment_type_edit_form_header" data-hook>
<h1><%= t(:editing_comment_type) %></h1>
<%= render 'spree/shared/error_messages', :target => @comment_type %>
</div>

<div data-hook="admin_comment_type_edit_form">
<div id="admin_comment_type_edit_form" data-hook>
<%= form_for(@comment_type, :url => object_url, :html => { :method => :put }) do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %>

<div data-hook="admin_comment_type_edit_form_buttons">
<div id="admin_comment_type_edit_form_buttons" data-hook>
<%= render :partial => 'spree/admin/shared/edit_resource_links' %>
</div>
<% end %>
Expand Down
4 changes: 2 additions & 2 deletions app/views/spree/admin/comment_types/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<th><%= t(:name) %></th>
<th><%= t(:applies_to) %></th>
<th>
<div data-hook="admin_comment_types_index_header_actions"></div>
<div id="admin_comment_types_index_header_actions" data-hook></div>
</th>
</tr>
</thead>
Expand All @@ -27,7 +27,7 @@
<td><%= comment_type.name %></td>
<td><%= comment_type.applies_to %></td>
<td width="140px">
<div data-hook="admin_comment_types_index_row_actions">
<div id="admin_comment_types_index_row_actions" data-hook>
<%= link_to_edit comment_type %> &nbsp;
<%= link_to_delete comment_type %>
</div>
Expand Down
6 changes: 3 additions & 3 deletions app/views/spree/admin/comment_types/new.html.erb
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<%= render :partial => 'spree/admin/shared/configuration_menu' %>

<div data-hook="admin_comment_type_new_form_header">
<div id="admin_comment_type_new_form_header" data-hook>
<h1><%= t(:new_comment_type) %></h1>

<%= render 'spree/shared/error_messages', :target => @comment_type %>
</div>

<div data-hook="admin_comment_type_new_form">
<div id="admin_comment_type_new_form" data-hook>
<%= form_for(:comment_type, :url => collection_url) do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %>

<div data-hook="admin_comment_type_new_form_buttons">
<div id="admin_comment_type_new_form_buttons" data-hook>
<%= render :partial => 'spree/admin/shared/new_resource_links' %>
</div>
<% end %>
Expand Down

0 comments on commit 2fe9899

Please sign in to comment.