-Fixed some accidentally removed logic.

This commit is contained in:
tdakanalis 2016-04-11 09:56:16 +03:00
parent 1dadc5f465
commit a785de2930
1 changed files with 4 additions and 1 deletions

View File

@ -1262,6 +1262,7 @@ Node.prototype._updateDomValue = function () {
} }
//If the node has an enum property and it is editable lets create the select element //If the node has an enum property and it is editable lets create the select element
else if (this.enum && this.editable.value) { else if (this.enum && this.editable.value) {
debugger;
if (!this.dom.select) { if (!this.dom.select) {
this.dom.select = document.createElement('select'); this.dom.select = document.createElement('select');
this.id = this.field + "_" + new Date().getUTCMilliseconds(); this.id = this.field + "_" + new Date().getUTCMilliseconds();
@ -1940,8 +1941,10 @@ Node.prototype.updateDom = function (options) {
//Search for any enumeration type in the schema of the current node. //Search for any enumeration type in the schema of the current node.
//Enum types can be also be part of a composite type. //Enum types can be also be part of a composite type.
if(this.schema){ if(this.schema){
debugger;
if(this.schema.hasOwnProperty('enum')){ if(this.schema.hasOwnProperty('enum')){
this.enum = this.schema.enum; this.enum = new Object();
this.enum.enum = this.schema.enum;
} else if(this.schema.hasOwnProperty('oneOf')){ } else if(this.schema.hasOwnProperty('oneOf')){
this.enum = this._getJsonObject(this.schema.oneOf, 'enum')[0]; this.enum = this._getJsonObject(this.schema.oneOf, 'enum')[0];
} else if(this.schema.hasOwnProperty('anyOf')){ } else if(this.schema.hasOwnProperty('anyOf')){