2 "name" : "Pman.Tab.BAdminEmailTemplates",
3 "parent" : "Pman.Tab.BAdmin",
4 "title" : "Pman.Tab.BAdminEmailTemplates",
5 "path" : "/home/edward/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 "9e11143e29a031212f2cdefcf61f39e9" : "View Message",
16 "f49559cda3fb906fbd7736f8b8a0e37d" : "Email Template",
17 "27a7146e1e1890e289bc7fad72876831" : "<i class=\"fa fa-plus\"></i> Create a template",
18 "cd6df251f262cc64514b25f04aecf3c8" : "<i class=\"fa fa-clipboard\"></i> Copy",
19 "ed807858fcb68abdd180481f1fcba5c5" : "<i class=\"fa fa-trash\"></i> Delete",
20 "03c2e7e41ffc181a4e84080b4710e81e" : "New",
21 "4d3d769b812b6faa6b76e1a8abaece2d" : "Active",
22 "b5a7adde1af5c87d7fd797b6245c2a39" : "Description",
23 "e6b391a8d2c4d45902a23a8b6585703d" : "URL"
28 "$ xns" : "Roo.bootstrap.panel",
29 "String title" : "Email Template",
30 "Boolean background" : true,
34 "$ xns" : "Roo.bootstrap.layout",
38 "String tabPosition" : "top",
39 "Boolean hideTabs" : true,
41 "$ xns" : "Roo.bootstrap.layout",
45 "Boolean titlebar" : true,
46 "String tabPosition" : "top",
48 "Boolean hideTabs" : true,
49 "Number height" : 200,
50 "$ xns" : "Roo.bootstrap.layout",
51 "Boolean autoScroll" : true,
53 "Boolean split" : true
57 "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}",
58 "render" : "function (_self)\n{\n _this.grid = this;\n}"
60 "Boolean fitContainer" : true,
62 "Boolean fitToFrame" : true,
63 "$ xns" : "Roo.bootstrap.panel",
64 "String region" : "center",
65 "Boolean background" : false,
66 "Boolean closable" : false,
69 "xtype" : "NavSimplebar",
70 "$ xns" : "Roo.bootstrap",
75 "$ xns" : "Roo.bootstrap",
79 "$ xns" : "Roo.bootstrap",
83 "$ xns" : "Roo.bootstrap",
86 "String cls" : "roo-toolbar",
88 "$ xns" : "Roo.bootstrap",
93 "$ xns" : "Roo.bootstrap",
97 "specialkey" : "function (_self, e)\n{ \n if(e.keyCode == e.ENTER) {\n if (_this.table) {\n _this.table.footer.onClick('first'); \n }\n \n }\n \n}",
98 "render" : "function (_self)\n{\n _this.searchBox = this;\n}"
101 "string placeholder" : "search for email template",
102 "$ xns" : "Roo.bootstrap",
106 "click" : "function (_self, e)\n{\n _this.table.footer.onClick('first');\n}"
109 "$ xns" : "Roo.bootstrap",
110 "String html" : "<i class=\"fa fa-search\"></i>",
120 "$ xns" : "Roo.bootstrap",
121 "String style" : "text-align: right;",
124 "String cls" : "roo-toolbar-button",
126 "$ xns" : "Roo.bootstrap",
127 "String html" : "<i class=\"fa fa-plus\"></i> Create a template",
131 "$ xns" : "Roo.bootstrap",
136 "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}"
138 "xtype" : "MenuItem",
139 "String fa" : "file-o",
140 "$ xns" : "Roo.bootstrap",
141 "String html" : "New"
145 "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}"
147 "xtype" : "MenuItem",
148 "String fa" : "link",
149 "$ xns" : "Roo.bootstrap",
150 "String html" : "URL"
154 "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}"
156 "xtype" : "MenuItem",
157 "String fa" : "code",
158 "$ xns" : "Roo.bootstrap",
159 "String html" : "HTML File"
167 "render" : "function (_self)\n{\n _this.edit_btn = this;\n \n this.hide();\n}",
168 "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}"
170 "String cls" : "roo-toolbar-button",
172 "$ xns" : "Roo.bootstrap",
173 "String html" : "<i class=\"fa fa-edit\"></i> Edit"
177 "render" : "function (_self)\n{\n _this.copy_btn = this;\n \n this.hide();\n}",
178 "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}"
180 "String cls" : "roo-toolbar-button",
182 "$ xns" : "Roo.bootstrap",
183 "String html" : "<i class=\"fa fa-clipboard\"></i> Copy"
187 "render" : "function (_self)\n{\n _this.delete_btn = this;\n \n this.hide();\n}",
188 "click" : "function (_self, e)\n{\n Pman.genericDelete(_this.grid, 'core_email');\n}"
190 "String cls" : "roo-toolbar-button",
191 "String weight" : "primary",
193 "$ xns" : "Roo.bootstrap",
194 "String html" : "<i class=\"fa fa-trash\"></i> Delete"
210 "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}",
211 "render" : "function (_self)\n{\n \n _this.table = this;\n \n _this.dialog = Pman.Dialog.BAdminEmail;\n}",
212 "rowclick" : "function (_self, el, rowIndex, e)\n{\n \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 if (!Pman.buildCompleted) {\n return false;\n }\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:'description',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 {\n \"name\":\"description\",\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 header" : "Active",
269 "String cursor" : "pointer",
270 "String dataIndex" : "active",
271 "xtype" : "ColumnModel",
273 "String align" : "center",
274 "$ xns" : "Roo.grid",
275 "$ renderer" : "function(v) { \n\n var state = v > 0 ? 'check-' : '';\n var cls = v > 0 ? 'text-primary' : '';\n \n return '<i class=\\\"far fa-'+ state + 'square-o ' + cls + '\\\" aria-hidden=\\\"true\\\"></i>';\n \n }",
276 "Boolean sortable" : true,
280 "String cursor" : "pointer",
281 "xtype" : "ColumnModel",
283 "header" : "Description",
284 "$ renderer" : "function(v,x,r) \n{ \n vv = (v.length) ? v : r.data.name;\n \n if(r.data.active * 1 < 1){\n return '<small style=\"color: #999;\">' + vv + '</small>';\n }\n \n return '<b>' + vv + '</b>';\n}",
285 "$ xns" : "Roo.grid",
286 "Boolean sortable" : true,
288 "dataIndex" : "description"
291 "String cursor" : "pointer",
292 "xtype" : "ColumnModel",
294 "header" : "From Name<br/>Email",
295 "$ renderer" : "function(v,x,r)\n{\n if(r.data.active * 1 < 1){\n return '';\n }\n \n return String.format('<small>{0}</small>', r.data.from_name );\n \n}",
296 "$ xns" : "Roo.grid",
298 "dataIndex" : "from_email"
301 "String cursor" : "pointer",
302 "xtype" : "ColumnModel",
304 "header" : "To / BCC Group",
305 "$ renderer" : "function(v,x,r)\n{ \n if(r.data.active * 1 < 1){\n return '';\n }\n \n var nid = r.data.to_group_id * 1 ;\n var n = nid > 0 ? r.data.group_member_count * 1 : 0;\n var grp_str = String.format('<small>To: {0} ' + \n '<span class=\"badge' + (n > 0 ? '' : ' badge-danger') + '\">{1}</span></small><br>',\n r.data.to_group_id_name,\n nid < 1 ? 'Not set' : n\n );\n \n if (nid < 0) { // no To needed..\n grp_str = '';\n }\n nid = r.data.bcc_group_id * 1;\n n = nid > 0 ? r.data.bcc_group_member_count * 1 : 0;\n\n var bcc_str = String.format('<small>BCC: {0} <span class=\"badge' + (n > 0 ? '' : ' badge-danger') + '\">{1}</span></small>',\n r.data.bcc_group_id_name,\n nid < 1 ? 'Not set' : n\n );\n \n if (nid < 0) { // no To needed..\n bcc_str = '';\n } \n \n return grp_str + bcc_str;\n}",
306 "$ xns" : "Roo.grid",
308 "dataIndex" : "to_group_name"
316 "render" : "function (_self)\n{\n _this.viewPanel = this;\n}"
319 "Boolean fitToFrame" : true,
320 "$ xns" : "Roo.bootstrap.panel",
321 "String region" : "south",
322 "String title" : "View Message"