Pman.js
[Pman.Core] / Pman.Dialog.CoreEmailPreview.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.CoreEmailPreview = {
8
9  _strings : {
10   '4cd8413207629a963225f4314b53adcd' :"Plain",
11   '4c4ad5fca2e7a3f74dbb1ced00381aa4' :"HTML",
12   '006c82ffdd63692a84a259c4f8732842' :"Email Preview",
13   'e0aa021e21dddbd6d8cecec71e9cf564' :"OK"
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 : 'LayoutDialog',
41     autoScroll : true,
42     closable : true,
43     height : 800,
44     shadow : true,
45     title : _this._strings['006c82ffdd63692a84a259c4f8732842'] /* Email Preview */,
46     width : 1200,
47     listeners : {
48      show : function (_self)
49       {
50           
51           _self.layout.getRegion('center').showPanel(0);
52           _this.panel.load({ 
53               url: baseURL + '/Core/MessagePreview', 
54               params  : {
55                   _id : _this.data.id,
56                   _table : _this.data.module
57               },
58               method : 'GET'
59           });
60           _this.hpanel.load({ 
61               url: baseURL + '/Core/MessagePreview', 
62               params  : {
63                   _as_html : 1,
64                   _id : _this.data.id,
65                   _table : _this.data.module
66               },
67               method : 'GET'
68           });
69               
70       }
71     },
72     xns : Roo,
73     '|xns' : 'Roo',
74     center : {
75      xtype : 'LayoutRegion',
76      autoScroll : true,
77      tabPosition : 'top',
78      xns : Roo,
79      '|xns' : 'Roo'
80     },
81     buttons : [
82      {
83       xtype : 'Button',
84       text : _this._strings['e0aa021e21dddbd6d8cecec71e9cf564'] /* OK */,
85       listeners : {
86        click : function (_self, e)
87         {
88             _this.dialog.hide();
89         }
90       },
91       xns : Roo,
92       '|xns' : 'Roo'
93      }
94     ],
95     items  : [
96      {
97       xtype : 'ContentPanel',
98       fitContainer : true,
99       fitToFrame : true,
100       region : 'center',
101       title : _this._strings['4cd8413207629a963225f4314b53adcd'] /* Plain */,
102       listeners : {
103        render : function (_self)
104         {
105             _this.panel = _self;
106         }
107       },
108       xns : Roo,
109       '|xns' : 'Roo'
110      },
111      {
112       xtype : 'ContentPanel',
113       fitContainer : true,
114       fitToFrame : true,
115       region : 'center',
116       title : _this._strings['4c4ad5fca2e7a3f74dbb1ced00381aa4'] /* HTML */,
117       listeners : {
118        render : function (_self)
119         {
120             _this.hpanel = _self;
121         }
122       },
123       xns : Roo,
124       '|xns' : 'Roo'
125      }
126     ]
127    });
128  }
129 };