Skip to content

Commit d739238

Browse files
committed
Merge pull request #7328 in SW/shopware from ntr/5.5/add-sorting-payment-shipping to 5.5
* commit 'd7e9f3936d151b3d867afa76e29a15fd410d5c32': NTR - Add sorting for countries in payment and shipping module
2 parents e9fabdd + d7e9f39 commit d739238

File tree

2 files changed

+32
-3
lines changed

2 files changed

+32
-3
lines changed

themes/Backend/ExtJs/backend/payment/store/countries.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,17 @@ Ext.define('Shopware.apps.Payment.store.Countries', {
3838
extend : 'Ext.data.Store',
3939
autoLoad : false,
4040
pageSize : 30,
41-
model : 'Shopware.apps.Payment.model.Country'
41+
model : 'Shopware.apps.Payment.model.Country',
42+
43+
sorters: [
44+
{
45+
property: 'active',
46+
direction: 'DESC'
47+
},
48+
{
49+
property: 'name',
50+
direction: 'ASC'
51+
}
52+
]
4253
});
4354
//{/block}

themes/Backend/ExtJs/backend/shipping/view/edit/country.js

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,26 @@ Ext.define('Shopware.apps.Shipping.view.edit.Country', {
109109
});
110110
me.availableCountries.filters.clear();
111111
me.availableCountries.filter('usedIds', ids);
112-
me.availableCountries.sort('position', 'ASC');
113-
me.usedCountriesStore.sort('position', 'ASC');
112+
me.availableCountries.sort([
113+
{
114+
property: 'active',
115+
direction: 'DESC'
116+
},
117+
{
118+
property: 'name',
119+
direction: 'ASC'
120+
},
121+
]);
122+
me.usedCountriesStore.sort([
123+
{
124+
property: 'active',
125+
direction: 'DESC'
126+
},
127+
{
128+
property: 'name',
129+
direction: 'ASC'
130+
},
131+
]);
114132

115133
// Create the view
116134
me.items = me.getItems();

0 commit comments

Comments
 (0)