1 //<script type="text/javascript">
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
5 Roo.namespace('Pman.Tab');
7 Pman.Tab.AdminEmailTemplates = new Roo.XComponent({
10 'ec211f7c20af43e742bf2570c3cb84f9' :"Add",
11 'c7d299bf3f9e37c77ab646f7e5366696' :"core_email",
12 '00d6e06d2f3c092b4f5e1e708a360b0f' :"Displaying Message{0} - {1} of {2}",
13 '9076cbba1d9ef79280b4f39e2aa0d115' :"Nothing found",
14 'b78a3223503896721cca1303f776159b' :"Title",
15 '68b00d723d37122f64da8d9939f836f0' :"BCC Group",
16 '9e11143e29a031212f2cdefcf61f39e9' :"View Message",
17 'f49559cda3fb906fbd7736f8b8a0e37d' :"Email Template",
18 '01bd6a16732dfa2b760dc8566c58afae' :"Download to Excel",
19 '4a4a8fe0c6dfb6bd2a41755d15eb6f0b' :"From Name",
20 '4ca679a383343ab3d4ca1cd7c91b43f7' :"From Email",
21 '5fb63579fc981698f97d55bfecb213ea' :"Copy",
22 'f2a6c498fb90ee345d997f888fce3b18' :"Delete",
23 '49ee3087348e8d44e1feda1917443987' :"Name"
26 part : ["Admin", "EmailTemplates" ],
27 order : '999-Pman.Tab.AdminEmailTemplates',
29 parent : 'Pman.Tab.Admin',
30 name : "Manage Email Templates",
33 _tree : function(_data)
38 xtype : 'NestedLayoutPanel',
40 title : _this._strings['f49559cda3fb906fbd7736f8b8a0e37d'] /* Email Template */,
42 render : function (_self)
50 xtype : 'BorderLayout',
54 xtype : 'LayoutRegion',
61 xtype : 'LayoutRegion',
75 tableName : 'core_email',
76 title : _this._strings['c7d299bf3f9e37c77ab646f7e5366696'] /* core_email */,
78 activate : function() {
81 _this.grid.footer.onClick('first');
89 autoExpandColumn : 'subject',
95 _this.dialog = Pman.Dialog.CoreEmail;
96 if (_this.panel.active) {
97 _this.grid.footer.onClick('first');
100 rowclick : function (_self, rowIndex, e)
102 // _this.grid.ds.load({});
103 _this.viewPanel.view.store.load({});
105 rowdblclick : function (_self, rowIndex, e)
110 var data = this.getDataSource().getAt(rowIndex).data;
111 _this.dialog.show( {id : data.id, module : 'core_email'} , function() {
112 _this.grid.footer.onClick('first');
119 xtype : 'PagingToolbar',
121 displayMsg : _this._strings['00d6e06d2f3c092b4f5e1e708a360b0f'] /* Displaying Message{0} - {1} of {2} */,
122 emptyMsg : _this._strings['9076cbba1d9ef79280b4f39e2aa0d115'] /* Nothing found */,
129 text : _this._strings['01bd6a16732dfa2b760dc8566c58afae'] /* Download to Excel */,
135 url : baseURL + '/Roo/Core_email',
142 Roo.MessageBox.alert("Notice", "Should be downloading now");
147 '|xns' : 'Roo.Toolbar'
159 render : function (_self)
161 _this.searchBox = _self;
163 specialkey : function (_self, e)
165 _this.grid.footer.onClick('first');
174 icon : rootURL + '/Pman/templates/images/search.gif',
176 click : function (_self, e)
178 _this.grid.footer.onClick('first');
182 '|xns' : 'Roo.Toolbar'
187 icon : rootURL + '/Pman/templates/images/edit-clear.gif',
189 click : function (_self, e)
191 _this.searchBox.setValue('');
\r
192 _this.grid.footer.onClick('first');
\r
196 '|xns' : 'Roo.Toolbar'
201 '|xns' : 'Roo.Toolbar'
205 cls : 'x-btn-text-icon',
206 icon : Roo.rootURL + 'images/default/dd/drop-add.gif',
207 text : _this._strings['5fb63579fc981698f97d55bfecb213ea'] /* Copy */,
211 var sel = _this.grid.selModel.getSelected();
213 Roo.MessageBox.alert("Error", "Select a message to copy");
217 url : baseURL + '/Roo/Core_email',
223 success : function() {
224 _this.grid.footer.onClick('refresh');
231 '|xns' : 'Roo.Toolbar'
235 cls : 'x-btn-text-icon',
236 icon : Roo.rootURL + 'images/default/dd/drop-add.gif',
237 text : _this._strings['ec211f7c20af43e742bf2570c3cb84f9'] /* Add */,
244 _this.dialog.show( { id : 0, module : 'core_email' } , function() {
245 _this.grid.footer.onClick('first');
250 '|xns' : 'Roo.Toolbar'
255 '|xns' : 'Roo.Toolbar'
259 cls : 'x-btn-text-icon',
260 icon : rootURL + '/Pman/templates/images/trash.gif',
261 text : _this._strings['f2a6c498fb90ee345d997f888fce3b18'] /* Delete */,
265 Pman.genericDelete(_this, 'core_email');
270 '|xns' : 'Roo.Toolbar'
277 sortInfo : { field : 'description', direction: 'ASC' },
279 beforeload : function (_self, options)
281 options.params = options.params || {};
283 var s = _this.searchBox.getValue();
286 options.params['search[nameortitle]'] = s;
296 url : baseURL + '/Roo/Core_email.php',
301 xtype : 'JsonReader',
314 totalProperty : 'total',
320 xtype : 'RowSelectionModel',
327 xtype : 'ColumnModel',
329 header : _this._strings['49ee3087348e8d44e1feda1917443987'] /* Name */,
330 renderer : function(v,x,r)
332 if (r.data.description.length > 0) {
333 v = r.data.description;
337 if(r.data.active * 1 < 1){
338 return String.format('<s>{0}</s>', v ? v : '');
341 return String.format('{0}', v ? v : '');
349 xtype : 'ColumnModel',
350 dataIndex : 'subject',
351 header : _this._strings['b78a3223503896721cca1303f776159b'] /* Title */,
352 renderer : function(v,x,r)
354 if(r.data.active * 1 < 1){
355 return String.format('<s>{0}</s>', v ? v : '');
358 return String.format('{0}', v ? v : '');
366 xtype : 'ColumnModel',
367 dataIndex : 'from_name',
368 header : _this._strings['4a4a8fe0c6dfb6bd2a41755d15eb6f0b'] /* From Name */,
369 renderer : function(v) { return String.format('{0}', v ? v : ''); },
376 xtype : 'ColumnModel',
377 dataIndex : 'from_email',
378 header : _this._strings['4ca679a383343ab3d4ca1cd7c91b43f7'] /* From Email */,
379 renderer : function(v) { return String.format('{0}', v ? v : ''); },
386 xtype : 'ColumnModel',
387 dataIndex : 'bcc_group_name',
388 header : _this._strings['68b00d723d37122f64da8d9939f836f0'] /* BCC Group */,
389 renderer : function(v) { return String.format('{0}', v ? v : ''); },
399 xtype : 'ContentPanel',
405 title : _this._strings['9e11143e29a031212f2cdefcf61f39e9'] /* View Message */,
407 render : function (_self)
409 _this.viewPanel = _self;
416 tpl : new Roo.DomTemplate({url : rootURL+'/Pman/Crm/domtemplates/crm_mail.html'}),
418 preparedata : function (_self, data, i, rec)
421 //Roo.apply(data, rec.json);
429 beforeload : function (_self, options)
431 options.params = options.params || {};
432 var p = _this.grid.selModel.getSelected();
433 if (!p || !p.data.id) {
438 options.params['id'] = p.data.id;
441 load : function (_self, records, options)
443 var p = _this.grid.selModel.getSelected();
445 if (!p || !p.data.id) {
457 url : baseURL+'/Roo/Core_email.php',
462 xtype : 'JsonReader',
465 totalProperty : 'total',