diff --git a/app/views/spree/admin/products/index/_indicators.html.haml b/app/views/spree/admin/products/index/_indicators.html.haml index 5cf28af7de..14a1194550 100644 --- a/app/views/spree/admin/products/index/_indicators.html.haml +++ b/app/views/spree/admin/products/index/_indicators.html.haml @@ -1,14 +1,14 @@ %div{ 'ng-show' => '!spree_api_key_ok' } {{ api_error_msg }} -%div.sixteen.columns.alpha#loading{ 'ng-if' => 'loading' } +%div.sixteen.columns.alpha#loading{ 'ng-if' => 'RequestMonitor.loading' } %img.spinner{ src: "/assets/spinning-circles.svg" } %h1= t('.title') -%div.sixteen.columns.alpha{ 'ng-show' => '!loadingAllPages && filteredProducts.length == 0 && query.length==0' } +%div.sixteen.columns.alpha{ 'ng-show' => '!RequestMonitor.loading && products.length == 0 && query.length==0' } %h1#no_results= t('.no_products') -%div.sixteen.columns.alpha{ 'ng-show' => '!loadingAllPages && filteredProducts.length == 0 && query.length!=0' } +%div.sixteen.columns.alpha{ 'ng-show' => '!RequestMonitor.loading && products.length == 0 && query.length!=0' } %h1#no_results = t('.no_results') ' diff --git a/app/views/spree/admin/products/index/_products.html.haml b/app/views/spree/admin/products/index/_products.html.haml index c122896e48..5388420caa 100644 --- a/app/views/spree/admin/products/index/_products.html.haml +++ b/app/views/spree/admin/products/index/_products.html.haml @@ -1,14 +1,14 @@ -%div.sixteen.columns.alpha{ 'ng-hide' => 'loading || filteredProducts.length == 0' } +%div.sixteen.columns.alpha{ 'ng-hide' => 'RequestMonitor.loading || products.length == 0' } %form{ name: 'bulk_product_form' } %save-bar{ dirty: "bulk_product_form.$dirty", persist: "false" } %input.red{ type: "button", value: t(:save_changes), ng: { click: "submitProducts()", disabled: "!bulk_product_form.$dirty" } } %input{ type: "button", value: t(:close), 'ng-click' => "cancel('#{admin_products_path}')" } - %table.index#listing_products.bulk{ "infinite-scroll" => "incrementLimit()", "infinite-scroll-distance" => "1" } + %table.index#listing_products.bulk = render 'spree/admin/products/index/products_head' - %tbody{ 'ng-repeat' => 'product in filteredProducts = ( products | filter:query | producer: producerFilter | category: categoryFilter | importDate: importDateFilter | limitTo:limit )', 'ng-class-even' => "'even'", 'ng-class-odd' => "'odd'" } + %tbody{ 'ng-repeat' => 'product in products', 'ng-class-even' => "'even'", 'ng-class-odd' => "'odd'" } = render 'spree/admin/products/index/products_product' = render 'spree/admin/products/index/products_variant' diff --git a/app/views/spree/admin/products/index/_save_button_row.html.haml b/app/views/spree/admin/products/index/_save_button_row.html.haml index 529f8034c9..8f241753e7 100644 --- a/app/views/spree/admin/products/index/_save_button_row.html.haml +++ b/app/views/spree/admin/products/index/_save_button_row.html.haml @@ -1,3 +1,3 @@ -%div.sixteen.columns.alpha{ 'ng-hide' => 'loading || products.length == 0', style: "margin-bottom: 10px" } +%div.sixteen.columns.alpha{ 'ng-hide' => 'RequestMonitor.loading || products.length == 0', style: "margin-bottom: 10px" } %div.four.columns.alpha %input.four.columns.alpha{ :type => 'button', :value => t(:save_changes), 'ng-click' => 'submitProducts()'}