4 * Core utils for builder..
19 'time' : 'string', //bogus
26 'timestamp' : 'number',
35 'longtext' : 'string',
36 'tinytext' : 'string',
37 'mediumtext' : 'string',
44 * @param {Object} cfg the configuration
45 * @param {Object} old the previous def...
47 * - cols_ex : [ name, name]
57 save : function(cb, sid)
59 // first see if first element has a name.. - we can not save otherwise..
60 var t = Pman.Tab.BuilderTree.tree;
61 if (!t.root.elConfig.name.length) {
62 Roo.MessageBox.alert("Error", "No name set for form");
66 sid = (typeof(sid) == 'undefined') ?
67 (Pman.Tab.BuilderTop.filesel.lastData ? Pman.Tab.BuilderTop.filesel.lastData.id : 0) : sid;
70 var js = Pman.Builder.Tree.toJS();
71 var render = new Pman.Builder.JsRender(js);
76 // check the select box to see if that has been set... - save it with that id..
81 url: baseURL + '/Roo/Builder_part.php',
84 json : Roo.encode(js, null, 4),
85 jsource : render.toSource(),
87 module_id : Pman.Tab.BuilderTop.modsel.getValue(),
90 success : function(data) {
94 Pman.Tab.BuilderTop.filesel.setFromData(data);
97 data.jsource = render.toSource();
98 data.json = Roo.encode(js, null, 4),
101 cb.call(Pman.Tab.BuilderTop,data);
102 // ??? _this.postCode(data);