From 232e4bb7fc7d96fa2715d3939ef9f867f8fb3f2b Mon Sep 17 00:00:00 2001 From: Basil Kotov Date: Thu, 5 Dec 2024 17:06:27 +0000 Subject: [PATCH] VCST-2401: use ui-scroll-drop-down instead of ui-select (#214) --- .../Scripts/selectors/catalog-selector.js | 6 +++--- .../Scripts/selectors/catalog-selector.tpl.html | 10 ++++------ .../Scripts/selectors/pricelist-selector.js | 6 +++--- .../Scripts/selectors/pricelist-selector.tpl.html | 10 ++++------ 4 files changed, 14 insertions(+), 18 deletions(-) diff --git a/src/VirtoCommerce.PricingModule.Web/Scripts/selectors/catalog-selector.js b/src/VirtoCommerce.PricingModule.Web/Scripts/selectors/catalog-selector.js index ffc618fd..435a6c55 100644 --- a/src/VirtoCommerce.PricingModule.Web/Scripts/selectors/catalog-selector.js +++ b/src/VirtoCommerce.PricingModule.Web/Scripts/selectors/catalog-selector.js @@ -1,6 +1,6 @@ angular.module('virtoCommerce.pricingModule') .controller('virtoCommerce.pricingModule.catalogSelectorController', ['$scope', 'virtoCommerce.catalogModule.catalogs', function ($scope, catalogs) { - catalogs.search({ take: 1000 }, function (result) { - $scope.catalogs = angular.copy(result.results); - }); + $scope.blade.fetchCatalogs = function (criteria) { + return catalogs.search(criteria); + } }]); diff --git a/src/VirtoCommerce.PricingModule.Web/Scripts/selectors/catalog-selector.tpl.html b/src/VirtoCommerce.PricingModule.Web/Scripts/selectors/catalog-selector.tpl.html index 8cc8e0d3..21a11533 100644 --- a/src/VirtoCommerce.PricingModule.Web/Scripts/selectors/catalog-selector.tpl.html +++ b/src/VirtoCommerce.PricingModule.Web/Scripts/selectors/catalog-selector.tpl.html @@ -1,8 +1,6 @@
- - {{$item.name}} - - - - + +
diff --git a/src/VirtoCommerce.PricingModule.Web/Scripts/selectors/pricelist-selector.js b/src/VirtoCommerce.PricingModule.Web/Scripts/selectors/pricelist-selector.js index fcf38876..07826e17 100644 --- a/src/VirtoCommerce.PricingModule.Web/Scripts/selectors/pricelist-selector.js +++ b/src/VirtoCommerce.PricingModule.Web/Scripts/selectors/pricelist-selector.js @@ -1,6 +1,6 @@ angular.module('virtoCommerce.pricingModule') .controller('virtoCommerce.pricingModule.pricelistSelectorController', ['$scope', 'virtoCommerce.pricingModule.pricelists', function ($scope, pricelists) { - pricelists.search({ take: 1000 }, function (result) { - $scope.pricelists = result.results; - }); + $scope.blade.fetchPricelists = function (criteria) { + return pricelists.search(criteria); + }; }]); diff --git a/src/VirtoCommerce.PricingModule.Web/Scripts/selectors/pricelist-selector.tpl.html b/src/VirtoCommerce.PricingModule.Web/Scripts/selectors/pricelist-selector.tpl.html index 1efe4b37..c9a2d605 100644 --- a/src/VirtoCommerce.PricingModule.Web/Scripts/selectors/pricelist-selector.tpl.html +++ b/src/VirtoCommerce.PricingModule.Web/Scripts/selectors/pricelist-selector.tpl.html @@ -1,8 +1,6 @@
- - {{$item.name}} - - - - + +