Pman.Dialog.CoreAutoSavePreview.bjs
[Pman.Core] / Pman.Dialog.CoreAutoSavePreview.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.CoreAutoSavePreview = {
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             background : false,
34             closable : false,
35             collapsible : false,
36             height : 500,
37             modal : true,
38             resizable : false,
39             title : "Saved Version",
40             width : 800,
41             center : {
42                 xtype: 'LayoutRegion',
43                 xns: Roo,
44                 titlebar : false
45             },
46             west : {
47                 xtype: 'LayoutRegion',
48                 xns: Roo,
49                 split : true,
50                 width : 300
51             },
52             buttons : [
53                 {
54                     xtype: 'Button',
55                     xns: Roo,
56                     listeners : {
57                         click : function() {
58                             _this.dialog.hide();
59                         }
60                     },
61                     text : "Cancel"
62                 },
63                 {
64                     xtype: 'Button',
65                     xns: Roo,
66                     listeners : {
67                         click : function() {
68                             _this.dialog.hide();
69                         }
70                     },
71                     text : "OK"
72                 }
73             ]
74         });
75     }
76 };