Pman.Dialog.BuilderForm.bjs
[Pman.Builder] / Pman.Dialog.BuilderForm.js
1 //<script type="text/javascript">
2
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
4
5 Pman.Dialog.BuilderForm = {
6
7     dialog : false,
8     callback:  false,
9
10     show : function(data, cb)
11     {
12         if (!this.dialog) {
13             this.create();
14         }
15
16         this.callback = cb;
17         this.data = data;
18         this.dialog.show(this.data._el);
19         if (this.form) {
20            this.form.reset();
21            this.form.setValues(data);
22            this.form.fireEvent('actioncomplete', this.form,  { type: 'setdata', data: data });
23         }
24
25     },
26
27     create : function()
28     {
29         var _this = this;
30         this.dialog = Roo.factory({
31             xtype: 'LayoutDialog',
32             xns: Roo,
33             closable : true,
34             height : 600,
35             width : 800,
36             items : [
37                 {
38                     xtype: 'ContentPanel',
39                     xns: Roo,
40                     region : 'center'
41                 }
42             ],
43             center : {
44                 xtype: 'LayoutRegion',
45                 xns: Roo
46             },
47             buttons : [
48                 {
49                     xtype: 'Button',
50                     xns: Roo,
51                     text : "Cancel"
52                 },
53                 {
54                     xtype: 'Button',
55                     xns: Roo,
56                     text : "Save"
57                 }
58             ]
59         });
60     }
61 };