diff --git a/src/public/javascripts/dialogs/attributes.js b/src/public/javascripts/dialogs/attributes.js
index 2f8b14850..85338ac9f 100644
--- a/src/public/javascripts/dialogs/attributes.js
+++ b/src/public/javascripts/dialogs/attributes.js
@@ -19,10 +19,27 @@ function AttributesModel() {
{ text: "Relation", value: "relation" }
];
+ this.availableValueTypes = [
+ { text: "Text", value: "text" },
+ { text: "Integer", value: "integer" },
+ { text: "Decimal", value: "decimal" },
+ { text: "Boolean", value: "boolean" },
+ { text: "Date", value: "date" }
+ ];
+
+ this.multiplicityTypes = [
+ { text: "Single value", value: "singlevalue" },
+ { text: "Multi value", value: "multivalue" }
+ ];
+
this.typeChanged = function(data, event) {
self.getTargetAttribute(event.target).valueHasMutated();
};
+ this.valueTypeChanged = function(data, event) {
+ self.getTargetAttribute(event.target).valueHasMutated();
+ };
+
this.updateAttributePositions = function() {
let position = 0;
@@ -43,6 +60,11 @@ function AttributesModel() {
for (const attr of attributes) {
attr.labelValue = attr.type === 'label' ? attr.value : '';
attr.relationValue = attr.type === 'relation' ? attr.value : '';
+ attr.definition = {
+ valueType: "text",
+ multiplicityType: "singlevalue",
+ showInUi: "true"
+ };
delete attr.value;
}
@@ -127,7 +149,12 @@ function AttributesModel() {
relationValue: '',
isInheritable: false,
isDeleted: 0,
- position: 0
+ position: 0,
+ definition: {
+ valueType: "text",
+ multiplicityType: "singlevalue",
+ showInUi: "true"
+ }
}));
}
}
diff --git a/src/views/index.ejs b/src/views/index.ejs
index a93cf5467..1bd43bab6 100644
--- a/src/views/index.ejs
+++ b/src/views/index.ejs
@@ -566,7 +566,6 @@
- ID
Type
Name
Value
@@ -575,41 +574,47 @@