Fixes some issues with pre-values with the previous changes made to include the IDs of the pre-values, needed to ensure they are formatted incoming/outgoing properly so the id isn't included.

This commit is contained in:
Shannon
2013-08-28 14:45:33 +10:00
parent cb368b4335
commit 79ab84a793
14 changed files with 114 additions and 41 deletions

View File

@@ -139,6 +139,7 @@ function umbDataFormatter() {
/** formats the display model used to display the data type to the model used to save the data type */
formatDataTypePostData: function(displayModel, preValues, action) {
var saveModel = {
parentId: -1,
id: displayModel.id,
name: displayModel.name,
selectedEditor: displayModel.selectedEditor,
@@ -149,7 +150,7 @@ function umbDataFormatter() {
for (var i = 0; i < preValues.length; i++) {
saveModel.preValues.push({
key: preValues[i].alias,
value: preValues[i].value
value: preValues[i].value.value
});
}
return saveModel;

View File

@@ -1 +1 @@
<input name="boolean" type="checkbox" ng-model="model.value" ng-true-value="1" ng-false-value="0" />
<input name="boolean" type="checkbox" ng-model="model.value.value" ng-true-value="1" ng-false-value="0" />

View File

@@ -1 +1 @@
<input name="hidden" type="hidden" ng-model="model.value" name="{{model.alias}" />
<input name="hidden" type="hidden" ng-model="model.value.value" name="{{model.alias}" />

View File

@@ -1,6 +1,6 @@
<div>
<input name="requiredfield" type="text" class="umb-textstring span7 textstring"
ng-model="model.value"
ng-model="model.value.value"
required
val-server="value" />

View File

@@ -1 +1 @@
<textarea name="textarea" ng-model="model.value" rows="4" class="span8"></textarea>
<textarea name="textarea" ng-model="model.value.value" rows="4" class="span8"></textarea>