Fixes: U4-4553 7.1 Template drop down has values but is blank

patches the it on the clientside for now, longerterm solution is to have
templates being returned as prevalues, but will leave that to shannon as
there could be other things accidentally being poked doing that.
This commit is contained in:
perploug
2014-03-31 13:17:15 +02:00
parent 1152b61fb0
commit dff3fde840

View File

@@ -25,7 +25,8 @@ angular.module("umbraco").controller("Umbraco.PropertyEditors.DropdownController
var vals = _.values($scope.model.config.items);
var keys = _.keys($scope.model.config.items);
for (var i = 0; i < vals.length; i++) {
newItems.push({ id: keys[i], sortOrder: vals[i].sortOrder, value: vals[i].value });
var label = vals[i].value ? vals[i].value : vals[i];
newItems.push({ id: keys[i], sortOrder: vals[i].sortOrder, value: label });
}
//ensure the items are sorted by the provided sort order