Pman.Dialog.BAdminEmailPreview.bjs
[Pman.BAdmin] / Pman.Dialog.BAdminEmailPreview.js
1 //<script type="text/javascript">
2
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
4
5 Roo.namespace('Pman.Dialog');
6
7 Pman.Dialog.BAdminEmailPreview= function() {}
8 Roo.apply(Pman.Dialog.BAdminEmailPreview.prototype, {
9
10  _strings : {
11   '10e0d90d01ee3b134ee40b7ad31566a4' :"Message Preview",
12   '4cd8413207629a963225f4314b53adcd' :"Plain",
13   '4c4ad5fca2e7a3f74dbb1ced00381aa4' :"HTML"
14  },
15
16  dialog : false,
17  callback:  false,
18
19  show : function(data, cb)
20  {
21   if (!this.dialog) {
22    this.create();
23   }
24
25   this.callback = cb;
26   this.data = data;
27   this.dialog.show(this.data._el);
28   if (this.form) {
29    this.form.reset();
30    this.form.setValues(data);
31    this.form.fireEvent('actioncomplete', this.form,  { type: 'setdata', data: data });
32   }
33
34  },
35
36  create : function()
37  {
38   var _this = this;
39   this.dialog = Roo.factory({
40     xtype : 'Modal',
41     title : _this._strings['10e0d90d01ee3b134ee40b7ad31566a4'] /* Message Preview */,
42     listeners : {
43      show : function (_self)
44       {
45           _this.panel.load({
46               url: baseURL + '/Core/MessagePreview', 
47               params  : {
48                   _id : _this.data.id,
49                   _table : _this.data.module
50               },
51               method : 'GET'
52           });
53           _this.hpanel.load({
54               url: baseURL + '/Core/MessagePreview', 
55               params  : {
56                   _as_html : 1,
57                   _id : _this.data.id,
58                   _table : _this.data.module
59               },
60               method : 'GET'
61           });
62       }
63     },
64     xns : Roo.bootstrap,
65     '|xns' : 'Roo.bootstrap',
66     items  : [
67      {
68       xtype : 'Border',
69       xns : Roo.bootstrap.layout,
70       '|xns' : 'Roo.bootstrap.layout',
71       items  : [
72        {
73         xtype : 'Content',
74         title : _this._strings['4cd8413207629a963225f4314b53adcd'] /* Plain */,
75         listeners : {
76          render : function (_self)
77           {
78               _this.panel = _self;
79           }
80         },
81         xns : Roo.bootstrap.panel,
82         '|xns' : 'Roo.bootstrap.panel'
83        },
84        {
85         xtype : 'Content',
86         title : _this._strings['4c4ad5fca2e7a3f74dbb1ced00381aa4'] /* HTML */,
87         listeners : {
88          render : function (_self)
89           {
90               _this.hpanel = _self;
91           }
92         },
93         xns : Roo.bootstrap.panel,
94         '|xns' : 'Roo.bootstrap.panel'
95        }
96       ]
97      }
98     ]
99    }  );
100  }
101 });
102 Roo.apply(Pman.Dialog.BAdminEmailPreview, Pman.Dialog.BAdminEmailPreview.prototype);