Ver código fonte

创建实体页面的placeholder修改

zlSun 1 ano atrás
pai
commit
495d4f4ed5
1 arquivos alterados com 2 adições e 2 exclusões
  1. 2 2
      atlas/js/views/entity/CreateEntityLayoutView.js

+ 2 - 2
atlas/js/views/entity/CreateEntityLayoutView.js

@@ -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 = "";