Moving standing orders products panel template into separate partial

This commit is contained in:
Rob Harrington
2016-12-01 10:39:23 +11:00
parent cdff1ef7b6
commit ffcffb30ca
2 changed files with 16 additions and 15 deletions

View File

@@ -0,0 +1,15 @@
= render :partial => "spree/admin/variants/autocomplete", :formats => :js
%script{ type: "text/ng-template", id: "admin/panels/standing_order_products.html" }
%form{ name: 'standing_order_form', ng: { controller: 'ProductsPanelController' } }
%div{ style: 'width: 90%; margin: auto;' }
= render 'products'
%a.button.update.fullwidth{ ng: { class: "{disabled: saved() && !saving, saving: saving}", click: "save()" } }
%span{ ng: {hide: "saved() || saving" } }
SAVE
%i.icon-save
%span{ ng: {show: "saved() && !saving" } }
SAVED
%i.icon-ok-sign
%span{ ng: {show: "saving" } }
SAVING
%i.icon-refresh

View File

@@ -1,18 +1,4 @@
= render :partial => "spree/admin/variants/autocomplete", :formats => :js
%script{ type: "text/ng-template", id: "admin/panels/standing_order_products.html" }
%form{ name: 'standing_order_form', ng: { controller: 'ProductsPanelController' } }
%div{ style: 'width: 90%; margin: auto;' }
= render 'products'
%a.button.update.fullwidth{ ng: { class: "{disabled: saved() && !saving, saving: saving}", click: "save()" } }
%span{ ng: {hide: "saved() || saving" } }
SAVE
%i.icon-save
%span{ ng: {show: "saved() && !saving" } }
SAVED
%i.icon-ok-sign
%span{ ng: {show: "saving" } }
SAVING
%i.icon-refresh
= render 'products_panel'
%table.index#standing_orders
%col.customer{ width: "20%", 'ng-show' => 'columns.customer.visible' }