From 121900fa24896bc988531ffd7855226eb6b83b8f Mon Sep 17 00:00:00 2001 From: Alan Date: Thu, 2 Nov 2023 15:59:34 +0800 Subject: [PATCH] sync --- Pman.Tab.AdminNotifySender.bjs | 380 +++++++++++++++++++++++++++++++++ Pman.Tab.AdminNotifySender.js | 364 +++++++++++++++++++++++++++++++ 2 files changed, 744 insertions(+) create mode 100644 Pman.Tab.AdminNotifySender.bjs create mode 100644 Pman.Tab.AdminNotifySender.js diff --git a/Pman.Tab.AdminNotifySender.bjs b/Pman.Tab.AdminNotifySender.bjs new file mode 100644 index 0000000..7fbf623 --- /dev/null +++ b/Pman.Tab.AdminNotifySender.bjs @@ -0,0 +1,380 @@ +{ + "items" : [ + { + "$ xns" : "Roo", + "Boolean background" : true, + "String region" : "center", + "String title" : "Notify Senders", + "items" : [ + { + "$ xns" : "Roo", + "* prop" : "layout", + "items" : [ + { + "$ xns" : "Roo", + "* prop" : "south", + "Boolean split" : true, + "Number height" : 200, + "xtype" : "LayoutRegion" + }, + { + "$ xns" : "Roo", + "* prop" : "center", + "xtype" : "LayoutRegion" + }, + { + "$ xns" : "Roo", + "Boolean background" : true, + "fitContainer" : true, + "fitToframe" : true, + "items" : [ + { + "$ xns" : "Roo.grid", + "* prop" : "grid", + "autoExpandColumn" : "email", + "items" : [ + { + "$ xns" : "Roo", + "* prop" : "toolbar", + "items" : [ + { + "$ xns" : "Roo.Toolbar", + "String text" : "Add", + "listeners" : { + "click" : [ + "function() ", + "{", + " Pman.Dialog.AdminNotifySender.show(", + " {}, function() {", + " _this.sgrid.footer.onClick('first');", + " }); ", + "}" + ] + }, + "xtype" : "Button" + }, + { + "$ xns" : "Roo.Toolbar", + "xtype" : "Fill" + }, + { + "$ xns" : "Roo.Toolbar", + "String text" : "Remove", + "listeners" : { + "click" : [ + "function (_self, e)", + "{", + " Pman.genericDelete(_this.spanel, 'core_notify_sender');", + "}" + ] + }, + "xtype" : "Button" + } + ], + "xtype" : "Toolbar" + }, + { + "$ sortInfo" : "{ field : 'email', direction: 'ASC' }", + "$ xns" : "Roo.data", + "* prop" : "dataSource", + "items" : [ + { + "$ url" : "baseURL + '/Roo/core_notify_sender'", + "$ xns" : "Roo.data", + "* prop" : "proxy", + "method" : "GET", + "xtype" : "HttpProxy" + }, + { + "$ xns" : "Roo.data", + "* prop" : "reader", + "id" : "id", + "root" : "data", + "totalProperty" : "total", + "xtype" : "JsonReader" + } + ], + "listeners" : { + "beforeload" : [ + "function (_self, options)", + "{", + " options.params._with_queue_size =1 ;", + " ", + "}" + ] + }, + "remoteSort" : true, + "xtype" : "Store" + }, + { + "$ xns" : "Roo", + "* prop" : "footer", + "displayInfo" : true, + "displayMsg" : "Displaying Servers {0} - {1} of {2}", + "emptyMsg" : "No Servers found", + "pageSize" : 25, + "xtype" : "PagingToolbar" + }, + { + "$ renderer" : [ + "function(v) {", + " var state = v> 0 ? '-checked' : '';", + "", + " return '';", + "}" + ], + "$ xns" : "Roo.grid", + "* prop" : "colModel[]", + "dataIndex" : "is_active", + "header" : "Is Active", + "width" : 100, + "xtype" : "ColumnModel" + }, + { + "$ xns" : "Roo.grid", + "* prop" : "colModel[]", + "dataIndex" : "email", + "header" : "Email", + "width" : 150, + "xtype" : "ColumnModel" + }, + { + "$ xns" : "Roo.grid", + "* prop" : "colModel[]", + "dataIndex" : "poolname", + "header" : "Pool", + "width" : 150, + "xtype" : "ColumnModel" + }, + { + "$ Function renderer" : [ + "function(v,x,r) {", + "", + " return r.data.in_queue || 0;", + "}" + ], + "$ xns" : "Roo.grid", + "* prop" : "colModel[]", + "dataIndex" : "in_queue", + "header" : "In Queue", + "width" : 150, + "xtype" : "ColumnModel" + }, + { + "$ renderer" : "function(v) { return String.format('{0}', v ? v.format('d/M/Y H:i:s') : ''); }", + "$ xns" : "Roo.grid", + "* prop" : "colModel[]", + "dataIndex" : "last_send", + "header" : "Last Sent", + "width" : 120, + "xtype" : "ColumnModel" + } + ], + "listeners" : { + "rowclick" : [ + "function (_self, rowIndex, e)", + "{", + " (function() { ", + " _this.bgrid.footer.onClick('first');", + " }).defer(100);", + "}" + ], + "|render" : [ + "function() ", + "{", + " _this.sgrid = this; ", + " //_this.dialog = Pman.Dialog.FILL_IN", + " if (_this.spanel.active) {", + " this.footer.onClick('first');", + " }", + "}" + ], + "|rowdblclick" : [ + "function (_self, rowIndex, e)", + "{", + " ", + " Pman.Dialog.AdminNotifySender.show(", + " this.getDataSource().getAt(rowIndex).data, function() {", + " _this.sgrid.footer.onClick('first');", + " }); ", + "}", + "" + ] + }, + "loadMask" : true, + "xtype" : "Grid" + } + ], + "listeners" : { + "|activate" : [ + "function() {", + " _this.spanel = this;", + " if (_this.sgrid) {", + " _this.sgrid.footer.onClick('first');", + " }", + "}" + ] + }, + "region" : "center", + "tableName" : "core_notify_sender", + "title" : "Senders", + "xtype" : "GridPanel" + }, + { + "$ xns" : "Roo", + "Boolean background" : true, + "fitContainer" : true, + "fitToframe" : true, + "items" : [ + { + "$ xns" : "Roo.grid", + "* prop" : "grid", + "autoExpandColumn" : "error_msg", + "items" : [ + { + "$ xns" : "Roo", + "* prop" : "toolbar", + "items" : [ + { + "$ xns" : "Roo.Toolbar", + "xtype" : "Fill" + }, + { + "$ xns" : "Roo.Toolbar", + "String text" : "Remove", + "xtype" : "Button" + } + ], + "xtype" : "Toolbar" + }, + { + "$ sortInfo" : "{ field : 'person_id_name', direction: 'ASC' }", + "$ xns" : "Roo.data", + "* prop" : "dataSource", + "items" : [ + { + "$ url" : "baseURL + '/Roo/core_notify_sender_blacklist'", + "$ xns" : "Roo.data", + "* prop" : "proxy", + "method" : "GET", + "xtype" : "HttpProxy" + }, + { + "$ xns" : "Roo.data", + "* prop" : "reader", + "id" : "id", + "root" : "data", + "totalProperty" : "total", + "xtype" : "JsonReader" + } + ], + "listeners" : { + "beforeload" : [ + "function (_self, opts)", + "{", + " if(!_this.sgrid.getSelectionModel().getSelected()) {", + " return false;", + " }", + " ", + " opts.params.sender_id = _this.sgrid.getSelectionModel().getSelected().data.id;", + "}" + ] + }, + "remoteSort" : true, + "xtype" : "Store" + }, + { + "$ xns" : "Roo", + "* prop" : "footer", + "displayInfo" : true, + "displayMsg" : "Displaying Blacklists {0} - {1} of {2}", + "emptyMsg" : "No Blacklists found", + "pageSize" : 25, + "xtype" : "PagingToolbar" + }, + { + "$ renderer" : "function(v) { return String.format('{0}', v ? v.format('d/M/Y H:i:s') : ''); }", + "$ xns" : "Roo.grid", + "* prop" : "colModel[]", + "dataIndex" : "added_dt", + "header" : "Added", + "width" : 120, + "xtype" : "ColumnModel" + }, + { + "$ xns" : "Roo.grid", + "* prop" : "colModel[]", + "dataIndex" : "domain_id_domain", + "header" : "Domain", + "width" : 150, + "xtype" : "ColumnModel" + }, + { + "$ xns" : "Roo.grid", + "* prop" : "colModel[]", + "dataIndex" : "error_str", + "header" : "Error", + "width" : 150, + "xtype" : "ColumnModel" + } + ], + "listeners" : { + "|render" : [ + "function() ", + "{", + " _this.bgrid = this; ", + " //_this.dialog = Pman.Dialog.FILL_IN", + " ", + "}" + ] + }, + "loadMask" : true, + "xtype" : "Grid" + } + ], + "listeners" : { + "|activate" : [ + "function() {", + " _this.bpanel = this;", + " ", + "}" + ] + }, + "region" : "south", + "tableName" : "core_notify_recur", + "title" : "Recurrent Notifications", + "xtype" : "GridPanel" + } + ], + "xtype" : "BorderLayout" + } + ], + "xtype" : "NestedLayoutPanel" + } + ], + "modOrder" : "910", + "name" : "Pman.Tab.AdminNotifySender", + "parent" : "Pman.Tab.AdminWatchNotify", + "path" : "/home/alan/gitlive/Pman.Admin/Pman.Tab.AdminNotifySender.bjs", + "permname" : "", + "strings" : { + "1063e38cb53d94d386f21227fcd84717" : "Remove", + "1203cd27e4d1ab6f1296728c021d9c1a" : "Is Active", + "2023301a71db57f37d50da7d045b881a" : "Displaying Servers {0} - {1} of {2}", + "2ddb157d4780e8883fbde96f354c57d2" : "Displaying Blacklists {0} - {1} of {2}", + "774ff60df30a64fad1d29f6c2daa8691" : "No Servers found", + "902b0d55fddef6f8d651fe1035b7d4bd" : "Error", + "b26686c0a708faee42861d8b905e882e" : "Last Sent", + "be6838286e448ad65c5b55d690e2c38b" : "In Queue", + "c348b06d2667edd048ded3c1b1878cc1" : "Recurrent Notifications", + "c5dd93dd1011986763b5925e0af25e08" : "No Blacklists found", + "ce8ae9da5b7cd6c3df2929543a9af92d" : "Email", + "def36b726efed529b13ba240dd331a12" : "Pool", + "eae639a70006feff484a39363c977e24" : "Domain", + "ec211f7c20af43e742bf2570c3cb84f9" : "Add", + "ed93b54403043468c325323b79c676e2" : "Senders", + "f29ddbfb905eb2593fdcdfb243f9af85" : "Added", + "f8981aa743c09c2778adafe34ba52d62" : "Notify Senders" + }, + "title" : "" +} \ No newline at end of file diff --git a/Pman.Tab.AdminNotifySender.js b/Pman.Tab.AdminNotifySender.js new file mode 100644 index 0000000..64b941c --- /dev/null +++ b/Pman.Tab.AdminNotifySender.js @@ -0,0 +1,364 @@ +//