Updated a lot more of the pre-values stuff and the data type editor, updated lots more of the dropdown property editor and now have serialized/deserialized values working for pre-values. Now just need to finish off the pre-value field for the drop down list.
This commit is contained in:
@@ -7,14 +7,18 @@ function dataTypeResource($q, $http, umbDataFormatter, umbRequestHelper) {
|
||||
|
||||
return {
|
||||
|
||||
getPreValues: function (editorId) {
|
||||
getPreValues: function (editorId, dataTypeId) {
|
||||
|
||||
if (!dataTypeId) {
|
||||
dataTypeId = -1;
|
||||
}
|
||||
|
||||
return umbRequestHelper.resourcePromise(
|
||||
$http.get(
|
||||
umbRequestHelper.getApiUrl(
|
||||
"dataTypeApiBaseUrl",
|
||||
"GetPreValues",
|
||||
[{ editorId: editorId }])),
|
||||
[{ editorId: editorId }, { dataTypeId: dataTypeId }])),
|
||||
'Failed to retreive pre values for editor id ' + editorId);
|
||||
},
|
||||
|
||||
|
||||
@@ -69,7 +69,8 @@ function DataTypeEditController($scope, $routeParams, $location, dataTypeResourc
|
||||
//when the value changes, we need to dynamically load in the new editor
|
||||
if (newVal !== null && newVal !== undefined && newVal != oldVal) {
|
||||
//we are editing so get the content item from the server
|
||||
dataTypeResource.getPreValues(newVal)
|
||||
var currDataTypeId = $routeParams.create ? undefined : $routeParams.id;
|
||||
dataTypeResource.getPreValues(newVal, currDataTypeId)
|
||||
.then(function (data) {
|
||||
$scope.preValuesLoaded = true;
|
||||
$scope.content.preValues = data;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<div>
|
||||
Hello world
|
||||
I will finish this tomorrow.
|
||||
<!--<input type="text" ng-model="model.value" />-->
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user