Fixed 10144: Prevalue alias not set (#10163)
* Fixed 10144: Prevalue alias not set * Remove console.log Co-authored-by: Nathan Woulfe <nathan@nathanw.com.au>
This commit is contained in:
@@ -18,7 +18,8 @@ function dataTypeHelper() {
|
||||
description: preVals[i].description,
|
||||
label: preVals[i].label,
|
||||
view: preVals[i].view,
|
||||
value: preVals[i].value
|
||||
value: preVals[i].value,
|
||||
config: preVals[i].config
|
||||
});
|
||||
}
|
||||
|
||||
@@ -52,4 +53,4 @@ function dataTypeHelper() {
|
||||
|
||||
return dataTypeHelperService;
|
||||
}
|
||||
angular.module('umbraco.services').factory('dataTypeHelper', dataTypeHelper);
|
||||
angular.module('umbraco.services').factory('dataTypeHelper', dataTypeHelper);
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
|
||||
// get pre values
|
||||
dataTypeResource.getPreValues(newDataType.selectedEditor).then(function(preValues) {
|
||||
newDataType.preValues = preValues;
|
||||
newDataType.preValues = dataTypeHelper.createPreValueProps(preValues);
|
||||
vm.dataType = newDataType;
|
||||
vm.loadingDataType = false;
|
||||
});
|
||||
@@ -88,6 +88,7 @@
|
||||
function getDataType() {
|
||||
vm.loadingDataType = true;
|
||||
dataTypeResource.getById($scope.model.id).then(function (dataType) {
|
||||
dataType.preValues = dataTypeHelper.createPreValueProps(dataType.preValues);
|
||||
vm.dataType = dataType;
|
||||
vm.loadingDataType = false;
|
||||
});
|
||||
|
||||
@@ -37,18 +37,7 @@ function DataTypeEditController($scope, $routeParams, appState, navigationServic
|
||||
|
||||
//method used to configure the pre-values when we retrieve them from the server
|
||||
function createPreValueProps(preVals) {
|
||||
vm.preValues = [];
|
||||
for (var i = 0; i < preVals.length; i++) {
|
||||
vm.preValues.push({
|
||||
hideLabel: preVals[i].hideLabel,
|
||||
alias: preVals[i].key,
|
||||
description: preVals[i].description,
|
||||
label: preVals[i].label,
|
||||
view: preVals[i].view,
|
||||
value: preVals[i].value,
|
||||
config: preVals[i].config
|
||||
});
|
||||
}
|
||||
vm.preValues = dataTypeHelper.createPreValueProps(preVals);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user