U4-9704 Sorting UDI media picker items, makes it store Int's

This commit is contained in:
Claus
2017-05-03 10:21:00 +02:00
parent c1853e8c51
commit 1030fd5294

View File

@@ -112,10 +112,9 @@ angular.module('umbraco').controller("Umbraco.PropertyEditors.MediaPickerControl
// content picker. THen we don't have to worry about setting ids, render models, models, we just set one and let the
// watch do all the rest.
$timeout(function(){
angular.forEach($scope.images, function(value, key){
r.push(value.id);
angular.forEach($scope.images, function(value, key) {
r.push($scope.model.config.idType === "udi" ? value.udi : value.id);
});
$scope.ids = r;
$scope.sync();
}, 500, false);