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:
Shannon
2013-08-22 18:38:57 +10:00
parent 6127cfccbd
commit ad4ebe3755
21 changed files with 268 additions and 109 deletions

View File

@@ -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);
},

View File

@@ -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;

View File

@@ -1,4 +1,5 @@
<div>
Hello world
I will finish this tomorrow.
<!--<input type="text" ng-model="model.value" />-->
</div>