-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
VCST-2401: use ui-scroll-drop-down instead of ui-select (#214)
- Loading branch information
Showing
4 changed files
with
14 additions
and
18 deletions.
There are no files selected for viewing
6 changes: 3 additions & 3 deletions
6
src/VirtoCommerce.PricingModule.Web/Scripts/selectors/catalog-selector.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
} | ||
}]); |
10 changes: 4 additions & 6 deletions
10
src/VirtoCommerce.PricingModule.Web/Scripts/selectors/catalog-selector.tpl.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
<div class="form-input" ng-controller="virtoCommerce.pricingModule.catalogSelectorController"> | ||
<ui-select multiple ng-model="blade.currentEntity.catalogIds"> | ||
<ui-select-match placeholder="{{'pricing.selectors.placeholders.catalog-lists' | translate}}">{{$item.name}}</ui-select-match> | ||
<ui-select-choices repeat="x.id as x in catalogs | filter: { name: $select.search }"> | ||
<span ng-bind-html="x.name | highlight: $select.search"></span> | ||
</ui-select-choices> | ||
</ui-select> | ||
<ui-scroll-drop-down multiple ng-model="blade.currentEntity.catalogIds" | ||
data="blade.fetchCatalogs(criteria)" | ||
placeholder="'pricing.selectors.placeholders.catalog-lists'"> | ||
</ui-scroll-drop-down> | ||
</div> |
6 changes: 3 additions & 3 deletions
6
src/VirtoCommerce.PricingModule.Web/Scripts/selectors/pricelist-selector.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
}; | ||
}]); |
10 changes: 4 additions & 6 deletions
10
src/VirtoCommerce.PricingModule.Web/Scripts/selectors/pricelist-selector.tpl.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
<div class="form-input" ng-controller="virtoCommerce.pricingModule.pricelistSelectorController"> | ||
<ui-select multiple ng-model="blade.currentEntity.pricelistIds"> | ||
<ui-select-match placeholder="{{'pricing.selectors.placeholders.price-lists' | translate}}">{{$item.name}}</ui-select-match> | ||
<ui-select-choices repeat="x.id as x in pricelists | filter: { name: $select.search }"> | ||
<span ng-bind-html="x.name | highlight: $select.search"></span> | ||
</ui-select-choices> | ||
</ui-select> | ||
<ui-scroll-drop-down multiple ng-model="blade.currentEntity.pricelistIds" | ||
data="blade.fetchPricelists(criteria)" | ||
placeholder="'pricing.selectors.placeholders.price-lists'"> | ||
</ui-scroll-drop-down> | ||
</div> |