|
@@ -255,12 +255,12 @@ define([ "require", "backbone", "hbs!tmpl/entity/CreateEntityLayoutView_tmpl", "
|
|
|
});
|
|
|
},
|
|
|
getContainer: function(object) {
|
|
|
- var value = object.value, entityLabel = this.capitalize(_.escape(value.name));
|
|
|
+ var value = object.value, entityLabel = Utils.toChinese(_.escape(value.name)) ;
|
|
|
return '<div class=" row ' + value.isOptional + '"><span class="col-sm-3"><label><span class="' + (value.isOptional ? "true" : "false required") + '">' + entityLabel + '</span><span class="center-block ellipsis-with-margin text-gray" title="类型: ' + value.typeName + '">(' + _.escape(value.typeName) + ')</span></label></span><span class="col-sm-9">' + this.getElement(object) + "</input></span></div>";
|
|
|
},
|
|
|
getFieldElementContainer: function(object) {
|
|
|
var htmlField = object.htmlField, relationshipType = (!!object.attributeType && object.attributeType,
|
|
|
- !!object.relationshipType && object.relationshipType), alloptional = object.alloptional, typeOfDefination = relationshipType ? "Relationships" : "Attributes";
|
|
|
+ !!object.relationshipType && object.relationshipType), alloptional = object.alloptional, typeOfDefination = relationshipType ? "关联" : "属性";
|
|
|
return '<div class="attribute-dash-box ' + (alloptional ? "alloptional" : "") + ' "><span class="attribute-type-label">' + typeOfDefination + "</span>" + htmlField + "</div>";
|
|
|
},
|
|
|
getSelect: function(object) {
|
|
@@ -278,11 +278,11 @@ define([ "require", "backbone", "hbs!tmpl/entity/CreateEntityLayoutView_tmpl", "
|
|
|
_.isObject(parseValue) && !_.isArray(parseValue) && parseValue.attributes && (setValue = JSON.stringify(parseValue.attributes));
|
|
|
}
|
|
|
} catch (err) {}
|
|
|
- return '<textarea class="form-control entityInputBox ' + (value.isOptional === !0 ? "false" : "true") + '" data-type="' + value.typeName + '" data-key="' + name + '" data-attribute="' + isAttribute + '" data-relation="' + isRelation + '" placeholder="' + name + '" data-id="entityInput">' + setValue + "</textarea>";
|
|
|
+ return '<textarea class="form-control entityInputBox ' + (value.isOptional === !0 ? "false" : "true") + '" data-type="' + value.typeName + '" data-key="' + name + '" data-attribute="' + isAttribute + '" data-relation="' + isRelation + '" placeholder="' + Utils.toChinese(name) + '" data-id="entityInput">' + setValue + "</textarea>";
|
|
|
},
|
|
|
getInput: function(object) {
|
|
|
var value = object.value, name = _.escape(value.name), entityValue = _.escape(object.entityValue), isAttribute = object.isAttribute, isRelation = object.isRelation;
|
|
|
- return '<input class="form-control entityInputBox ' + (value.isOptional === !0 ? "false" : "true") + '" data-type="' + value.typeName + '" value="' + entityValue + '" data-key="' + name + '" data-attribute="' + isAttribute + '" data-relation="' + isRelation + '" placeholder="' + name + '" name="' + name + '" data-id="entityInput">';
|
|
|
+ return '<input class="form-control entityInputBox ' + (value.isOptional === !0 ? "false" : "true") + '" data-type="' + value.typeName + '" value="' + entityValue + '" data-key="' + name + '" data-attribute="' + isAttribute + '" data-relation="' + isRelation + '" placeholder="' + Utils.toChinese(name) + '" name="' + name + '" data-id="entityInput">';
|
|
|
},
|
|
|
getElement: function(object) {
|
|
|
var value = object.value, isAttribute = object.isAttribute, isRelation = object.isRelation, typeName = value.typeName, entityValue = "";
|