sync
[Pman.Admin] / Pman.Tab.AdminNotifySender.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.Tab');
6
7 Pman.Tab.AdminNotifySender = new Roo.XComponent({
8
9  _strings : {
10   'ed93b54403043468c325323b79c676e2' :"Senders",
11   'ce8ae9da5b7cd6c3df2929543a9af92d' :"Email",
12   'ec211f7c20af43e742bf2570c3cb84f9' :"Add",
13   '2ddb157d4780e8883fbde96f354c57d2' :"Displaying Blacklists {0} - {1} of {2}",
14   'c348b06d2667edd048ded3c1b1878cc1' :"Recurrent Notifications",
15   '774ff60df30a64fad1d29f6c2daa8691' :"No Servers found",
16   '2023301a71db57f37d50da7d045b881a' :"Displaying Servers {0} - {1} of {2}",
17   'c5dd93dd1011986763b5925e0af25e08' :"No Blacklists found",
18   'f29ddbfb905eb2593fdcdfb243f9af85' :"Added",
19   'b26686c0a708faee42861d8b905e882e' :"Last Sent",
20   '1203cd27e4d1ab6f1296728c021d9c1a' :"Is Active",
21   'def36b726efed529b13ba240dd331a12' :"Pool",
22   'be6838286e448ad65c5b55d690e2c38b' :"In Queue",
23   '902b0d55fddef6f8d651fe1035b7d4bd' :"Error",
24   'eae639a70006feff484a39363c977e24' :"Domain",
25   'f8981aa743c09c2778adafe34ba52d62' :"Notify Senders",
26   '1063e38cb53d94d386f21227fcd84717' :"Remove"
27  },
28
29   part     :  ["Admin", "NotifySender" ],
30   order    : '910-Pman.Tab.AdminNotifySender',
31   region   : 'center',
32   parent   : 'Pman.Tab.AdminWatchNotify',
33   name     : "unnamed module",
34   disabled : false, 
35   permname : '', 
36   _tree : function(_data)
37   {
38    var _this = this;
39    var MODULE = this;
40    return {
41    xtype : 'NestedLayoutPanel',
42    background : true,
43    region : 'center',
44    title : _this._strings['f8981aa743c09c2778adafe34ba52d62'] /* Notify Senders */,
45    xns : Roo,
46    '|xns' : 'Roo',
47    layout : {
48     xtype : 'BorderLayout',
49     xns : Roo,
50     '|xns' : 'Roo',
51     center : {
52      xtype : 'LayoutRegion',
53      xns : Roo,
54      '|xns' : 'Roo'
55     },
56     south : {
57      xtype : 'LayoutRegion',
58      height : 200,
59      split : true,
60      xns : Roo,
61      '|xns' : 'Roo'
62     },
63     items  : [
64      {
65       xtype : 'GridPanel',
66       background : true,
67       fitContainer : true,
68       fitToframe : true,
69       region : 'center',
70       tableName : 'core_notify_sender',
71       title : _this._strings['ed93b54403043468c325323b79c676e2'] /* Senders */,
72       listeners : {
73        activate : function() {
74             _this.spanel = this;
75             if (_this.sgrid) {
76                 _this.sgrid.footer.onClick('first');
77             }
78         }
79       },
80       xns : Roo,
81       '|xns' : 'Roo',
82       grid : {
83        xtype : 'Grid',
84        autoExpandColumn : 'email',
85        loadMask : true,
86        listeners : {
87         render : function() 
88          {
89              _this.sgrid = this; 
90              //_this.dialog = Pman.Dialog.FILL_IN
91              if (_this.spanel.active) {
92                 this.footer.onClick('first');
93              }
94          },
95         rowclick : function (_self, rowIndex, e)
96          {
97              (function() { 
98                  _this.bgrid.footer.onClick('first');
99              }).defer(100);
100          },
101         rowdblclick : function (_self, rowIndex, e)
102          {
103              
104              Pman.Dialog.AdminNotifySender.show(
105                   this.getDataSource().getAt(rowIndex).data, function() {
106                  _this.sgrid.footer.onClick('first');
107              }); 
108          }
109        },
110        xns : Roo.grid,
111        '|xns' : 'Roo.grid',
112        footer : {
113         xtype : 'PagingToolbar',
114         displayInfo : true,
115         displayMsg : _this._strings['2023301a71db57f37d50da7d045b881a'] /* Displaying Servers {0} - {1} of {2} */,
116         emptyMsg : _this._strings['774ff60df30a64fad1d29f6c2daa8691'] /* No Servers found */,
117         pageSize : 25,
118         xns : Roo,
119         '|xns' : 'Roo'
120        },
121        toolbar : {
122         xtype : 'Toolbar',
123         xns : Roo,
124         '|xns' : 'Roo',
125         items  : [
126          {
127           xtype : 'Button',
128           text : _this._strings['ec211f7c20af43e742bf2570c3cb84f9'] /* Add */,
129           listeners : {
130            click : function() 
131             {
132                 Pman.Dialog.AdminNotifySender.show(
133                      {}, function() {
134                     _this.sgrid.footer.onClick('first');
135                 }); 
136             }
137           },
138           xns : Roo.Toolbar,
139           '|xns' : 'Roo.Toolbar'
140          },
141          {
142           xtype : 'Fill',
143           xns : Roo.Toolbar,
144           '|xns' : 'Roo.Toolbar'
145          },
146          {
147           xtype : 'Button',
148           text : _this._strings['1063e38cb53d94d386f21227fcd84717'] /* Remove */,
149           listeners : {
150            click : function (_self, e)
151             {
152                    Pman.genericDelete(_this.spanel, 'core_notify_sender');
153             }
154           },
155           xns : Roo.Toolbar,
156           '|xns' : 'Roo.Toolbar'
157          }
158         ]
159        },
160        dataSource : {
161         xtype : 'Store',
162         remoteSort : true,
163         sortInfo : { field : 'email', direction: 'ASC' },
164         listeners : {
165          beforeload : function (_self, options)
166           {
167              options.params._with_queue_size  =1 ;
168               
169           }
170         },
171         xns : Roo.data,
172         '|xns' : 'Roo.data',
173         proxy : {
174          xtype : 'HttpProxy',
175          method : 'GET',
176          url : baseURL + '/Roo/core_notify_sender',
177          xns : Roo.data,
178          '|xns' : 'Roo.data'
179         },
180         reader : {
181          xtype : 'JsonReader',
182          id : 'id',
183          root : 'data',
184          totalProperty : 'total',
185          xns : Roo.data,
186          '|xns' : 'Roo.data'
187         }
188        },
189        colModel : [
190         {
191          xtype : 'ColumnModel',
192          dataIndex : 'is_active',
193          header : _this._strings['1203cd27e4d1ab6f1296728c021d9c1a'] /* Is Active */,
194          renderer : function(v) {
195              var state = v> 0 ?  '-checked' : '';
196          
197              return '<img class="x-grid-check-icon' + state + '" src="' + Roo.BLANK_IMAGE_URL + '"/>';
198          },
199          width : 100,
200          xns : Roo.grid,
201          '|xns' : 'Roo.grid'
202         },
203         {
204          xtype : 'ColumnModel',
205          dataIndex : 'email',
206          header : _this._strings['ce8ae9da5b7cd6c3df2929543a9af92d'] /* Email */,
207          width : 150,
208          xns : Roo.grid,
209          '|xns' : 'Roo.grid'
210         },
211         {
212          xtype : 'ColumnModel',
213          dataIndex : 'poolname',
214          header : _this._strings['def36b726efed529b13ba240dd331a12'] /* Pool */,
215          width : 150,
216          xns : Roo.grid,
217          '|xns' : 'Roo.grid'
218         },
219         {
220          xtype : 'ColumnModel',
221          dataIndex : 'in_queue',
222          header : _this._strings['be6838286e448ad65c5b55d690e2c38b'] /* In Queue */,
223          renderer : function(v,x,r) {
224          
225              return r.data.in_queue || 0;
226          },
227          width : 150,
228          xns : Roo.grid,
229          '|xns' : 'Roo.grid'
230         },
231         {
232          xtype : 'ColumnModel',
233          dataIndex : 'last_send',
234          header : _this._strings['b26686c0a708faee42861d8b905e882e'] /* Last Sent */,
235          renderer : function(v) { return String.format('{0}', v ? v.format('d/M/Y  H:i:s') : ''); },
236          width : 120,
237          xns : Roo.grid,
238          '|xns' : 'Roo.grid'
239         }
240        ]
241       }
242      },
243      {
244       xtype : 'GridPanel',
245       background : true,
246       fitContainer : true,
247       fitToframe : true,
248       region : 'south',
249       tableName : 'core_notify_recur',
250       title : _this._strings['c348b06d2667edd048ded3c1b1878cc1'] /* Recurrent Notifications */,
251       listeners : {
252        activate : function() {
253             _this.bpanel = this;
254            
255         }
256       },
257       xns : Roo,
258       '|xns' : 'Roo',
259       grid : {
260        xtype : 'Grid',
261        autoExpandColumn : 'error_msg',
262        loadMask : true,
263        listeners : {
264         render : function() 
265          {
266              _this.bgrid = this; 
267              //_this.dialog = Pman.Dialog.FILL_IN
268              
269          }
270        },
271        xns : Roo.grid,
272        '|xns' : 'Roo.grid',
273        footer : {
274         xtype : 'PagingToolbar',
275         displayInfo : true,
276         displayMsg : _this._strings['2ddb157d4780e8883fbde96f354c57d2'] /* Displaying Blacklists {0} - {1} of {2} */,
277         emptyMsg : _this._strings['c5dd93dd1011986763b5925e0af25e08'] /* No Blacklists found */,
278         pageSize : 25,
279         xns : Roo,
280         '|xns' : 'Roo'
281        },
282        toolbar : {
283         xtype : 'Toolbar',
284         xns : Roo,
285         '|xns' : 'Roo',
286         items  : [
287          {
288           xtype : 'Fill',
289           xns : Roo.Toolbar,
290           '|xns' : 'Roo.Toolbar'
291          },
292          {
293           xtype : 'Button',
294           text : _this._strings['1063e38cb53d94d386f21227fcd84717'] /* Remove */,
295           xns : Roo.Toolbar,
296           '|xns' : 'Roo.Toolbar'
297          }
298         ]
299        },
300        dataSource : {
301         xtype : 'Store',
302         remoteSort : true,
303         sortInfo : { field : 'person_id_name', direction: 'ASC' },
304         listeners : {
305          beforeload : function (_self, opts)
306           {
307               if(!_this.sgrid.getSelectionModel().getSelected()) {
308                   return false;
309               }
310               
311               opts.params.sender_id =    _this.sgrid.getSelectionModel().getSelected().data.id;
312           }
313         },
314         xns : Roo.data,
315         '|xns' : 'Roo.data',
316         proxy : {
317          xtype : 'HttpProxy',
318          method : 'GET',
319          url : baseURL + '/Roo/core_notify_sender_blacklist',
320          xns : Roo.data,
321          '|xns' : 'Roo.data'
322         },
323         reader : {
324          xtype : 'JsonReader',
325          id : 'id',
326          root : 'data',
327          totalProperty : 'total',
328          xns : Roo.data,
329          '|xns' : 'Roo.data'
330         }
331        },
332        colModel : [
333         {
334          xtype : 'ColumnModel',
335          dataIndex : 'added_dt',
336          header : _this._strings['f29ddbfb905eb2593fdcdfb243f9af85'] /* Added */,
337          renderer : function(v) { return String.format('{0}', v ? v.format('d/M/Y H:i:s') : ''); },
338          width : 120,
339          xns : Roo.grid,
340          '|xns' : 'Roo.grid'
341         },
342         {
343          xtype : 'ColumnModel',
344          dataIndex : 'domain_id_domain',
345          header : _this._strings['eae639a70006feff484a39363c977e24'] /* Domain */,
346          width : 150,
347          xns : Roo.grid,
348          '|xns' : 'Roo.grid'
349         },
350         {
351          xtype : 'ColumnModel',
352          dataIndex : 'error_str',
353          header : _this._strings['902b0d55fddef6f8d651fe1035b7d4bd'] /* Error */,
354          width : 150,
355          xns : Roo.grid,
356          '|xns' : 'Roo.grid'
357         }
358        ]
359       }
360      }
361     ]
362    }
363   };  }
364 });