Remove data-hooks

This commit is contained in:
Hugo Daniel
2019-07-25 14:34:06 +02:00
parent a11562e4dd
commit ec6f6056a8
2 changed files with 7 additions and 7 deletions

View File

@@ -21,7 +21,7 @@
%div
- @product.option_types.each do |option_type|
- unless variant_unit_option_type?(option_type)
.field{"data-hook" => "presentation"}
.field
= label :new_variant, option_type.presentation
- if @variant.new_record?
= select(:new_variant, option_type.presentation, option_type.option_values.collect {|ov| [ ov.presentation, ov.id ] }, {}, {class: 'select2 fullwidth'})
@@ -52,7 +52,7 @@
.right.six.columns.omega.label-block
- if @product.variant_unit != 'weight'
.field{"data-hook" => 'weight'}
.field
= f.label 'weight', t('weight')+' (kg)'
- value = number_with_precision(@variant.weight, precision: 2)
= f.text_field 'weight', value: value, class: 'fullwidth'

View File

@@ -12,7 +12,7 @@
%col{style: "width: 20%"}/
%col{style: "width: 15%"}/
%col{style: "width: 15%"}/
%thead{"data-hook" => "variants_header"}
%thead
%tr
%th{colspan: "2"}= Spree.t(:options)
%th= Spree.t(:price)
@@ -20,7 +20,7 @@
%th.actions
%tbody
- @variants.each do |variant|
%tr{id: spree_dom_id(variant), "data-hook" => "variants_row", class: cycle('odd', 'even'), style: "#{"color:red;" if variant.deleted? }" }
%tr{id: spree_dom_id(variant), class: cycle('odd', 'even'), style: "#{"color:red;" if variant.deleted? }" }
%td.no-border
%span.handle
%td= variant.full_name
@@ -39,7 +39,7 @@
\.
- if @product.empty_option_values?
%p.first_add_option_types.no-objects-found{"data-hook" => "first_add_option_types"}
%p.first_add_option_types.no-objects-found
= Spree.t(:to_add_variants_you_must_first_define)
= link_to Spree.t(:option_types), admin_product_url(@product)
= Spree.t(:and)
@@ -47,8 +47,8 @@
- else
- content_for :page_actions do
%ul.inline-menu{"data-hook" => "toolbar"}
%li#new_var_link{"data-hook" => ""}
%ul.inline-menu
%li#new_var_link
= link_to_with_icon('icon-plus', Spree.t(:new_variant), new_admin_product_variant_url(@product), remote: true, 'data-update' => 'new_variant', class: 'button')
%li= link_to_with_icon('icon-filter', @deleted.blank? ? Spree.t(:show_deleted) : Spree.t(:show_active), admin_product_variants_url(@product, deleted: @deleted.blank? ? "on" : "off"), class: 'button')