diff --git a/editor/images/bool.png b/editor/images/bool.png deleted file mode 100644 index cd626f3b1..000000000 Binary files a/editor/images/bool.png and /dev/null differ diff --git a/editor/images/09.png b/editor/images/typedInput/09.png similarity index 100% rename from editor/images/09.png rename to editor/images/typedInput/09.png diff --git a/editor/images/az.png b/editor/images/typedInput/az.png similarity index 100% rename from editor/images/az.png rename to editor/images/typedInput/az.png diff --git a/editor/images/typedInput/bool.png b/editor/images/typedInput/bool.png new file mode 100644 index 000000000..9530983de Binary files /dev/null and b/editor/images/typedInput/bool.png differ diff --git a/editor/images/json.png b/editor/images/typedInput/json.png similarity index 100% rename from editor/images/json.png rename to editor/images/typedInput/json.png diff --git a/editor/images/re.png b/editor/images/typedInput/re.png similarity index 100% rename from editor/images/re.png rename to editor/images/typedInput/re.png diff --git a/editor/js/ui/typedInput.js b/editor/js/ui/typedInput.js index fdb3c8661..294ce2517 100644 --- a/editor/js/ui/typedInput.js +++ b/editor/js/ui/typedInput.js @@ -18,11 +18,11 @@ msg: {value:"msg",label:"msg.",validate:/^[a-zA-Z_][a-zA-Z0-9_]*(\.[a-zA-Z_][a-zA-Z0-9_]+)*/i}, flow: {value:"flow",label:"flow.",validate:/^[a-zA-Z_][a-zA-Z0-9_]*(\.[a-zA-Z_][a-zA-Z0-9_]+)*/i}, global: {value:"global",label:"global.",validate:/^[a-zA-Z_][a-zA-Z0-9_]*(\.[a-zA-Z_][a-zA-Z0-9_]+)*/i}, - str: {value:"str",label:"string",icon:"red/images/az.png"}, - num: {value:"num",label:"number",icon:"red/images/09.png",validate:/^[+-]?[0-9]*\.?[0-9]*([eE][-+]?[0-9]+)?$/}, - bool: {value:"bool",label:"boolean",icon:"red/images/bool.png",options:["true","false"]}, - json: {value:"json",label:"JSON",icon:"red/images/json.png", validate: function(v) { try{JSON.parse(v);return true;}catch(e){return false;}}}, - re: {value:"re",label:"regular expression",icon:"red/images/re.png"} + str: {value:"str",label:"string",icon:"red/images/typedInput/az.png"}, + num: {value:"num",label:"number",icon:"red/images/typedInput/09.png",validate:/^[+-]?[0-9]*\.?[0-9]*([eE][-+]?[0-9]+)?$/}, + bool: {value:"bool",label:"boolean",icon:"red/images/typedInput/bool.png",options:["true","false"]}, + json: {value:"json",label:"JSON",icon:"red/images/typedInput/json.png", validate: function(v) { try{JSON.parse(v);return true;}catch(e){return false;}}}, + re: {value:"re",label:"regular expression",icon:"red/images/typedInput/re.png"} }; var nlsd = false;