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..
80 // should we try and render first???
83 html = Pman.Builder.View.frameToHTML();
92 url: baseURL + '/Roo/Builder_part.php',
95 json : Roo.encode(js, null, 4),
96 jsource : render.toSource(),
99 module_id : Pman.Tab.BuilderTop.modsel.getValue(),
102 success : function(res) {
107 Pman.Tab.BuilderTop.filesel.setFromData(data);
110 data.jsource = render.toSource();
111 data.json = Roo.encode(js, null, 4);
116 cb.call(Pman.Tab.BuilderTop,data);
117 // ??? _this.postCode(data);