X-Git-Url: http://git.roojs.org/?p=app.Builder.js;a=blobdiff_plain;f=resources%2FEditors%2FEditor.Roo.LayoutDialog.js;h=02b8700b2f7d232097c0c2eb8cdd211ce753feca;hp=ec9f8cf70135d7087d2bc7e8628e01a9a028ede8;hb=ce99b7986e29533fdea36b571780f4054ab24a42;hpb=93bd1576dbb175c4d7f03d12e70e8414543afd64 diff --git a/resources/Editors/Editor.Roo.LayoutDialog.js b/resources/Editors/Editor.Roo.LayoutDialog.js index ec9f8cf70..02b8700b2 100644 --- a/resources/Editors/Editor.Roo.LayoutDialog.js +++ b/resources/Editors/Editor.Roo.LayoutDialog.js @@ -535,6 +535,14 @@ Editor.Roo.LayoutDialog = new Roo.XComponent({ var field_type = 'TextField'; + if (r.Type == 'text'){ + field_type = 'TextArea'; + } + + if(r.Type == 'date' || r.Type == 'datetime'){ + field_type = 'DateField'; + } + var regex = /(.*?)\((.*?)\)/; if(regex.test(r.Type)){ @@ -547,19 +555,7 @@ Editor.Roo.LayoutDialog = new Roo.XComponent({ field_type = 'CheckBox'; } } - - } esle { - switch (r.Type) { - case 'text' : - field_type = 'TextArea'; - break; - case 'date' : - case 'datetime': - field_type = 'DateField'; - } - - } - + } var rt = '', rc = '', rs = [];