X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=resources%2FEditors%2FEditor.Roo.LayoutDialog.js;fp=resources%2FEditors%2FEditor.Roo.LayoutDialog.js;h=ec9f8cf70135d7087d2bc7e8628e01a9a028ede8;hb=37c2912959457c4c58d9c33f963a057aeacf5b70;hp=75052769e6582c810afac434d312a6d09dc800f5;hpb=99a1c4e176e58df452779eefb6957f8079bb95ab;p=app.Builder.js diff --git a/resources/Editors/Editor.Roo.LayoutDialog.js b/resources/Editors/Editor.Roo.LayoutDialog.js index 75052769e..ec9f8cf70 100644 --- a/resources/Editors/Editor.Roo.LayoutDialog.js +++ b/resources/Editors/Editor.Roo.LayoutDialog.js @@ -537,6 +537,29 @@ Editor.Roo.LayoutDialog = new Roo.XComponent({ var regex = /(.*?)\((.*?)\)/; + if(regex.test(r.Type)){ + var type_match = regex.exec(r.Type); + + if(type_match[1] == 'int'){ + field_type = 'NumberField'; + + if(type_match[2] * 1 < 11){ + field_type = 'CheckBox'; + } + } + + } esle { + switch (r.Type) { + case 'text' : + field_type = 'TextArea'; + break; + case 'date' : + case 'datetime': + field_type = 'DateField'; + } + + } + var rt = '', rc = '', rs = [];