Remove data-hook tags

This commit is contained in:
Hugo Daniel
2018-10-30 14:03:51 +01:00
parent 652191a4c5
commit 422a68630f
5 changed files with 18 additions and 18 deletions

View File

@@ -1,15 +1,15 @@
= render partial: "spree/admin/variants/autocomplete", formats: :js
#add-line-item{"data-hook" => ""}
#add-line-item
%fieldset
%legend{align: "center"}
= t(:add_product)
.field.eight.columns.alpha{"data-hook" => "add_product_name"}
.field.eight.columns.alpha
= label_tag :add_product_name, t(:name_or_sku)
= hidden_field_tag :add_variant_id, "", class: "variant_autocomplete fullwidth"
.field.two.columns{"data-hook" => "add_quantity"}
.field.two.columns
= label_tag :add_quantity, t(:qty)
= number_field_tag :add_quantity, 1, min: 0
.actions.two.columns.omega{"data-hook" => "add_button"}
.actions.two.columns.omega
= link_to_with_icon 'icon-plus', t(:add), admin_order_line_items_url(@order),
method: :post,
id: 'add_line_item_to_order',

View File

@@ -1,4 +1,4 @@
%div{"data-hook" => "admin_order_form_fields"}
%div
- if @line_item.try(:errors).present?
= render partial: 'spree/shared/error_messages', locals: { target: @line_item }
= form_for @order, url: admin_order_url(@order), method: :put do |f|
@@ -12,7 +12,7 @@
%col{style: "width: 14%;"}/
%col{style: "width: 8%;"}/
%thead#line-items
%tr{"data-hook" => "admin_order_form_line_items_headers"}
%tr
%th
= t(:item_description)
%th.price
@@ -22,11 +22,11 @@
%th.total
%span
= t(:total)
%th.orders-actions.actions{"data-hook" => "admin_order_form_line_items_header_actions"}
%tbody{"data-hook" => "admin_order_form_line_items"}
%th.orders-actions.actions
%tbody
= f.fields_for :line_items do |li_form|
= render partial: 'spree/admin/orders/line_item', locals: { f: li_form }
%tbody#subtotal.no-border-top{"data-hook" => "admin_order_form_subtotal"}
%tbody#subtotal.no-border-top
%tr#subtotal-row
%td{colspan: "3"}
%b
@@ -36,7 +36,7 @@
%span
= @order.display_item_total.to_html
%td.actions
%tbody#order-charges.no-border-top{"data-hook" => "admin_order_form_adjustments"}
%tbody#order-charges.no-border-top
- @order.adjustments.eligible.each do |adjustment|
%tr
%td{colspan: "3"}
@@ -46,7 +46,7 @@
%td.total.align-center
%span= adjustment.display_amount.to_html
%td.actions
%tbody#order-total.grand-total.no-border-top{"data-hook" => "admin_order_form_total"}
%tbody#order-total.grand-total.no-border-top
%tr
%td{colspan: "3"}
%b
@@ -59,7 +59,7 @@
= render partial: 'spree/admin/orders/_form/distribution_fields'
.filter-actions.actions{"data-hook" => "admin_order_form_buttons", "ng-show" => "distributionChosen()"}
.filter-actions.actions{"ng-show" => "distributionChosen()"}
= button t(:update_and_recalculate_fees), 'icon-refresh'
%span.or
= t(:or)

View File

@@ -1,4 +1,4 @@
%tr{"data-hook" => "admin_order_form_line_item_row", id: "#{spree_dom_id(f.object)}", class: "#{cycle('odd', 'even')}"}
%tr{id: "#{spree_dom_id(f.object)}", class: "#{cycle('odd', 'even')}"}
%td
= f.object.variant.product.name
= "(#{f.object.full_name})" unless f.object.variant.option_values.empty?
@@ -8,5 +8,5 @@
= f.number_field :quantity, min: 0, class: "qty"
%td.total.align-center
= f.object.single_money
%td.actions{"data-hook" => "admin_order_form_line_item_actions"}
%td.actions
= link_to_delete f.object, {url: admin_order_line_item_url(@order.number, f.object), no_text: true}

View File

@@ -12,19 +12,19 @@
= render 'spree/admin/shared/order_tabs', current: 'Order Details'
%div{"data-hook" => "admin_order_edit_header"}
%div
- unless params["suppress_error_msg"]
= render partial: "spree/shared/error_messages", :locals => { :target => @order }
%div{"ng-app" => "admin.orders", "ng-controller" => "orderCtrl", "ofn-distributor-id" => @order.distributor_id, "ofn-order-cycle-id" => @order.order_cycle_id}
= render 'add_product'
%div{"data-hook" => "admin_order_edit_form"}
%div
#order-form-wrapper
= render 'form', order: @order
- content_for :head do
= javascript_tag 'var expand_variants = true;'
:coffee
angular.bootstrap(document.getElementById("links-dropdown"),['admin.dropdown'])

View File

@@ -45,7 +45,7 @@
= pretty_time(@order.completed_at)
%nav.menu
%ul{"data-hook" => "admin_order_tabs"}
%ul
%li{ class: "#{'active' if true}" }
= link_to_with_icon 'icon-edit', t(:order_details), edit_admin_order_url(@order)
%li{"#{'class=active' if current == 'Customer Details'}"}