From f71013c5145c9b633aa409726cc9238ffd8d6009 Mon Sep 17 00:00:00 2001 From: Gaetan Riou Date: Fri, 21 Aug 2020 11:46:36 +1000 Subject: [PATCH] rename query filter where it was missed, fix bulk_update_product spec --- .../javascripts/admin/bulk_product_update.js.coffee | 2 +- .../spree/admin/products/index/_indicators.html.haml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/assets/javascripts/admin/bulk_product_update.js.coffee b/app/assets/javascripts/admin/bulk_product_update.js.coffee index ea455f5bc5..be29b8d19a 100644 --- a/app/assets/javascripts/admin/bulk_product_update.js.coffee +++ b/app/assets/javascripts/admin/bulk_product_update.js.coffee @@ -35,7 +35,7 @@ angular.module("ofn.admin").controller "AdminProductEditCtrl", ($scope, $timeout $scope.q = ProductFiltersService.loadFromUrl($location.search()) $scope.fetchProducts() - $scope.$watchCollection '[query, producerFilter, categoryFilter, importDateFilter, per_page]', -> + $scope.$watchCollection '[q.query, q.producerFilter, q.categoryFilter, q.importDateFilter, per_page]', -> $scope.page = 1 # Reset page when changing filters for new search $scope.changePage = (newPage) -> diff --git a/app/views/spree/admin/products/index/_indicators.html.haml b/app/views/spree/admin/products/index/_indicators.html.haml index 930f4b4337..9c002b1f1f 100644 --- a/app/views/spree/admin/products/index/_indicators.html.haml +++ b/app/views/spree/admin/products/index/_indicators.html.haml @@ -3,12 +3,12 @@ %img.spinner{ src: image_path("spinning-circles.svg") } %h1= t('.title') -%div.sixteen.columns.alpha{ 'ng-show' => '!RequestMonitor.loading && products.length == 0 && query.length==0' } +%div.sixteen.columns.alpha{ 'ng-show' => '!RequestMonitor.loading && products.length == 0 && q.query.length == 0' } %h1#no_results= t('.no_products') -%div.sixteen.columns.alpha{ 'ng-show' => '!RequestMonitor.loading && products.length == 0 && query.length!=0' } +%div.sixteen.columns.alpha{ 'ng-show' => '!RequestMonitor.loading && products.length == 0 && q.query.length != 0' } %h1#no_results = t('.no_results') ' - {{query}} - ' \ No newline at end of file + {{q.query}} + '