diff --git a/app/views/admin/standing_orders/_products_panel.html.haml b/app/views/admin/standing_orders/_products_panel.html.haml new file mode 100644 index 0000000000..5e1ce8d4ee --- /dev/null +++ b/app/views/admin/standing_orders/_products_panel.html.haml @@ -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 diff --git a/app/views/admin/standing_orders/_table.html.haml b/app/views/admin/standing_orders/_table.html.haml index e2b3250f29..e23bd21d36 100644 --- a/app/views/admin/standing_orders/_table.html.haml +++ b/app/views/admin/standing_orders/_table.html.haml @@ -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' }