add required in editorFactory and containerFactory
add required in editorFactory and containerFactory
This commit is contained in:
parent
63b5cdf688
commit
edb85afd67
|
@ -22,9 +22,9 @@ ContainerFactory.prototype.createEditorContainer = function(header, id,
|
|||
containerInfo[i].name == "";
|
||||
}
|
||||
if (containerInfo[i].children == null) {
|
||||
|
||||
console.log(containerInfo[i]);
|
||||
this.appendEdtiors(container, containerInfo[i].label,
|
||||
containerInfo[i].nameCN, containerInfo[i].name,
|
||||
containerInfo[i].nameCN, containerInfo[i].required, containerInfo[i].name,
|
||||
containerInfo[i].paramTypeModel,containerInfo[i].value == null ?"":containerInfo[i].value);
|
||||
} else {
|
||||
$(container).append(
|
||||
|
@ -39,29 +39,30 @@ ContainerFactory.prototype.createEditorContainer = function(header, id,
|
|||
|
||||
};
|
||||
|
||||
ContainerFactory.prototype.appendEdtiors = function(container, label, name, id,
|
||||
ContainerFactory.prototype.appendEdtiors = function(container, label, name, required, id,
|
||||
editorInfo, value) {
|
||||
|
||||
var editorFactory = new EditorFactory();
|
||||
|
||||
if (editorInfo.type.toLowerCase() == "field") {
|
||||
console.log("required:"+required);
|
||||
$(container).append(
|
||||
editorFactory.createField(label, name, editorInfo.size, id,value));
|
||||
editorFactory.createField(label, name, required, editorInfo.size, id,value));
|
||||
|
||||
} else if (editorInfo.type.toLowerCase() == "nfield") {
|
||||
$(container).append(
|
||||
editorFactory
|
||||
.createMultiField(label, name, editorInfo.size, id,value));
|
||||
.createMultiField(label, name, required, editorInfo.size, id,value));
|
||||
} else if (editorInfo.type.toLowerCase() == "table") {
|
||||
$(container).append(
|
||||
editorFactory.createTable(label, name, editorInfo.cols, id,value));
|
||||
editorFactory.createTable(label, name, required, editorInfo.cols, id,value));
|
||||
|
||||
} else if (editorInfo.type.toLowerCase() == "file") {
|
||||
$(container).append(
|
||||
editorFactory.createFile(lable, name, editorInfo.size, id,value));
|
||||
editorFactory.createFile(lable, name, required, editorInfo.size, id,value));
|
||||
} else if (editorInfo.type.toLowerCase() == "date") {
|
||||
$(container).append(
|
||||
editorFactory.createDate(label, name, editorInfo.size, id,value));
|
||||
editorFactory.createDate(label, name, required, editorInfo.size, id,value));
|
||||
} else if (editorInfo.type.toLowerCase() == "select") {
|
||||
$(container).append(
|
||||
editorFactory.createSelect(label, name, editorInfo.size,
|
||||
|
|
Loading…
Reference in New Issue