fixes: U4-9419 The new content picker adds picked items in a random order
This commit is contained in:
@@ -259,18 +259,24 @@ function contentPickerController($scope, entityResource, editorState, iconHelper
|
||||
});
|
||||
|
||||
function setEntityUrl(entity) {
|
||||
|
||||
// get url for content and media items
|
||||
if(entityType !== "Member") {
|
||||
entityResource.getUrl(entity.id, entityType).then(function(data){
|
||||
// update url
|
||||
entity.url = data;
|
||||
|
||||
// push item to render model
|
||||
addSelectedItem(entity);
|
||||
// update url
|
||||
angular.forEach($scope.renderModel, function(item){
|
||||
if(item.id === entity.id) {
|
||||
item.url = data;
|
||||
}
|
||||
});
|
||||
});
|
||||
} else {
|
||||
addSelectedItem(entity);
|
||||
}
|
||||
|
||||
// add the selected item to the renderModel
|
||||
// if it needs to show a url the item will get
|
||||
// updated when the url comes back from server
|
||||
addSelectedItem(entity);
|
||||
|
||||
}
|
||||
|
||||
function addSelectedItem(item) {
|
||||
|
||||
Reference in New Issue
Block a user