Pman.Dialog.CoreCompanies.bjs
[Pman.Core] / Pman.Dialog.CoreCompanies.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.CoreCompanies = {
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             autoCreate : 'true',
34             closable : false,
35             collapsible : false,
36             draggable : false,
37             height : 400,
38             modal : true,
39             shadow : 'true',
40             title : "Edit Companies",
41             width : 750,
42             items : [
43                 {
44                     xtype: 'ContentPanel',
45                     xns: Roo,
46                     items : [
47                         {
48                             xtype: 'Form',
49                             xns: Roo.form,
50                             fileUpload : true,
51                             labelWidth : 0
52                         }
53                     ]
54                 }
55             ],
56             center : {
57                 xtype: 'LayoutRegion',
58                 xns: Roo,
59                 alwaysShowTabs : false,
60                 autoScroll : false,
61                 closeOnTab : true,
62                 hideTabs : true,
63                 titlebar : false
64             },
65             buttons : [
66                 {
67                     xtype: 'Button',
68                     xns: Roo,
69                     text : "Cancel"
70                 },
71                 {
72                     xtype: 'Button',
73                     xns: Roo,
74                     text : "Save"
75                 }
76             ]
77         });
78     }
79 };