1 //<script type="text/javascript">
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
5 Pman.Dialog.BuilderAdd = {
10 show : function(data, cb)
18 this.dialog.show(this.data._el);
21 this.form.setValues(data);
22 this.form.fireEvent('actioncomplete', this.form, { type: 'setdata', data: data });
30 this.dialog = Roo.factory({
31 xtype: 'LayoutDialog',
41 xtype: 'ContentPanel',
49 rendered : function (form)
53 actioncomplete : function (_self, action)
55 if (action.type == 'setdata') {
56 // check if element can be templated or databased..
67 legend : "Do you want to create the element :",
68 style : 'width:350px',
73 fieldLabel : 'From Template',
85 displayField : 'name',
86 fieldLabel : 'From Database Table',
89 tpl : '<div class="x-grid-cell-text x-btn button"><b>{name}</b> {desc}</div>',
90 triggerAction : 'all',
98 url : baseURL + '/Builder/ERM.php'
104 totalProperty : 'total',
105 fields : [ 'name' , 'desc' ]
117 xtype: 'LayoutRegion',
125 click : function (_self, e)
127 var vals = _this.form.getValues();
131 if (vals.table.length) {
132 Pman.Dialog.BuilderAddTable.show(
133 Roo.apply({ table : vals.table } , _this.data),
137 var cls = data['|xns'] + '.' + data['xtype'];
139 var res = Pman.Builder.Wizard[cls](data);
145 // otherwise, call back with template??
148 _this.callback(_this.data);
157 click : function (_self, e)