fix #8131 - chinese translations
[Pman.Core] / Pman.Dialog.CoreEmail.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.CoreEmail = {
8
9  _strings : {
10   'e44b145bd8b49b06e0ad2ced1ad56466' :"Plain Text",
11   '2f26e35d61be90501e099089dc533638' :"Select Images",
12   'f2a6c498fb90ee345d997f888fce3b18' :"Delete",
13   'b357b524e740bc85b9790a0712d84a30' :"Email address",
14   '962b90039a542a29cedd51d87a9f28a1' :"Html Editor",
15   '72d6d7a1885885bb55a565fd1070581a' :"Import",
16   '28690be026c0bb9003aa58e45e5662ca' :"Enabled - will be sent out",
17   'ea30b40c3caf28acb29198d20d243e54' :"Images / Attachments >>",
18   '31fde7b05ac8952dacf4af8a704074ec' :"Preview",
19   'b337c8a67244afb6551ee1f8f9717676' :"Test Class <BR/> (for system reference only)",
20   '884df8e413319ff51a3f5f528606238a' :"Use template",
21   'e6b391a8d2c4d45902a23a8b6585703d' :"URL",
22   '6f16a5f8ff5d75ab84c018adacdfcbb7' :"Field",
23   'ec211f7c20af43e742bf2570c3cb84f9' :"Add",
24   '2393ad754ba179442d85e415d1d5167c' :"Displayorder",
25   'e9968623956c15023d54335ea3699855' :"Convert Html to Text",
26   '1243daf593fa297e07ab03bf06d925af' :"Searching...",
27   '5b8ef4e762c00a15a41cfc26dc3ef99c' :"Send me a test copy",
28   'c7892ebbb139886662c6f2fc8c450710' :"Subject",
29   'dc0de523c25be298ba751c63c694109e' :"Responsive Email (1)",
30   '396ecabf0cd1f9503e591418851ef406' :"Edit / Create Message",
31   'b9c49611cfda3259a2b837b39489e650' :"Add Image",
32   'ea4788705e6873b424c65e91c2846b19' :"Cancel",
33   '68b00d723d37122f64da8d9939f836f0' :"BCC Group",
34   'c4ca4238a0b923820dcc509a6f75849b' :"1",
35   '4994a8ffeba4ac3140beb89e8d41f174' :"Language",
36   'bd88a20b53a47f7b5704a83a15ff5506' :"Saved Version",
37   'b20a8b77b05d53b4e695738731400c85' :"Mailout Name",
38   '1bd18d39370b7f26c1c5e18067b74c6f' :"Html File",
39   '2c466a2c159463f1d9ef5a7b57b52827' :"Select BCC Group",
40   '5da618e8e4b89c66fe86e32cdafde142' :"From",
41   '31bb2f6e9b8fb11cbb7fb63c6025223f' :"Select Template",
42   'b78a3223503896721cca1303f776159b' :"Title",
43   '278c491bdd8a53618c149c4ac790da34' :"Template",
44   '308f2757bfc9ce92fb00ff93fdffd279' :"Images / Attachments",
45   '1351017ac6423911223bc19a8cb7c653' :"Filename",
46   'c9cc8cce247e49bae79f15173ce97354' :"Save",
47   '5feb9bf3c03b32635135006cbacb9542' :"Insert Field",
48   '4c2a8fe7eaf24721cc7a9f0175115bd4' :"Message",
49   'fff0d600f8a0b5e19e88bfb821dd1157' :"Images"
50  },
51  _named_strings : {
52   'active_boxLabel' : '28690be026c0bb9003aa58e45e5662ca' /* Enabled - will be sent out */ ,
53   'template_fieldLabel' : '278c491bdd8a53618c149c4ac790da34' /* Template */ ,
54   'name_fieldLabel' : 'b20a8b77b05d53b4e695738731400c85' /* Mailout Name */ ,
55   'bcc_group_id_name_qtip' : '2c466a2c159463f1d9ef5a7b57b52827' /* Select BCC Group */ ,
56   'bcc_group_id_name_emptyText' : '2c466a2c159463f1d9ef5a7b57b52827' /* Select BCC Group */ ,
57   'language_name_fieldLabel' : '4994a8ffeba4ac3140beb89e8d41f174' /* Language */ ,
58   'template_qtip' : '31bb2f6e9b8fb11cbb7fb63c6025223f' /* Select Template */ ,
59   'template_loadingText' : '1243daf593fa297e07ab03bf06d925af' /* Searching... */ ,
60   'from_email_fieldLabel' : 'b357b524e740bc85b9790a0712d84a30' /* Email address */ ,
61   'template_emptyText' : '31bb2f6e9b8fb11cbb7fb63c6025223f' /* Select Template */ ,
62   'active_value' : 'c4ca4238a0b923820dcc509a6f75849b' /* 1 */ ,
63   'from_name_fieldLabel' : '5da618e8e4b89c66fe86e32cdafde142' /* From */ ,
64   'bcc_group_id_name_loadingText' : '1243daf593fa297e07ab03bf06d925af' /* Searching... */ ,
65   'bcc_group_id_name_fieldLabel' : '68b00d723d37122f64da8d9939f836f0' /* BCC Group */ ,
66   'subject_fieldLabel' : 'c7892ebbb139886662c6f2fc8c450710' /* Subject */ ,
67   'test_class_fieldLabel' : 'b337c8a67244afb6551ee1f8f9717676' /* Test Class <BR/> (for system reference only) */ 
68  },
69
70  dialog : false,
71  callback:  false,
72
73  show : function(data, cb)
74  {
75   if (!this.dialog) {
76    this.create();
77   }
78
79   this.callback = cb;
80   this.data = data;
81   this.dialog.show.apply(this.dialog,  Array.prototype.slice.call(arguments).slice(2));
82   if (this.form) {
83    this.form.reset();
84    this.form.setValues(data);
85    this.form.fireEvent('actioncomplete', this.form,  { type: 'setdata', data: data });
86   }
87
88  },
89
90  create : function()
91  {
92    var _this = this;
93    this.dialog = Roo.factory({
94     xtype : 'LayoutDialog',
95     closable : true,
96     collapsible : false,
97     height : 500,
98     modal : true,
99     resizable : true,
100     title : _this._strings['396ecabf0cd1f9503e591418851ef406'] /* Edit / Create Message */,
101     width : 800,
102     listeners : {
103      show : function (_self)
104       {
105           
106           _self.layout.getRegion('center').showPanel(0);
107           var w = Roo.lib.Dom.getViewWidth();\r
108           var h = Roo.lib.Dom.getViewHeight();    \r    this.resizeTo(w-50, h-50);\r
109           this.center();\r    
110           var ew = Math.max(250, w-320);\r
111           var eh = Math.max(250, h-350) ;\r
112           var e = _this.dialog.layout.getRegion('east');
113           if (e.visible) {
114               e.hide();
115           }
116           
117           var el = _self.getEl();
118           var elw = el.dom.clientWidth;
119           
120           var bdtext = _this.form.findField('bodytext');
121           var ptext = _this.form.findField('plaintext');
122           if(bdtext.resizeEl){
123               bdtext.width = elw-100;
124               bdtext.resizeEl.resizeTo.defer(110, bdtext.resizeEl,[ bdtext.width, bdtext.height  ] );
125               ptext.setSize(bdtext.width , bdtext.height);
126           }
127           
128       }
129     },
130     xns : Roo,
131     '|xns' : 'Roo',
132     center : {
133      xtype : 'LayoutRegion',
134      tabPosition : 'top',
135      xns : Roo,
136      '|xns' : 'Roo'
137     },
138     east : {
139      xtype : 'LayoutRegion',
140      hidden : true,
141      split : true,
142      title : _this._strings['308f2757bfc9ce92fb00ff93fdffd279'] /* Images / Attachments */,
143      titlebar : true,
144      width : 500,
145      xns : Roo,
146      '|xns' : 'Roo'
147     },
148     buttons : [
149      {
150       xtype : 'Button',
151       text : _this._strings['31fde7b05ac8952dacf4af8a704074ec'] /* Preview */,
152       listeners : {
153        click : function (_self, e)
154         {
155             //_this.dialog.hide();
156             Roo.log(_this.data.module);
157             Pman.Dialog.CoreEmailPreview.show({ id : _this.form.findField('id').getValue(), module : _this.data.module });
158         },
159        render : function (_self)
160         {
161             _this.preview_btn = _self;
162         }
163       },
164       xns : Roo,
165       '|xns' : 'Roo'
166      },
167      {
168       xtype : 'Button',
169       text : _this._strings['5b8ef4e762c00a15a41cfc26dc3ef99c'] /* Send me a test copy */,
170       listeners : {
171        click : function (_self, e)
172         {
173             //_this.dialog.hide();
174         
175             var id = _this.form.findField('id').getValue();
176             
177             if(id*1 < 1){
178                 Roo.MessageBox.alert('Error', 'Please save the message frist!');
179                 return;
180             }
181            
182             new Pman.Request({
183                 url : baseURL + '/Core/MessagePreview',
184                 method : 'POST',
185                 mask: 'Sending',
186                 params : {
187                     _id : id,
188                     _table : _this.data.module
189                 }, 
190                 success : function(res) { 
191                     if(res.data == 'SUCCESS'){
192                         Roo.MessageBox.alert("Email Sent", 'The report was sent to your email (HTML format).');
193                     }
194                 }
195             });
196         },
197        render : function (_self)
198         {
199             _this.html_preview = _self;
200         }
201       },
202       xns : Roo,
203       '|xns' : 'Roo'
204      },
205      {
206       xtype : 'Button',
207       text : _this._strings['ea4788705e6873b424c65e91c2846b19'] /* Cancel */,
208       listeners : {
209        click : function (_self, e)
210         {
211             _this.dialog.hide();
212         }
213       },
214       xns : Roo,
215       '|xns' : 'Roo'
216      },
217      {
218       xtype : 'Button',
219       text : _this._strings['c9cc8cce247e49bae79f15173ce97354'] /* Save */,
220       listeners : {
221        click : function (_self, e)
222         {
223         
224             // do some checks?
225             _this.form.preValidate(function(res) {
226                 if (!res) {
227                     return; //failed.
228                 }
229                  _this.form.doAction("submit");
230             });
231         
232         }
233       },
234       xns : Roo,
235       '|xns' : 'Roo'
236      }
237     ],
238     items  : [
239      {
240       xtype : 'NestedLayoutPanel',
241       autoScroll : false,
242       fitContainer : true,
243       fitToFrame : true,
244       region : 'center',
245       xns : Roo,
246       '|xns' : 'Roo',
247       toolbar : {
248        xtype : 'Toolbar',
249        xns : Roo,
250        '|xns' : 'Roo',
251        items  : [
252         {
253          xtype : 'Button',
254          text : _this._strings['72d6d7a1885885bb55a565fd1070581a'] /* Import */,
255          xns : Roo.Toolbar,
256          '|xns' : 'Roo.Toolbar',
257          menu : {
258           xtype : 'Menu',
259           xns : Roo.menu,
260           '|xns' : 'Roo.menu',
261           items  : [
262            {
263             xtype : 'Item',
264             text : _this._strings['e6b391a8d2c4d45902a23a8b6585703d'] /* URL */,
265             listeners : {
266              click : function (_self, e)
267               {
268                   Pman.Dialog.CoreImportUrl.show({
269                       target : '/Core/ImportMailMessage.php'
270                   }, function(data) {
271                       if  (data) {
272                         //  Roo.log(data);
273                           _this.form.findField('bodytext').setValue(data);
274                       }
275                   });
276               }
277             },
278             xns : Roo.menu,
279             '|xns' : 'Roo.menu'
280            },
281            {
282             xtype : 'Item',
283             text : _this._strings['1bd18d39370b7f26c1c5e18067b74c6f'] /* Html File */,
284             listeners : {
285              click : function (_self, e)
286               {
287                   Pman.Dialog.Image.show({
288                       _url : baseURL + '/Core/ImportMailMessage.php'
289                   }, function(data) {
290                       if  (data) {
291                           _this.form.findField('bodytext').setValue(data);
292                       }
293                   });
294               }
295             },
296             xns : Roo.menu,
297             '|xns' : 'Roo.menu'
298            }
299           ]
300          }
301         },
302         {
303          xtype : 'Button',
304          text : _this._strings['884df8e413319ff51a3f5f528606238a'] /* Use template */,
305          xns : Roo.Toolbar,
306          '|xns' : 'Roo.Toolbar',
307          menu : {
308           xtype : 'Menu',
309           xns : Roo.menu,
310           '|xns' : 'Roo.menu',
311           items  : [
312            {
313             xtype : 'Item',
314             text : _this._strings['dc0de523c25be298ba751c63c694109e'] /* Responsive Email (1) */,
315             listeners : {
316              click : function (_self, e)
317               {
318               
319                   var l = document.location;
320                   new Pman.Request({
321               
322                       url : baseURL + '/Core/ImportMailMessage.php',
323               
324                       method: 'POST',
325                       mask : "Loading",
326                       params : {
327                             importUrl : l.protocol +'//' + l.host +   rootURL + '/Pman/Crm/mail_templates/responsive1.html'
328                      },
329                       success : function (res) {
330               
331                        _this.form.findField('bodytext').setValue(res.data);
332                       }
333                 
334                   });
335               }
336             },
337             xns : Roo.menu,
338             '|xns' : 'Roo.menu'
339            }
340           ]
341          }
342         },
343         {
344          xtype : 'ComboBox',
345          allowBlank : true,
346          alwaysQuery : true,
347          displayField : 'file',
348          editable : false,
349          emptyText : _this._strings['31bb2f6e9b8fb11cbb7fb63c6025223f'] /* Select Template */,
350          fieldLabel : _this._strings['278c491bdd8a53618c149c4ac790da34'] /* Template */,
351          forceSelection : true,
352          hiddenName : 'template',
353          listWidth : 400,
354          loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
355          minChars : 2,
356          name : 'template',
357          pageSize : 20,
358          qtip : _this._strings['31bb2f6e9b8fb11cbb7fb63c6025223f'] /* Select Template */,
359          selectOnFocus : true,
360          tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{file}</b> </div>',
361          triggerAction : 'all',
362          typeAhead : true,
363          valueField : 'file',
364          width : 200,
365          listeners : {
366           select : function (combo, record, index)
367            {
368               
369            /*
370                (function() { 
371                    combo.setValue('');
372                }).defer(100);
373            */    
374                if(!record){
375                    return;
376                }
377                _this.form.findField('bodytext').setValue(record.data.content);
378            
379            }
380          },
381          xns : Roo.form,
382          '|xns' : 'Roo.form',
383          store : {
384           xtype : 'Store',
385           remoteSort : true,
386           sortInfo : { direction : 'DESC', field: 'file' },
387           listeners : {
388            beforeload : function (_self, o){
389                 o.params = o.params || {};
390                 // set more here
391                
392             }
393           },
394           xns : Roo.data,
395           '|xns' : 'Roo.data',
396           proxy : {
397            xtype : 'HttpProxy',
398            method : 'GET',
399            url : baseURL + '/Core/MailTemplateList.php',
400            xns : Roo.data,
401            '|xns' : 'Roo.data'
402           },
403           reader : {
404            xtype : 'JsonReader',
405            fields : [{"name":"file","type":"string"},{"name":"content","type":"string"}],
406            id : 'name',
407            root : 'data',
408            totalProperty : 'total',
409            xns : Roo.data,
410            '|xns' : 'Roo.data'
411           }
412          }
413         },
414         {
415          xtype : 'Fill',
416          xns : Roo.Toolbar,
417          '|xns' : 'Roo.Toolbar'
418         },
419         {
420          xtype : 'Button',
421          text : _this._strings['ea30b40c3caf28acb29198d20d243e54'] /* Images / Attachments >> */,
422          listeners : {
423           click : function (_self, e)
424            {
425                var el = _this.dialog.layout.getRegion('east');
426                if (el.visible) {
427                    el.hide();
428                } else {
429                    el.show();
430                    el.showPanel(0);
431                }
432                
433            }
434          },
435          xns : Roo.Toolbar,
436          '|xns' : 'Roo.Toolbar'
437         }
438        ]
439       },
440       layout : {
441        xtype : 'BorderLayout',
442        xns : Roo,
443        '|xns' : 'Roo',
444        center : {
445         xtype : 'LayoutRegion',
446         autoScroll : true,
447         xns : Roo,
448         '|xns' : 'Roo'
449        },
450        items  : [
451         {
452          xtype : 'ContentPanel',
453          autoScroll : false,
454          background : false,
455          fitContainer : true,
456          fitToFrame : true,
457          region : 'center',
458          title : _this._strings['4c2a8fe7eaf24721cc7a9f0175115bd4'] /* Message */,
459          listeners : {
460           render : function (_self, width, height)
461            {
462                
463                  Roo.log("RESIZE, " + width + ',' + height);
464                
465                var ew = Math.max(250, width-50);
466                var eh = Math.max(250,height-50) ;
467                
468               
469            
470            },
471           resize : function (_self, width, height)\r
472            {\r
473               var ew = Math.max(250, width-50);\r
474                var eh = Math.max(250,height-50) ;
475                
476                if (!_this.form) {\r
477                    return;\r
478                }\r
479                var bdtext = _this.form.findField('bodytext');\r
480                var ptext = _this.form.findField('plaintext');\r
481                if(bdtext.resizeEl){\r
482                    bdtext.width = ew-50;\r
483                    bdtext.resizeEl.resizeTo.defer(110, bdtext.resizeEl,[ bdtext.width, bdtext.height  ] );\r
484                    ptext.setSize(bdtext.width , bdtext.height);\r
485                }\r\r
486            \r
487            }
488          },
489          xns : Roo,
490          '|xns' : 'Roo',
491          items  : [
492           {
493            xtype : 'Form',
494            labelAlign : 'right',
495            labelWidth : 120,
496            method : 'POST',
497            preValidate : function(done_callback) {
498                
499                Roo.MessageBox.progress("Uploading Images", "Uploading");
500                
501                if(!_this.form.findField('bodytext').editorcore.sourceEditMode){
502                    _this.form.findField('bodytext').syncValue();
503                }else{
504                    _this.form.findField('bodytext').pushValue();
505                }
506                
507                var html = _this.form.findField('bodytext').getValue();
508                
509                var s = Roo.get(_this.form.findField('bodytext').editorcore.doc.documentElement);
510                
511                var ontable = (_this.data.module) ? _this.data.module : 'crm_mailing_list_message';
512                
513                var nodes = [];
514                s.select('img[src]').each(function(i) {
515                    nodes.push(i.dom);
516                });
517                var total = nodes.length;
518                var mkimg = function() {
519                
520                    if (!nodes.length) {
521                          Roo.MessageBox.hide();
522                          _this.form.findField('bodytext').syncValue();
523                          done_callback(true);
524                       //    _this.form.doAction("submit");
525                          return;
526                    }
527                    var i = nodes.pop(); 
528                    
529                    var n = i.getAttribute('src').match(/(baseURL|server_baseurl)/);
530                    
531                    if(n){
532                        mkimg();
533                        return;
534                    }
535                    
536                    n = i.getAttribute('src').match(/^http(.*)/);
537                   
538                    if(!n ){
539                        mkimg();
540                        return;
541                    }
542                    
543                    new Pman.Request({
544                        url : baseURL + '/Roo/Images.php',
545                        method : 'POST',
546                        params : {
547                            onid : _this.form.findField('id').getValue(),
548                            ontable : ontable ,
549                            _remote_upload : i.src
550                        },
551                        success : function(res){
552                            if(res.success == true){      
553                                i.setAttribute('src', res.data);
554                                Roo.MessageBox.updateProgress( (total - nodes.length) / total , "Done " + (total - nodes.length) + '/' + total);
555                            }
556                            mkimg();
557                        }
558                    });
559                   
560                }
561                
562                if (!_this.form.findField('bodytext').getValue().match(/unsubscribe/i)) {
563                    Roo.MessageBox.confirm("Missing unusubscribe",
564                        "There is no unsubscribe link on the email  are you sure you want to save it",
565                        function(res) {
566                            if (res == 'no') {
567                                return;
568                            }
569                            mkimg();
570                        }
571                    );
572            
573                    return;
574                }
575                
576                mkimg();
577            },
578            style : 'margin:10px',
579            url : baseURL + '/Roo/crm_mailing_list_message.php',
580            listeners : {
581             actioncomplete : function(_self,action)
582              {
583                 
584                  if (action.type == 'setdata') {
585                  
586                      setInterval(_this.form.findField('bodytext').autosave, 5000);
587                      
588                      _this.data.module = _this.data.module || 'crm_mailing_list_message';
589                      
590                      _this.form.url = baseURL + '/Roo/' + _this.data.module;
591                      
592                      _this.html_preview.hide();
593                      _this.preview_btn.hide();
594                          
595                      if(_this.data.id*1 > 0){
596                          _this.dialog.el.mask("Loading");
597                          this.load({ method: 'GET', params: { '_id' : _this.data.id }});
598                          _this.html_preview.show();
599                          _this.preview_btn.show();
600                          
601                      } else {
602                          _this.form.setValues({
603                              'from_name' : Pman.Login.authUser.name,
604                              'from_email' : Pman.Login.authUser.email
605                          });
606                      }
607                     return;
608                  }
609                  if (action.type == 'load') {
610                      _this.dialog.el.unmask();
611                      
612                      _this.form.findField('bodytext').originalValue = _this.form.findField('bodytext').getValue();
613                      
614                      return;
615                  }
616                  if (action.type =='submit') {
617                  
618                      _this.dialog.el.unmask();
619                      _this.dialog.hide();
620                  
621                       if (_this.callback) {
622                          _this.callback.call(_this, action.result.data);
623                       }
624                       _this.form.reset();
625                       return;
626                  }
627              },
628             rendered : function (form)
629              {
630                  _this.form= form;
631              }
632            },
633            xns : Roo.form,
634            '|xns' : 'Roo.form',
635            items  : [
636             {
637              xtype : 'Row',
638              xns : Roo.form,
639              '|xns' : 'Roo.form',
640              items  : [
641               {
642                xtype : 'TextField',
643                allowBlank : false,
644                fieldLabel : _this._strings['b20a8b77b05d53b4e695738731400c85'] /* Mailout Name */,
645                name : 'name',
646                width : 400,
647                xns : Roo.form,
648                '|xns' : 'Roo.form'
649               },
650               {
651                xtype : 'Column',
652                labelSeparator : ' ',
653                labelWidth : 0,
654                xns : Roo.form,
655                '|xns' : 'Roo.form',
656                items  : [
657                 {
658                  xtype : 'Checkbox',
659                  boxLabel : _this._strings['28690be026c0bb9003aa58e45e5662ca'] /* Enabled - will be sent out */,
660                  checked : true,
661                  name : 'active',
662                  value : 1,
663                  valueOff : 0,
664                  listeners : {
665                   check : function (_self, checked)
666                    {
667                        var boxLabel = 'Enabled - will be sent out';
668                        
669                        if(!checked){
670                            boxLabel = 'Disabled - will NOT be sent out';
671                        }
672                        
673                        this.setBoxLabel(boxLabel);
674                    }
675                  },
676                  xns : Roo.form,
677                  '|xns' : 'Roo.form'
678                 }
679                ]
680               }
681              ]
682             },
683             {
684              xtype : 'Row',
685              xns : Roo.form,
686              '|xns' : 'Roo.form',
687              items  : [
688               {
689                xtype : 'TextField',
690                allowBlank : false,
691                fieldLabel : _this._strings['5da618e8e4b89c66fe86e32cdafde142'] /* From */,
692                name : 'from_name',
693                width : 300,
694                xns : Roo.form,
695                '|xns' : 'Roo.form'
696               },
697               {
698                xtype : 'TextField',
699                allowBlank : false,
700                fieldLabel : _this._strings['b357b524e740bc85b9790a0712d84a30'] /* Email address */,
701                name : 'from_email',
702                width : 300,
703                xns : Roo.form,
704                '|xns' : 'Roo.form'
705               },
706               {
707                xtype : 'ComboBox',
708                allowBlank : true,
709                alwaysQuery : true,
710                displayField : 'name',
711                editable : false,
712                emptyText : _this._strings['2c466a2c159463f1d9ef5a7b57b52827'] /* Select BCC Group */,
713                fieldLabel : _this._strings['68b00d723d37122f64da8d9939f836f0'] /* BCC Group */,
714                forceSelection : true,
715                hiddenName : 'bcc_group_id',
716                loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
717                minChars : 2,
718                name : 'bcc_group_id_name',
719                pageSize : 25,
720                qtip : _this._strings['2c466a2c159463f1d9ef5a7b57b52827'] /* Select BCC Group */,
721                selectOnFocus : true,
722                tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> </div>',
723                triggerAction : 'all',
724                typeAhead : true,
725                valueField : 'id',
726                width : 300,
727                xns : Roo.form,
728                '|xns' : 'Roo.form',
729                store : {
730                 xtype : 'Store',
731                 remoteSort : true,
732                 sortInfo : { direction : 'ASC', field: 'name' },
733                 listeners : {
734                  beforeload : function (_self, o){
735                       o.params = o.params || {};
736                       
737                       o.params._direct_return = 1;
738                   }
739                 },
740                 xns : Roo.data,
741                 '|xns' : 'Roo.data',
742                 proxy : {
743                  xtype : 'HttpProxy',
744                  method : 'GET',
745                  url : baseURL + '/Roo/Core_group',
746                  xns : Roo.data,
747                  '|xns' : 'Roo.data'
748                 },
749                 reader : {
750                  xtype : 'JsonReader',
751                  fields : [{"name":"name","type":"string"},{"name":"id","type":"int"}],
752                  id : 'name',
753                  root : 'data',
754                  totalProperty : 'total',
755                  xns : Roo.data,
756                  '|xns' : 'Roo.data'
757                 }
758                }
759               }
760              ]
761             },
762             {
763              xtype : 'Row',
764              xns : Roo.form,
765              '|xns' : 'Roo.form',
766              items  : [
767               {
768                xtype : 'TextField',
769                allowBlank : false,
770                fieldLabel : _this._strings['c7892ebbb139886662c6f2fc8c450710'] /* Subject */,
771                name : 'subject',
772                width : 600,
773                xns : Roo.form,
774                '|xns' : 'Roo.form'
775               },
776               {
777                xtype : 'ComboBox',
778                allowBlank : false,
779                displayField : 'title',
780                editable : false,
781                fieldLabel : _this._strings['4994a8ffeba4ac3140beb89e8d41f174'] /* Language */,
782                hiddenName : 'language',
783                listWidth : 200,
784                mode : 'local',
785                name : 'language_name',
786                tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{title}</b> </div>',
787                triggerAction : 'all',
788                valueField : 'code',
789                width : 200,
790                xns : Roo.form,
791                '|xns' : 'Roo.form',
792                store : {
793                 xtype : 'SimpleStore',
794                 data : (function() {return typeof(Pman) == 'object'  ? Pman.I18n.simpleStoreData('l') : []})(),
795                 fields : ['code', 'title'],
796                 xns : Roo.data,
797                 '|xns' : 'Roo.data'
798                }
799               }
800              ]
801             },
802             {
803              xtype : 'Row',
804              hideLabels : true,
805              xns : Roo.form,
806              '|xns' : 'Roo.form',
807              items  : [
808               {
809                xtype : 'FieldSet',
810                hideLabels : true,
811                legend : _this._strings['962b90039a542a29cedd51d87a9f28a1'] /* Html Editor */,
812                style : 'text-align:center;',
813                xns : Roo.form,
814                '|xns' : 'Roo.form',
815                items  : [
816                 {
817                  xtype : 'HtmlEditor',
818                  allowComments : true,
819                  autoClean : false,
820                  autosave : function() {
821                      
822                      var body = _this.form.findField('bodytext');
823                      
824                      if(!body.wrap.isVisible(true) || body.getValue() == '' || !body.isDirty()){
825                          Roo.log('body not dirty');
826                          return;
827                      }
828                      
829                      Roo.log('body dirty, auto save!');
830                      
831                      body.fireEvent('autosave', body);
832                     
833                  },
834                  clearUp : false,
835                  cwhite : [ 
836                      'background',
837                      'background-color',
838                      'border',
839                      'border-radius',
840                      'border-bottom',
841                      'border-left',
842                      'border-right',
843                      'border-top',
844                      'border-collapse',
845                       'border-color',
846                       'border-style',
847                      'border-width',
848                  
849                      
850                      'box-shadow',
851                      'clear',
852                      'color',
853                      'cursor',
854                      'display',
855                      'float' ,
856                      'font-family',
857                      'font-size',
858                      'font-style',        
859                      'font-weight',
860                  
861                      'height',
862                      'left',
863                      'line-height',
864                      'list-style',
865                      'margin',
866                      'margin-bottom',
867                      'margin-left',
868                      'margin-right',
869                      'margin-top',
870                      'max-width',
871                      'min-height',
872                      '-ms-interpolation-mode',
873                      'mso-table-rspace',
874                      '-ms-text-size-adjust',
875                      'outline',
876                      'overflow',
877                      'padding',
878                      'padding-bottom',
879                      'padding-left',
880                      'padding-right',
881                      'padding-top',
882                      'position',
883                      'right',
884                      'text-align',
885                      'text-decoration',
886                      'top',
887                      'vertical-align',
888                      '-webkit-text-size-adjust',
889                      'width',
890                      'width',
891                      'z-index'
892                   ],
893                  enableBlocks : false,
894                  height : 250,
895                  name : 'bodytext',
896                  resizable : 's',
897                  listeners : {
898                   autosave : function (_self)
899                    {
900                        Roo.log('autosave');
901                        
902                        var id = _this.form.findField('id').getValue() * 1;
903                        
904                        /*
905                        if(!_self.editorcore.sourceEditMode){
906                            _self.syncValue();
907                        }else{
908                            _self.pushValue();
909                        }
910                        */
911                        
912                        new Pman.Request({
913                            url : baseURL + '/Roo/Events.php',
914                            method :'POST',
915                            params : {
916                                id : 0,
917                                action : 'AUTOSAVE',
918                                on_id : (id > 0) ? id : 0,
919                                on_table : 'crm_mailing_list_message',
920                                remarks : 'BODY',
921                                source: _self.getValue()
922                            },
923                            success : function() {
924                                _self.originalValue = _self.getValue();
925                                
926                            },
927                            failure : function() 
928                            {
929                                Roo.log('body autosave failed?!');
930                            }
931                        });
932                        
933                    },
934                   savedpreview : function (_self)
935                    {
936                        var id = _this.form.findField('id').getValue() * 1;
937                        
938                        var successFn = function(res){
939                            return res.data.POST.source;
940                        };
941                        
942                        var params = {
943                            action : 'AUTOSAVE',
944                            remarks : 'BODY',
945                            on_id : (id < 1) ? 0 : id,
946                            on_table : 'crm_mailing_list_message',
947                            successFn : successFn
948                        };
949                        
950                        
951                        Pman.Dialog.CoreAutoSavePreview.show(params, function(res){
952                            _self.setValue(res);
953                            _self.originalValue = res;
954                        });
955                    }
956                  },
957                  xns : Roo.form,
958                  '|xns' : 'Roo.form',
959                  toolbars : [
960                   {
961                    xtype : 'ToolbarContext',
962                    xns : Roo.form.HtmlEditor,
963                    '|xns' : 'Roo.form.HtmlEditor'
964                   },
965                   {
966                    xtype : 'ToolbarStandard',
967                    xns : Roo.form.HtmlEditor,
968                    '|xns' : 'Roo.form.HtmlEditor',
969                    btns : [
970                     {
971                      xtype : 'ComboBox',
972                      alwaysQuery : true,
973                      displayField : 'name',
974                      editable : false,
975                      emptyText : _this._strings['b9c49611cfda3259a2b837b39489e650'] /* Add Image */,
976                      fieldLabel : _this._strings['fff0d600f8a0b5e19e88bfb821dd1157'] /* Images */,
977                      forceSelection : true,
978                      listWidth : 400,
979                      loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
980                      minChars : 2,
981                      pageSize : 20,
982                      qtip : _this._strings['2f26e35d61be90501e099089dc533638'] /* Select Images */,
983                      selectOnFocus : true,
984                      tpl : '<div class=\"x-grid-cell-text x-btn button\"><img src=\"{public_baseURL}/Core/Images/Thumb/150x150/{id}.jpg\" height=\"150\" width=\"150\"><b>{filename}</b> </div>',
985                      triggerAction : 'all',
986                      typeAhead : true,
987                      valueField : 'id',
988                      width : 100,
989                      listeners : {
990                       beforequery : function (combo, query, forceAll, cancel, e)
991                        {
992                            var id = _this.form.findField('id').getValue() * 1;    
993                            if (!id) {
994                                Roo.MessageBox.alert("Error", "Save message first");
995                                return false;
996                            }
997                        },
998                       render : function (_self)
999                        {
1000                            _this.extendimgselect = _self;
1001                        },
1002                       select : function (combo, record, index)
1003                        {
1004                            Roo.log(record);
1005                            (function() { 
1006                                combo.setValue('');
1007                            }).defer(100);
1008                            var editor = _this.form.findField('bodytext').editorcore;
1009                            
1010                            var curnode = editor.getSelectedNode();
1011                            if (curnode && curnode.tagName == 'IMG') {
1012                                curnode.src= String.format('{0}/Images/{1}/{2}#image-{1}',
1013                                        baseURL,  record.data.id, record.data.filename
1014                                    );
1015                                    // note -forces an update... hopefully...
1016                                editor.owner.fireEvent('editorevent', editor, false);
1017                            } else {
1018                            
1019                                editor.insertAtCursor(
1020                                    String.format('<img src="{0}/Images/{1}/{2}#image-{1}">',
1021                                    baseURL,  record.data.id, record.data.filename
1022                                    )
1023                                );
1024                        
1025                            }
1026                            
1027                         }
1028                      },
1029                      xns : Roo.form,
1030                      '|xns' : 'Roo.form',
1031                      store : {
1032                       xtype : 'Store',
1033                       remoteSort : true,
1034                       sortInfo : { direction : 'ASC', field: 'id' },
1035                       listeners : {
1036                        beforeload : function (_self, o){
1037                             o.params = o.params || {};
1038                         
1039                             var id = _this.form.findField('id').getValue() * 1;    
1040                             if (!id) {
1041                                 Roo.MessageBox.alert("Error", "Save email template first");
1042                                 return false;
1043                             }
1044                             o.params.onid = id;
1045                             o.params.ontable = (_this.data.module) ? _this.data.module : 'crm_mailing_list_message';
1046                             
1047                            // o.params.imgtype = 'PressRelease';
1048                             //o.params['query[imagesize]'] = '150x150';
1049                             // set more here
1050                         }
1051                       },
1052                       xns : Roo.data,
1053                       '|xns' : 'Roo.data',
1054                       proxy : {
1055                        xtype : 'HttpProxy',
1056                        method : 'GET',
1057                        url : baseURL + '/Roo/Images.php',
1058                        xns : Roo.data,
1059                        '|xns' : 'Roo.data'
1060                       },
1061                       reader : {
1062                        xtype : 'JsonReader',
1063                        fields : [{"name":"id","type":"int"},{"name":"filename","type":"string"},{"name":"url_thumb","type":"string"}],
1064                        id : 'id',
1065                        root : 'data',
1066                        totalProperty : 'total',
1067                        xns : Roo.data,
1068                        '|xns' : 'Roo.data'
1069                       }
1070                      }
1071                     },
1072                     {
1073                      xtype : 'ComboBox',
1074                      alwaysQuery : true,
1075                      displayField : 'name',
1076                      editable : false,
1077                      emptyText : _this._strings['5feb9bf3c03b32635135006cbacb9542'] /* Insert Field */,
1078                      fieldLabel : _this._strings['6f16a5f8ff5d75ab84c018adacdfcbb7'] /* Field */,
1079                      forceSelection : true,
1080                      listWidth : 400,
1081                      loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
1082                      minChars : 2,
1083                      pageSize : 20,
1084                      qtip : _this._strings['5feb9bf3c03b32635135006cbacb9542'] /* Insert Field */,
1085                      selectOnFocus : true,
1086                      tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> </div>',
1087                      triggerAction : 'all',
1088                      typeAhead : true,
1089                      valueField : 'type',
1090                      width : 100,
1091                      listeners : {
1092                       render : function (_self)
1093                        {
1094                            _this.unsubscribeselect = _self;
1095                        },
1096                       select : function (combo, record, index)
1097                        {
1098                            Roo.log(record);
1099                            (function() { 
1100                                combo.setValue('');
1101                            }).defer(100);
1102                            var editor = _this.form.findField('bodytext').editorcore;
1103                            
1104                            if(record.data.name == 'Unsubscribe'){
1105                                editor.insertAtCursor(
1106                                    String.format('<a href="{0}">{1}</a>',
1107                                        record.data.type,  record.data.name
1108                                    )
1109                                );
1110                                return;     
1111                            }
1112                            
1113                            editor.insertAtCursor(
1114                                String.format('{0}',
1115                                    record.data.type
1116                                )
1117                            );
1118                            
1119                         }
1120                      },
1121                      xns : Roo.form,
1122                      '|xns' : 'Roo.form',
1123                      store : {
1124                       xtype : 'SimpleStore',
1125                       data : [ 
1126                           [ '{person.firstname}', "First Name"],
1127                           [ '{person.lastname}' , "Last Name"],
1128                           [ '{person.name}', "Full Name"],
1129                           [ '#unsubscribe', "Unsubscribe"]
1130                       ],
1131                       fields : [  'type', 'name'],
1132                       xns : Roo.data,
1133                       '|xns' : 'Roo.data'
1134                      }
1135                     },
1136                     {
1137                      xtype : 'Separator',
1138                      xns : Roo.Toolbar,
1139                      '|xns' : 'Roo.Toolbar'
1140                     },
1141                     {
1142                      xtype : 'Button',
1143                      cls : 'x-init-enable',
1144                      text : _this._strings['bd88a20b53a47f7b5704a83a15ff5506'] /* Saved Version */,
1145                      listeners : {
1146                       click : function (_self, e)
1147                        {
1148                            this.scope.owner.fireEvent('savedpreview', this.scope.owner);
1149                            
1150                        }
1151                      },
1152                      xns : Roo.Toolbar,
1153                      '|xns' : 'Roo.Toolbar'
1154                     }
1155                    ]
1156                   }
1157                  ]
1158                 }
1159                ]
1160               }
1161              ]
1162             },
1163             {
1164              xtype : 'Row',
1165              hideLabels : true,
1166              xns : Roo.form,
1167              '|xns' : 'Roo.form',
1168              items  : [
1169               {
1170                xtype : 'Button',
1171                text : _this._strings['e9968623956c15023d54335ea3699855'] /* Convert Html to Text */,
1172                listeners : {
1173                 click : function (_self, e)
1174                  {
1175                      var h = _this.form.findField('bodytext').getValue();
1176                      var p = _this.form.findField('plaintext');
1177                      
1178                      new Pman.Request({\r
1179                          url : baseURL + '/Core/ImportMailMessage.php',\r
1180                          method : 'POST',\r
1181                          params : {
1182                            bodytext : h,\r
1183                            _convertToPlain : true,
1184                            _check_unsubscribe : true\r
1185                          }, \r
1186                          success : function(res) {\r
1187                              if(res.success == true){
1188                                 p.setValue(res.data);
1189                              }\r
1190                          }\r
1191                      });
1192                      
1193                  }
1194                },
1195                xns : Roo,
1196                '|xns' : 'Roo'
1197               }
1198              ]
1199             },
1200             {
1201              xtype : 'Row',
1202              hideLabels : true,
1203              xns : Roo.form,
1204              '|xns' : 'Roo.form',
1205              items  : [
1206               {
1207                xtype : 'FieldSet',
1208                hideLabels : true,
1209                legend : _this._strings['e44b145bd8b49b06e0ad2ced1ad56466'] /* Plain Text */,
1210                style : 'text-align:center;',
1211                xns : Roo.form,
1212                '|xns' : 'Roo.form',
1213                items  : [
1214                 {
1215                  xtype : 'TextArea',
1216                  height : 50,
1217                  name : 'plaintext',
1218                  xns : Roo.form,
1219                  '|xns' : 'Roo.form'
1220                 }
1221                ]
1222               }
1223              ]
1224             },
1225             {
1226              xtype : 'Row',
1227              xns : Roo.form,
1228              '|xns' : 'Roo.form',
1229              items  : [
1230               {
1231                xtype : 'TextField',
1232                allowBlank : true,
1233                fieldLabel : _this._strings['b337c8a67244afb6551ee1f8f9717676'] /* Test Class <BR/> (for system reference only) */,
1234                name : 'test_class',
1235                readOnly : true,
1236                width : 300,
1237                xns : Roo.form,
1238                '|xns' : 'Roo.form'
1239               }
1240              ]
1241             },
1242             {
1243              xtype : 'Hidden',
1244              name : 'id',
1245              xns : Roo.form,
1246              '|xns' : 'Roo.form'
1247             }
1248            ]
1249           }
1250          ]
1251         }
1252        ]
1253       }
1254      },
1255      {
1256       xtype : 'GridPanel',
1257       autoScroll : false,
1258       background : false,
1259       fitContainer : true,
1260       fitToframe : true,
1261       region : 'east',
1262       tableName : 'Images',
1263       title : _this._strings['308f2757bfc9ce92fb00ff93fdffd279'] /* Images / Attachments */,
1264       listeners : {
1265        activate : function() {
1266             _this.ipanel = this;
1267             if (_this.igrid) {
1268                _this.igrid.ds.load({});
1269             }
1270         }
1271       },
1272       xns : Roo,
1273       '|xns' : 'Roo',
1274       grid : {
1275        xtype : 'Grid',
1276        autoExpandColumn : 'filename',
1277        loadMask : true,
1278        listeners : {
1279         render : function() 
1280          {
1281              _this.igrid = this; 
1282              //_this.dialog = Pman.Dialog.FILL_IN
1283              if (_this.ipanel.active) {
1284             //    _this.igrid.ds.load({});
1285              }
1286          }
1287        },
1288        xns : Roo.grid,
1289        '|xns' : 'Roo.grid',
1290        toolbar : {
1291         xtype : 'Toolbar',
1292         xns : Roo,
1293         '|xns' : 'Roo',
1294         items  : [
1295          {
1296           xtype : 'Button',
1297           cls : 'x-btn-text-icon',
1298           icon : Roo.rootURL + 'images/default/dd/drop-add.gif',
1299           text : _this._strings['ec211f7c20af43e742bf2570c3cb84f9'] /* Add */,
1300           listeners : {
1301            click : function()
1302             {
1303                 var id = _this.form.findField('id').getValue();
1304                 
1305                 if(id*1 < 1){
1306                     Roo.MessageBox.alert('Error', 'Please save the email template first');
1307                     return;
1308                 }
1309                 
1310                 var ontable = (_this.data.module) ? _this.data.module : 'crm_mailing_list_message';
1311                 
1312                 Pman.Dialog.Image.show( { id : 0, onid: id, ontable: ontable }, function() {
1313                     _this.igrid.getDataSource().load({});
1314                 });
1315             }
1316           },
1317           xns : Roo.Toolbar,
1318           '|xns' : 'Roo.Toolbar'
1319          },
1320          {
1321           xtype : 'Button',
1322           cls : 'x-btn-text-icon',
1323           icon : rootURL + '/Pman/templates/images/trash.gif',
1324           text : _this._strings['f2a6c498fb90ee345d997f888fce3b18'] /* Delete */,
1325           listeners : {
1326            click : function()
1327             {
1328                        Pman.genericDelete({grid: _this.igrid}, 'Images');
1329             }
1330           },
1331           xns : Roo.Toolbar,
1332           '|xns' : 'Roo.Toolbar'
1333          }
1334         ]
1335        },
1336        dataSource : {
1337         xtype : 'Store',
1338         remoteSort : true,
1339         sortInfo : { field : 'filename', direction: 'ASC' },
1340         listeners : {
1341          beforeload : function (_self, options)
1342           {
1343               options.params = options.params || {};
1344               if (typeof(_this.data) == 'undefined') {
1345                   return false;
1346               }
1347               if(_this.data.id * 1 >= 0)
1348               {
1349                   options.params.onid = _this.data.id;
1350           
1351                   options.params.ontable = (_this.data.module) ? _this.data.module : 'crm_mailing_list_message';
1352               }
1353           }
1354         },
1355         xns : Roo.data,
1356         '|xns' : 'Roo.data',
1357         proxy : {
1358          xtype : 'HttpProxy',
1359          method : 'GET',
1360          url : baseURL + '/Roo/Images.php',
1361          xns : Roo.data,
1362          '|xns' : 'Roo.data'
1363         },
1364         reader : {
1365          xtype : 'JsonReader',
1366          fields : [
1367              {
1368                  'name': 'id',
1369                  'type': 'int'
1370              },
1371              {
1372                  'name': 'filename',
1373                  'type': 'string'
1374              },
1375              {
1376                  'name': 'ontable',
1377                  'type': 'string'
1378              },
1379              {
1380                  'name': 'onid',
1381                  'type': 'int'
1382              },
1383              {
1384                  'name': 'mimetype',
1385                  'type': 'string'
1386              },
1387              {
1388                  'name': 'width',
1389                  'type': 'int'
1390              },
1391              {
1392                  'name': 'height',
1393                  'type': 'int'
1394              },
1395              {
1396                  'name': 'filesize',
1397                  'type': 'int'
1398              },
1399              {
1400                  'name': 'displayorder',
1401                  'type': 'int'
1402              },
1403              {
1404                  'name': 'language',
1405                  'type': 'string'
1406              },
1407              {
1408                  'name': 'parent_image_id',
1409                  'type': 'int'
1410              },
1411              {
1412                  'name': 'created',
1413                  'type': 'date',
1414                  'dateFormat': 'Y-m-d'
1415              },
1416              {
1417                  'name': 'imgtype',
1418                  'type': 'string'
1419              },
1420              {
1421                  'name': 'linkurl',
1422                  'type': 'string'
1423              },
1424              {
1425                  'name': 'descript',
1426                  'type': 'string'
1427              },
1428              {
1429                  'name': 'title',
1430                  'type': 'string'
1431              },
1432              {
1433                  'name': 'parent_image_id_id',
1434                  'type': 'int'
1435              },
1436              {
1437                  'name': 'parent_image_id_filename',
1438                  'type': 'string'
1439              },
1440              {
1441                  'name': 'parent_image_id_ontable',
1442                  'type': 'string'
1443              },
1444              {
1445                  'name': 'parent_image_id_onid',
1446                  'type': 'int'
1447              },
1448              {
1449                  'name': 'parent_image_id_mimetype',
1450                  'type': 'string'
1451              },
1452              {
1453                  'name': 'parent_image_id_width',
1454                  'type': 'int'
1455              },
1456              {
1457                  'name': 'parent_image_id_height',
1458                  'type': 'int'
1459              },
1460              {
1461                  'name': 'parent_image_id_filesize',
1462                  'type': 'int'
1463              },
1464              {
1465                  'name': 'parent_image_id_displayorder',
1466                  'type': 'int'
1467              },
1468              {
1469                  'name': 'parent_image_id_language',
1470                  'type': 'string'
1471              },
1472              {
1473                  'name': 'parent_image_id_parent_image_id',
1474                  'type': 'int'
1475              },
1476              {
1477                  'name': 'parent_image_id_created',
1478                  'type': 'date'
1479              },
1480              {
1481                  'name': 'parent_image_id_imgtype',
1482                  'type': 'string'
1483              },
1484              {
1485                  'name': 'parent_image_id_linkurl',
1486                  'type': 'string'
1487              },
1488              {
1489                  'name': 'parent_image_id_descript',
1490                  'type': 'string'
1491              },
1492              {
1493                  'name': 'parent_image_id_title',
1494                  'type': 'string'
1495              }
1496          ],
1497          id : 'id',
1498          root : 'data',
1499          totalProperty : 'total',
1500          xns : Roo.data,
1501          '|xns' : 'Roo.data'
1502         }
1503        },
1504        colModel : [
1505         {
1506          xtype : 'ColumnModel',
1507          dataIndex : 'filename',
1508          header : _this._strings['1351017ac6423911223bc19a8cb7c653'] /* Filename */,
1509          renderer : function(v,x,r)
1510          {
1511              var width = r.data.width;
1512              var height = r.data.height;
1513              
1514              if(width > 50){
1515                  height = Math.round(height * 50 / width);
1516                  width = 50;
1517              }
1518              
1519             return '<img src="' + baseURL + '/Images/' + r.data.id + '/' + r.data.filename + '" width="' + width + '" height="' + height + '" />';
1520          },
1521          width : 300,
1522          xns : Roo.grid,
1523          '|xns' : 'Roo.grid'
1524         },
1525         {
1526          xtype : 'ColumnModel',
1527          dataIndex : 'displayorder',
1528          header : _this._strings['2393ad754ba179442d85e415d1d5167c'] /* Displayorder */,
1529          renderer : function(v) { return String.format('{0}', v); },
1530          width : 75,
1531          xns : Roo.grid,
1532          '|xns' : 'Roo.grid'
1533         },
1534         {
1535          xtype : 'ColumnModel',
1536          dataIndex : 'title',
1537          header : _this._strings['b78a3223503896721cca1303f776159b'] /* Title */,
1538          renderer : function(v) { return String.format('{0}', v); },
1539          width : 75,
1540          xns : Roo.grid,
1541          '|xns' : 'Roo.grid'
1542         }
1543        ]
1544       }
1545      }
1546     ]
1547    });
1548  }
1549 };