2 "name" : "Pman.Tab.BAdminEmailTemplates",
3 "parent" : "Pman.Tab.BAdmin",
4 "title" : "Pman.Tab.BAdminEmailTemplates",
5 "path" : "/home/khlau/gitlive/Pman.BAdmin/Pman.Tab.BAdminEmailTemplates.bjs",
9 "cdb6b6bab1fd18b9dbfe3fb84a5d34ae" : "<i class=\"fa fa-search\"></i>",
10 "cae905999a2ad1dfb8f4eae0e8cda73b" : "From Name<br/>Email",
11 "98d2ee61ddce0c7666297d81639914f1" : "To / BCC Group",
12 "73ea6b4441cdced246d236b22c8f991c" : "HTML File",
13 "694e249c3a9503141fa5ce3fb71d5477" : "<i class=\"fa fa-edit\"></i> Edit",
14 "cffbd822c38679e2fbf11cc182c945e5" : "search for email template",
15 "b78a3223503896721cca1303f776159b" : "Title",
16 "68b00d723d37122f64da8d9939f836f0" : "BCC Group",
17 "9e11143e29a031212f2cdefcf61f39e9" : "View Message",
18 "f49559cda3fb906fbd7736f8b8a0e37d" : "Email Template",
19 "27a7146e1e1890e289bc7fad72876831" : "<i class=\"fa fa-plus\"></i> Create a template",
20 "cd6df251f262cc64514b25f04aecf3c8" : "<i class=\"fa fa-clipboard\"></i> Copy",
21 "ed807858fcb68abdd180481f1fcba5c5" : "<i class=\"fa fa-trash\"></i> Delete",
22 "03c2e7e41ffc181a4e84080b4710e81e" : "New",
23 "49ee3087348e8d44e1feda1917443987" : "Name",
24 "e6b391a8d2c4d45902a23a8b6585703d" : "URL"
29 "$ xns" : "Roo.bootstrap.panel",
30 "String title" : "Email Template",
31 "Boolean background" : true,
35 "$ xns" : "Roo.bootstrap.layout",
39 "String tabPosition" : "top",
40 "Boolean hideTabs" : true,
42 "$ xns" : "Roo.bootstrap.layout",
46 "Boolean titlebar" : true,
47 "String tabPosition" : "top",
49 "Boolean hideTabs" : true,
50 "Number height" : 200,
51 "$ xns" : "Roo.bootstrap.layout",
52 "Boolean autoScroll" : true,
54 "Boolean split" : true
58 "activate" : "function (_self)\n{\n _this.edit_btn.hide();\n _this.copy_btn.hide();\n _this.delete_btn.hide();\n \n if (_this.table) {\n _this.table.footer.onClick('first');\n }\n \n}",
59 "render" : "function (_self)\n{\n _this.grid = this;\n}"
61 "Boolean fitContainer" : true,
63 "Boolean fitToFrame" : true,
64 "$ xns" : "Roo.bootstrap.panel",
65 "String region" : "center",
66 "Boolean background" : false,
67 "Boolean closable" : false,
70 "xtype" : "NavSimplebar",
71 "$ xns" : "Roo.bootstrap",
76 "$ xns" : "Roo.bootstrap",
80 "$ xns" : "Roo.bootstrap",
84 "$ xns" : "Roo.bootstrap",
87 "String cls" : "roo-toolbar",
89 "$ xns" : "Roo.bootstrap",
94 "$ xns" : "Roo.bootstrap",
98 "specialkey" : "function (_self, e)\n{\n _this.table.footer.onClick('first');\n}",
99 "render" : "function (_self)\n{\n _this.searchBox = this;\n}"
102 "string placeholder" : "search for email template",
103 "$ xns" : "Roo.bootstrap",
107 "click" : "function (_self, e)\n{\n _this.table.footer.onClick('first');\n}"
110 "$ xns" : "Roo.bootstrap",
111 "String html" : "<i class=\"fa fa-search\"></i>",
121 "$ xns" : "Roo.bootstrap",
122 "String style" : "text-align: right;",
125 "String cls" : "roo-toolbar-button",
127 "$ xns" : "Roo.bootstrap",
128 "String html" : "<i class=\"fa fa-plus\"></i> Create a template",
132 "$ xns" : "Roo.bootstrap",
137 "click" : "function (_self, e)\n{\n if (!_this.dialog) {\n return;\n }\n \n _this.dialog.show( { id : 0, module : 'core_email' } , function() {\n _this.table.footer.onClick('first');\n });\n}"
139 "xtype" : "MenuItem",
140 "String fa" : "file-o",
141 "$ xns" : "Roo.bootstrap",
142 "String html" : "New"
146 "click" : "function (_self, e)\n{\n Pman.Dialog.BAdminImportUrl.show(\n {\n target : '/Core/ImportMailMessage.php'\n },\n \n function(data) {\n if (data) {\n Pman.Dialog.BAdminEmail.dialog.show();\n Pman.Dialog.BAdminEmail.form.findField('bodytext').setValue(data);\n }\n }\n );\n}"
148 "xtype" : "MenuItem",
149 "String fa" : "link",
150 "$ xns" : "Roo.bootstrap",
151 "String html" : "URL"
155 "click" : "function (_self, e)\n{\n Pman.Dialog.BAdminImage.show(\n {\n _url : '/Core/ImportMailMessage.php'\n },\n \n function(data) {\n if (data) {\n Pman.Dialog.BAdminEmail.dialog.show();\n Pman.Dialog.BAdminEmail.form.findField('bodytext').setValue(data);\n }\n }\n );\n}"
157 "xtype" : "MenuItem",
158 "String fa" : "code",
159 "$ xns" : "Roo.bootstrap",
160 "String html" : "HTML File"
168 "render" : "function (_self)\n{\n _this.edit_btn = this;\n \n this.hide();\n}",
169 "click" : "function (_self, e)\n{\n var sel = _this.grid.grid.selModel.getSelected();\n \n if (!sel || sel.data.id * 1 < 1) {\n Roo.MessageBox.alert(\"Error\", \"Select a message to edit\");\n return;\n }\n \n Pman.Dialog.BAdminEmail.show( {id : sel.data.id, module : 'core_email'} , function() {\n _this.table.footer.onClick('first');\n }); \n}"
171 "String cls" : "roo-toolbar-button",
173 "$ xns" : "Roo.bootstrap",
174 "String html" : "<i class=\"fa fa-edit\"></i> Edit"
178 "render" : "function (_self)\n{\n _this.copy_btn = this;\n \n this.hide();\n}",
179 "click" : "function (_self, e)\n{\n var sel = _this.grid.grid.selModel.getSelected();\n if (!sel) {\n Roo.MessageBox.alert(\"Error\", \"Select a message to copy\");\n return;\n }\n new Pman.Request({\n url : baseURL + '/Roo/Core_email',\n method : 'POST',\n params : {\n id : sel.data.id,\n _make_copy : 1\n },\n success : function() {\n _this.table.footer.onClick('refresh');\n }\n });\n}"
181 "String cls" : "roo-toolbar-button",
183 "$ xns" : "Roo.bootstrap",
184 "String html" : "<i class=\"fa fa-clipboard\"></i> Copy"
188 "render" : "function (_self)\n{\n _this.delete_btn = this;\n \n this.hide();\n}",
189 "click" : "function (_self, e)\n{\n Pman.genericDelete(_this.grid, 'core_email');\n}"
191 "String cls" : "roo-toolbar-button",
192 "String weight" : "primary",
194 "$ xns" : "Roo.bootstrap",
195 "String html" : "<i class=\"fa fa-trash\"></i> Delete"
211 "rowdblclick" : "function (_self, el, rowIndex, e)\n{\n if (!_this.dialog) {\n return;\n }\n \n //var data = this.getDataSource().getAt(rowIndex).data;\n var data = _this.table.store.getAt(rowIndex).data;\n \n _this.dialog.show( {id : data.id, module : 'core_email'} , function() {\n \n _this.table.footer.onClick('first');\n }); \n}",
212 "render" : "function (_self)\n{\n \n _this.table = this;\n \n _this.dialog = Pman.Dialog.BAdminEmail;\n}"
214 "boolean hover" : true,
216 "boolean responsive" : true,
217 "Boolean rowSelection" : true,
218 "$ xns" : "Roo.bootstrap",
219 "Boolean loadMask" : true,
224 "afterselectionchange" : "function (_self)\n{\n _this.edit_btn.hide();\n _this.copy_btn.hide();\n _this.delete_btn.hide();\n \n if (!this.getSelected()) {\n _this.viewPanel.setContent(\"Nothing Selected\");\n return;\n }\n \n if(this.getSelected().data) {\n _this.viewPanel.setContent(this.getSelected().data.bodytext);\n }\n \n _this.edit_btn.show();\n _this.copy_btn.show();\n _this.delete_btn.show();\n \n}"
226 "Boolean singleSelect" : true,
227 "xtype" : "RowSelectionModel",
228 "$ xns" : "Roo.bootstrap.Table",
233 "beforeload" : "function (_self, options)\n{\n options.params = options.params || {};\n \n var s = _this.searchBox.getValue();\n \n if(s.length){\n options.params['search[nameortitle]'] = s;\n }\n\n}",
234 "load" : "function (_self, records, options)\n{\n _this.edit_btn.hide();\n _this.copy_btn.hide();\n _this.delete_btn.hide();\n}"
237 "boolean remoteSort" : true,
238 "$ xns" : "Roo.data",
239 "$ sortInfo" : "{field:'name',direction:'ASC'} ",
243 "xtype" : "HttpProxy",
244 "$ xns" : "Roo.data",
245 "String method" : "GET",
247 "$ String url" : "baseURL+'/Roo/Core_email.php'"
250 "$ Array fields" : "[\n {\n \"name\":\"name\",\n \"type\":\"string\"\n },\n {\n \"name\":\"subject\",\n \"type\":\"string\"\n }\n]",
251 "xtype" : "JsonReader",
252 "String root" : "data",
253 "$ xns" : "Roo.data",
256 "String totalProperty" : "total"
261 "Number pageSize" : 25,
262 "Boolean displayInfo" : true,
263 "xtype" : "PagingToolbar",
264 "$ xns" : "Roo.bootstrap",
268 "String cursor" : "pointer",
269 "xtype" : "ColumnModel",
272 "$ renderer" : "function(v,x,r) \n{ \n if(r.data.active * 1 < 1){\n \n return String.format('<span style=\"font-size:12px;\"><s>{0}</s><span>', v ? v : ''); \n \n }\n \n return String.format('<span style=\"font-size:12px;\">{0}<span>', v ? v : ''); \n}",
273 "$ xns" : "Roo.grid",
274 "Boolean sortable" : true,
279 "String cursor" : "pointer",
280 "xtype" : "ColumnModel",
283 "$ renderer" : "function(v,x,r) \n{ \n if(r.data.active * 1 < 1){\n return String.format('<span style=\"font-size:12px;\"><s>{0}</s></span>', v ? v : ''); \n }\n \n return String.format('<span style=\"font-size:12px;\">{0}</span>', v ? v : ''); \n}",
284 "$ xns" : "Roo.grid",
285 "Boolean sortable" : true,
287 "dataIndex" : "subject"
290 "String cursor" : "pointer",
291 "xtype" : "ColumnModel",
293 "header" : "From Name<br/>Email",
294 "$ renderer" : "function(v,x,r)\n{\n var from_name = r.data.from_name ? r.data.from_name : '';\n var from_email = r.data.from_email ? r.data.from_email : '';\n \n //var r = from_name + '<br>' + from_email ;\n if(from_name =='') {\n return String.format('<span style=\"font-size:12px;\">{0}</span>', from_email);\n }\n return String.format('<span style=\"font-size:12px;\">{0} <br> {1}</span>', from_name, from_email);\n \n /*\n return String.format(\n '{0}'+'<'+'{1}'+'>',\n r.data.from_name ? r.data.from_name : '',\n r.data.from_email ? r.data.from_email : ''\n );\n */\n}",
295 "$ xns" : "Roo.grid",
297 "dataIndex" : "from_email"
300 "String cursor" : "pointer",
301 "xtype" : "ColumnModel",
303 "header" : "To / BCC Group",
304 "$ renderer" : "function(v,x,r)\n{ \n if(\n (r.data.group_member_count * 1 < 1 && r.data.to_group_name !='') ||\n (r.data.bcc_group_member_count * 1 < 1 && r.data.bcc_group_name !='') \n ){\n \n var grp_str = String.format('<span style=\"font-size:12px;\">To: {0} <br>',r.data.to_group_name);\n \n if(r.data.group_member_count * 1 < 1 ){\n grp_str = String.format('<span style=\"font-size:12px;\">To: {0} <span class=\"text-danger\">(0)</span></span> <br>',r.data.to_group_name);\n }\n\n var bcc_str = String.format('<span style=\"font-size:12px;\">BCC: {0} </span>',r.data.bcc_group_name);\n \n if(r.data.bcc_group_member_count * 1 < 1 ){\n bcc_str = String.format('<span style=\"font-size:12px;\">BCC: {0} <span class=\"text-danger\">(0)</span></span>',r.data.bcc_group_name);\n }\n\n return grp_str + bcc_str;\n }\n if(r.data.to_group_name ==''){\n return String.format('<span style=\"font-size:12px;\">BCC: {0}</span>', r.data.bcc_group_name ); \n }\n\n return String.format('<span style=\"font-size:12px;\">To: {0} <br>BCC: {1}</span>', r.data.to_group_name,r.data.bcc_group_name ); \n}",
305 "$ xns" : "Roo.grid",
307 "dataIndex" : "to_group_name"
310 "String cursor" : "pointer",
311 "xtype" : "ColumnModel",
313 "header" : "BCC Group",
314 "$ renderer" : "function(v) { return String.format('{0}', v ? v : ''); }",
315 "$ xns" : "Roo.grid",
317 "Boolean hidden" : true,
318 "dataIndex" : "bcc_group_name"
326 "render" : "function (_self)\n{\n _this.viewPanel = this;\n}"
329 "Boolean fitToFrame" : true,
330 "$ xns" : "Roo.bootstrap.panel",
331 "String region" : "south",
332 "String title" : "View Message"