1 //<script type="text/javascript">
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
5 Roo.namespace('Pman.Dialog');
7 Pman.Dialog.BuilderAdd = {
12 show : function(data, cb)
20 this.dialog.show(this.data._el);
23 this.form.setValues(data);
24 this.form.fireEvent('actioncomplete', this.form, { type: 'setdata', data: data });
32 this.dialog = Roo.factory({
35 xtype : 'LayoutRegion',
41 xtype : 'LayoutDialog',
54 click : function (_self, e)
56 var vals = _this.form.getValues();
60 if (vals.table.length) {
61 Pman.Dialog.BuilderAddTable.show(
62 Roo.apply({ table : vals.table } , _this.data),
66 var cls = data['|xns'] + '.' + data['xtype'];
68 var res = Pman.Builder.Wizard[cls](data);
74 // otherwise, call back with template??
77 _this.callback(_this.data);
87 click : function (_self, e)
98 xtype : 'ContentPanel',
106 actioncomplete : function (_self, action)
108 if (action.type == 'setdata') {
109 // check if element can be templated or databased..
114 rendered : function (form)
122 style : 'width:350px',
123 legend : "Do you want to create the element ?",
135 fieldLabel : 'From Template',
148 url : baseURL + '/Builder/ERM.php',
156 xtype : 'JsonReader',
157 fields : [ 'name' , 'desc' ],
159 totalProperty : 'total'
172 triggerAction : 'all',
173 fieldLabel : 'From Database Table',
174 displayField : 'name',
179 tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> {desc}</div>',