fix #8131 - chinese translations
[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.apply(this.dialog,  Array.prototype.slice.call(arguments).slice(2));
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                   template_name : _this.data.template_name || '',            
57                   _table : _this.data.module,
58                   ontable : _this.data.ontable || '',
59                   onid : _this.data.onid || '',
60                   evtype : _this.data.evtype  || ''
61               },
62               method : 'GET'
63           });
64           _this.hpanel.load({ 
65               url: baseURL + '/Core/MessagePreview', 
66               params  : {
67                   _as_html : 1,
68                   _id : _this.data.id || '',
69                   template_name : _this.data.template_name || '',
70                   _table : _this.data.module,
71                   ontable : _this.data.ontable || '',
72                   onid : _this.data.onid  || '',
73                   evtype : _this.data.evtype || ''
74               },
75               method : 'GET'
76           });
77               
78       }
79     },
80     xns : Roo,
81     '|xns' : 'Roo',
82     center : {
83      xtype : 'LayoutRegion',
84      autoScroll : true,
85      tabPosition : 'top',
86      xns : Roo,
87      '|xns' : 'Roo'
88     },
89     buttons : [
90      {
91       xtype : 'Button',
92       text : _this._strings['e0aa021e21dddbd6d8cecec71e9cf564'] /* OK */,
93       listeners : {
94        click : function (_self, e)
95         {
96             _this.dialog.hide();
97         }
98       },
99       xns : Roo,
100       '|xns' : 'Roo'
101      }
102     ],
103     items  : [
104      {
105       xtype : 'ContentPanel',
106       fitContainer : true,
107       fitToFrame : true,
108       region : 'center',
109       title : _this._strings['4c4ad5fca2e7a3f74dbb1ced00381aa4'] /* HTML */,
110       listeners : {
111        render : function (_self)
112         {
113             _this.hpanel = _self;
114         }
115       },
116       xns : Roo,
117       '|xns' : 'Roo'
118      },
119      {
120       xtype : 'ContentPanel',
121       fitContainer : true,
122       fitToFrame : true,
123       region : 'center',
124       title : _this._strings['4cd8413207629a963225f4314b53adcd'] /* Plain */,
125       listeners : {
126        render : function (_self)
127         {
128             _this.panel = _self;
129         }
130       },
131       xns : Roo,
132       '|xns' : 'Roo'
133      }
134     ]
135    });
136  }
137 };