Fix #7422 - refinements on notify
authorAlan <alan@roojs.com>
Wed, 28 Sep 2022 07:10:29 +0000 (15:10 +0800)
committerAlan <alan@roojs.com>
Wed, 28 Sep 2022 07:10:29 +0000 (15:10 +0800)
Pman.Tab.AdminEmailTemplates.bjs
Pman.Tab.AdminNotify.bjs
Pman.Tab.AdminNotify.js

index eaad9ce..be41f5d 100644 (file)
 {
- "name" : "Pman.Tab.AdminEmailTemplates",
- "parent" : "Pman.Tab.Admin",
- "title" : "Manage Email Templates",
- "path" : "/home/alan/gitlive/Pman.Admin/Pman.Tab.AdminEmailTemplates.bjs",
- "permname" : "",
- "modOrder" : "999",
- "strings" : {
-  "ec211f7c20af43e742bf2570c3cb84f9" : "Add",
-  "c7d299bf3f9e37c77ab646f7e5366696" : "core_email",
-  "00d6e06d2f3c092b4f5e1e708a360b0f" : "Displaying Message{0} - {1} of {2}",
-  "9076cbba1d9ef79280b4f39e2aa0d115" : "Nothing found",
-  "b78a3223503896721cca1303f776159b" : "Title",
-  "68b00d723d37122f64da8d9939f836f0" : "BCC Group",
-  "9e11143e29a031212f2cdefcf61f39e9" : "View Message",
-  "f49559cda3fb906fbd7736f8b8a0e37d" : "Email Template",
-  "01bd6a16732dfa2b760dc8566c58afae" : "Download to Excel",
-  "4a4a8fe0c6dfb6bd2a41755d15eb6f0b" : "From Name",
-  "4ca679a383343ab3d4ca1cd7c91b43f7" : "From Email",
-  "5fb63579fc981698f97d55bfecb213ea" : "Copy",
-  "f2a6c498fb90ee345d997f888fce3b18" : "Delete",
-  "49ee3087348e8d44e1feda1917443987" : "Name"
- },
  "items" : [
   {
-   "listeners" : {
-    "render" : "function (_self)\n{\n    _this.nest = this;\n}"
-   },
-   "region" : "center",
-   "xtype" : "NestedLayoutPanel",
-   "title" : "Email Template",
    "$ xns" : "Roo",
    "items" : [
     {
-     "xtype" : "BorderLayout",
      "$ xns" : "Roo",
      "* prop" : "layout",
      "items" : [
       {
-       "autoScroll" : false,
-       "xtype" : "LayoutRegion",
        "$ xns" : "Roo",
+       "* prop" : "center",
+       "autoScroll" : false,
        "split" : true,
-       "* prop" : "center"
+       "xtype" : "LayoutRegion"
       },
       {
-       "xtype" : "LayoutRegion",
        "$ xns" : "Roo",
-       "split" : true,
-       "height" : 300,
        "* prop" : "south",
-       "titlebar" : true
+       "height" : 300,
+       "split" : true,
+       "titlebar" : true,
+       "xtype" : "LayoutRegion"
       },
       {
-       "listeners" : {
-        "|activate" : "function() {\n    _this.panel = this;\n    if (_this.grid) {\n        _this.grid.footer.onClick('first');\n    }\n}"
-       },
+       "$ xns" : "Roo",
        "background" : true,
-       "region" : "center",
-       "fitToframe" : true,
-       "title" : "core_email",
-       "xtype" : "GridPanel",
        "fitContainer" : true,
-       "$ xns" : "Roo",
-       "tableName" : "core_email",
+       "fitToframe" : true,
        "items" : [
         {
-         "listeners" : {
-          "|rowdblclick" : "function (_self, rowIndex, e)\n{\n    if (!_this.dialog) { \n        return;\n        }\n    var data = this.getDataSource().getAt(rowIndex).data;\n    _this.dialog.show( {id : data.id, module : 'core_email'} , function() {\n        _this.grid.footer.onClick('first');\n    }); \n}\n",
-          "|render" : "function() \n{\n    _this.grid = this; \n    _this.dialog = Pman.Dialog.CoreEmail;\n    if (_this.panel.active) {\n       _this.grid.footer.onClick('first');\n    }\n}",
-          "rowclick" : "function (_self, rowIndex, e)\n{\n   // _this.grid.ds.load({});\n    _this.viewPanel.view.store.load({});\n}"
-         },
-         "autoExpandColumn" : "subject",
-         "xtype" : "Grid",
-         "loadMask" : true,
          "$ xns" : "Roo.grid",
          "* prop" : "grid",
+         "autoExpandColumn" : "subject",
          "items" : [
           {
-           "xtype" : "RowSelectionModel",
-           "singleSelect" : true,
            "$ xns" : "Roo.grid",
-           "* prop" : "sm"
+           "* prop" : "sm",
+           "singleSelect" : true,
+           "xtype" : "RowSelectionModel"
           },
           {
-           "listeners" : {
-            "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}"
-           },
-           "xtype" : "Store",
-           "remoteSort" : true,
            "$ sortInfo" : "{ field : 'description', direction: 'ASC' }",
            "$ xns" : "Roo.data",
            "* prop" : "dataSource",
            "items" : [
             {
              "$ url" : "baseURL + '/Roo/Core_email.php'",
-             "xtype" : "HttpProxy",
-             "method" : "GET",
              "$ xns" : "Roo.data",
-             "* prop" : "proxy"
+             "* prop" : "proxy",
+             "method" : "GET",
+             "xtype" : "HttpProxy"
             },
             {
-             "id" : "id",
-             "root" : "data",
-             "xtype" : "JsonReader",
-             "$ fields" : "[\n    {\n        \"name\":\"name\",\n        \"type\":\"string\"\n    },\n    {\n        \"name\":\"subject\",\n        \"type\":\"string\"\n    }\n]",
+             "$ fields" : [
+              "[",
+              "    {",
+              "        \"name\":\"name\",",
+              "        \"type\":\"string\"",
+              "    },",
+              "    {",
+              "        \"name\":\"subject\",",
+              "        \"type\":\"string\"",
+              "    }",
+              "]"
+             ],
              "$ xns" : "Roo.data",
              "* prop" : "reader",
-             "totalProperty" : "total"
+             "id" : "id",
+             "root" : "data",
+             "totalProperty" : "total",
+             "xtype" : "JsonReader"
             }
-           ]
+           ],
+           "listeners" : {
+            "beforeload" : [
+             "function (_self, options)",
+             "{",
+             "    options.params = options.params || {};",
+             "    ",
+             "    var s = _this.searchBox.getValue();",
+             "    ",
+             "    if(s.length){",
+             "        options.params['search[nameortitle]'] = s;",
+             "    }",
+             "",
+             "}"
+            ]
+           },
+           "remoteSort" : true,
+           "xtype" : "Store"
           },
           {
-           "pageSize" : 25,
-           "xtype" : "PagingToolbar",
-           "emptyMsg" : "Nothing found",
            "$ xns" : "Roo",
-           "displayMsg" : "Displaying Message{0} - {1} of {2}",
-           "displayInfo" : true,
            "* prop" : "footer",
+           "displayInfo" : true,
+           "displayMsg" : "Displaying Message{0} - {1} of {2}",
+           "emptyMsg" : "Nothing found",
            "items" : [
             {
+             "$ xns" : "Roo.Toolbar",
              "listeners" : {
-              "|click" : "function()\n{\n   \nnew Pman.Download({\n    url : baseURL + '/Roo/Core_email',\n    method : 'GET',\n    params : {\n        csvCols : '*',\n        csvTitles : '*'\n    }\n});\nRoo.MessageBox.alert(\"Notice\", \"Should be downloading now\");\n  \n}\n"
+              "|click" : [
+               "function()",
+               "{",
+               "   ",
+               "new Pman.Download({",
+               "    url : baseURL + '/Roo/Core_email',",
+               "    method : 'GET',",
+               "    params : {",
+               "        csvCols : '*',",
+               "        csvTitles : '*'",
+               "    }",
+               "});",
+               "Roo.MessageBox.alert(\"Notice\", \"Should be downloading now\");",
+               "  ",
+               "}",
+               ""
+              ]
              },
              "text" : "Download to Excel",
-             "xtype" : "Button",
-             "$ xns" : "Roo.Toolbar"
+             "xtype" : "Button"
             }
-           ]
+           ],
+           "pageSize" : 25,
+           "xtype" : "PagingToolbar"
           },
           {
-           "xtype" : "Toolbar",
            "$ xns" : "Roo",
            "* prop" : "toolbar",
            "items" : [
             {
+             "$ xns" : "Roo.form",
              "listeners" : {
-              "specialkey" : "function (_self, e)\n{\n  _this.grid.footer.onClick('first');\n}",
-              "render" : "function (_self)\n{\n    _this.searchBox = _self;\n}"
+              "render" : [
+               "function (_self)",
+               "{",
+               "    _this.searchBox = _self;",
+               "}"
+              ],
+              "specialkey" : [
+               "function (_self, e)",
+               "{",
+               "  _this.grid.footer.onClick('first');",
+               "}"
+              ]
              },
-             "xtype" : "TextField",
-             "$ xns" : "Roo.form"
+             "xtype" : "TextField"
             },
             {
+             "$ icon" : "rootURL + '/Pman/templates/images/search.gif'",
+             "$ xns" : "Roo.Toolbar",
+             "cls" : "x-btn-icon",
              "listeners" : {
-              "click" : "function (_self, e)\n{\n    _this.grid.footer.onClick('first');\n}"
+              "click" : [
+               "function (_self, e)",
+               "{",
+               "    _this.grid.footer.onClick('first');",
+               "}"
+              ]
              },
-             "xtype" : "Button",
-             "cls" : "x-btn-icon",
-             "$ icon" : "rootURL + '/Pman/templates/images/search.gif'",
-             "$ xns" : "Roo.Toolbar"
+             "xtype" : "Button"
             },
             {
+             "$ icon" : "rootURL + '/Pman/templates/images/edit-clear.gif'",
+             "$ xns" : "Roo.Toolbar",
+             "cls" : "x-btn-icon",
              "listeners" : {
-              "click" : "function (_self, e)\n{\n    _this.searchBox.setValue('');\r\n    _this.grid.footer.onClick('first');\r\n}"
+              "click" : [
+               "function (_self, e)",
+               "{",
+               "    _this.searchBox.setValue('');\r",
+               "    _this.grid.footer.onClick('first');\r",
+               "}"
+              ]
              },
-             "xtype" : "Button",
-             "cls" : "x-btn-icon",
-             "$ icon" : "rootURL + '/Pman/templates/images/edit-clear.gif'",
-             "$ xns" : "Roo.Toolbar"
+             "xtype" : "Button"
             },
             {
-             "xtype" : "Fill",
-             "$ xns" : "Roo.Toolbar"
+             "$ xns" : "Roo.Toolbar",
+             "xtype" : "Fill"
             },
             {
+             "$ icon" : "Roo.rootURL + 'images/default/dd/drop-add.gif'",
+             "$ xns" : "Roo.Toolbar",
+             "cls" : "x-btn-text-icon",
              "listeners" : {
-              "|click" : "function()\n{\n  var sel = _this.grid.selModel.getSelected();\n  if (!sel) {\n        Roo.MessageBox.alert(\"Error\", \"Select a message to copy\");\n        return;\n    }\nnew 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.grid.footer.onClick('refresh');\n    }\n});\n  \n}\n"
+              "|click" : [
+               "function()",
+               "{",
+               "  var sel = _this.grid.selModel.getSelected();",
+               "  if (!sel) {",
+               "        Roo.MessageBox.alert(\"Error\", \"Select a message to copy\");",
+               "        return;",
+               "    }",
+               "new Pman.Request({",
+               "    url : baseURL + '/Roo/Core_email',",
+               "    method : 'POST',",
+               "    params : {",
+               "        id : sel.data.id,",
+               "        _make_copy : 1",
+               "    },",
+               "    success : function() {",
+               "        _this.grid.footer.onClick('refresh');",
+               "    }",
+               "});",
+               "  ",
+               "}",
+               ""
+              ]
              },
              "text" : "Copy",
-             "xtype" : "Button",
-             "cls" : "x-btn-text-icon",
-             "$ icon" : "Roo.rootURL + 'images/default/dd/drop-add.gif'",
-             "$ xns" : "Roo.Toolbar"
+             "xtype" : "Button"
             },
             {
+             "$ icon" : "Roo.rootURL + 'images/default/dd/drop-add.gif'",
+             "$ xns" : "Roo.Toolbar",
+             "cls" : "x-btn-text-icon",
              "listeners" : {
-              "|click" : "function()\n{\n    if (!_this.dialog) {\n         return;\n         }\n    _this.dialog.show( { id : 0, module : 'core_email' } , function() {\n        _this.grid.footer.onClick('first');\n   }); \n}\n"
+              "|click" : [
+               "function()",
+               "{",
+               "    if (!_this.dialog) {",
+               "         return;",
+               "         }",
+               "    _this.dialog.show( { id : 0, module : 'core_email' } , function() {",
+               "        _this.grid.footer.onClick('first');",
+               "   }); ",
+               "}",
+               ""
+              ]
              },
              "text" : "Add",
-             "xtype" : "Button",
-             "cls" : "x-btn-text-icon",
-             "$ icon" : "Roo.rootURL + 'images/default/dd/drop-add.gif'",
-             "$ xns" : "Roo.Toolbar"
+             "xtype" : "Button"
             },
             {
-             "xtype" : "Separator",
-             "$ xns" : "Roo.Toolbar"
+             "$ xns" : "Roo.Toolbar",
+             "xtype" : "Separator"
             },
             {
+             "$ icon" : "rootURL + '/Pman/templates/images/trash.gif'",
+             "$ xns" : "Roo.Toolbar",
+             "cls" : "x-btn-text-icon",
              "listeners" : {
-              "|click" : "function()\n{\n    Pman.genericDelete(_this, 'core_email');\n    \n}\n"
+              "|click" : [
+               "function()",
+               "{",
+               "    Pman.genericDelete(_this, 'core_email');",
+               "    ",
+               "}",
+               ""
+              ]
              },
              "text" : "Delete",
-             "xtype" : "Button",
-             "cls" : "x-btn-text-icon",
-             "$ icon" : "rootURL + '/Pman/templates/images/trash.gif'",
-             "$ xns" : "Roo.Toolbar"
+             "xtype" : "Button"
             }
-           ]
+           ],
+           "xtype" : "Toolbar"
           },
           {
-           "xtype" : "ColumnModel",
-           "width" : 250,
-           "header" : "Name",
-           "$ renderer" : "function(v,x,r) \n{ \n    if (r.data.description.length > 0) {\n        v = r.data.description;\n    }\n    \n    \n    if(r.data.active * 1 < 1){\n        return String.format('<s>{0}</s>', v ? v : ''); \n    }\n    \n    return String.format('{0}', v ? v : ''); \n}",
+           "$ renderer" : [
+            "function(v,x,r) ",
+            "{ ",
+            "    if (r.data.description.length > 0) {",
+            "        v = r.data.description;",
+            "    }",
+            "    ",
+            "    ",
+            "    if(r.data.active * 1 < 1){",
+            "        return String.format('<s>{0}</s>', v ? v : ''); ",
+            "    }",
+            "    ",
+            "    return String.format('{0}', v ? v : ''); ",
+            "}"
+           ],
            "$ xns" : "Roo.grid",
-           "Boolean sortable" : true,
            "* prop" : "cm[]",
-           "dataIndex" : "name"
+           "Boolean sortable" : true,
+           "dataIndex" : "name",
+           "header" : "Name",
+           "width" : 250,
+           "xtype" : "ColumnModel"
           },
           {
-           "xtype" : "ColumnModel",
-           "width" : 300,
-           "header" : "Title",
-           "$ renderer" : "function(v,x,r) \n{ \n    if(r.data.active * 1 < 1){\n        return String.format('<s>{0}</s>', v ? v : ''); \n    }\n    \n    return String.format('{0}', v ? v : ''); \n}",
+           "$ renderer" : [
+            "function(v,x,r) ",
+            "{ ",
+            "    if(r.data.active * 1 < 1){",
+            "        return String.format('<s>{0}</s>', v ? v : ''); ",
+            "    }",
+            "    ",
+            "    return String.format('{0}', v ? v : ''); ",
+            "}"
+           ],
            "$ xns" : "Roo.grid",
-           "Boolean sortable" : true,
            "* prop" : "cm[]",
-           "dataIndex" : "subject"
+           "Boolean sortable" : true,
+           "dataIndex" : "subject",
+           "header" : "Title",
+           "width" : 300,
+           "xtype" : "ColumnModel"
           },
           {
-           "xtype" : "ColumnModel",
-           "width" : 150,
-           "header" : "From Name",
            "$ renderer" : "function(v) { return String.format('{0}', v ? v : ''); }",
            "$ xns" : "Roo.grid",
-           "Boolean sortable" : true,
            "* prop" : "cm[]",
-           "dataIndex" : "from_name"
+           "Boolean sortable" : true,
+           "dataIndex" : "from_name",
+           "header" : "From Name",
+           "width" : 150,
+           "xtype" : "ColumnModel"
           },
           {
-           "xtype" : "ColumnModel",
-           "header" : "From Email",
-           "width" : 150,
            "$ renderer" : "function(v) { return String.format('{0}', v ? v : ''); }",
            "$ xns" : "Roo.grid",
-           "Boolean sortable" : true,
            "* prop" : "cm[]",
-           "dataIndex" : "from_email"
+           "Boolean sortable" : true,
+           "dataIndex" : "from_email",
+           "header" : "From Email",
+           "width" : 150,
+           "xtype" : "ColumnModel"
           },
           {
-           "xtype" : "ColumnModel",
-           "width" : 150,
-           "header" : "BCC Group",
            "$ renderer" : "function(v) { return String.format('{0}', v ? v : ''); }",
            "$ xns" : "Roo.grid",
-           "Boolean sortable" : true,
            "* prop" : "cm[]",
-           "dataIndex" : "bcc_group_name"
+           "Boolean sortable" : true,
+           "dataIndex" : "bcc_group_name",
+           "header" : "BCC Group",
+           "width" : 150,
+           "xtype" : "ColumnModel"
           }
-         ]
+         ],
+         "listeners" : {
+          "rowclick" : [
+           "function (_self, rowIndex, e)",
+           "{",
+           "   // _this.grid.ds.load({});",
+           "    _this.viewPanel.view.store.load({});",
+           "}"
+          ],
+          "|render" : [
+           "function() ",
+           "{",
+           "    _this.grid = this; ",
+           "    _this.dialog = Pman.Dialog.CoreEmail;",
+           "    if (_this.panel.active) {",
+           "       _this.grid.footer.onClick('first');",
+           "    }",
+           "}"
+          ],
+          "|rowdblclick" : [
+           "function (_self, rowIndex, e)",
+           "{",
+           "    if (!_this.dialog) { ",
+           "        return;",
+           "        }",
+           "    var data = this.getDataSource().getAt(rowIndex).data;",
+           "    _this.dialog.show( {id : data.id, module : 'core_email'} , function() {",
+           "        _this.grid.footer.onClick('first');",
+           "    }); ",
+           "}",
+           ""
+          ]
+         },
+         "loadMask" : true,
+         "xtype" : "Grid"
         }
-       ]
-      },
-      {
+       ],
        "listeners" : {
-        "render" : "function (_self)\n{\n    _this.viewPanel = _self;\n}"
+        "|activate" : [
+         "function() {",
+         "    _this.panel = this;",
+         "    if (_this.grid) {",
+         "        _this.grid.footer.onClick('first');",
+         "    }",
+         "}"
+        ]
        },
-       "background" : false,
-       "region" : "south",
-       "Boolean fitContainer" : true,
-       "title" : "View Message",
-       "xtype" : "ContentPanel",
-       "Boolean fitToFrame" : true,
+       "region" : "center",
+       "tableName" : "core_email",
+       "title" : "core_email",
+       "xtype" : "GridPanel"
+      },
+      {
        "$ xns" : "Roo",
        "Boolean autoScroll" : true,
+       "Boolean fitContainer" : true,
+       "Boolean fitToFrame" : true,
+       "background" : false,
        "items" : [
         {
-         "listeners" : {
-          "preparedata" : "function (_self, data, i, rec)\n{\n   // Roo.log(data);\n    //Roo.apply(data, rec.json);\n}"
-         },
          "$ tpl" : "new Roo.DomTemplate({url : rootURL+'/Pman/Crm/domtemplates/crm_mail.html'})",
-         "xtype" : "View",
          "$ xns" : "Roo",
          "* prop" : "view",
          "items" : [
           {
-           "listeners" : {
-            "beforeload" : "function (_self, options)\n{\n    options.params = options.params || {};\n    var p = _this.grid.selModel.getSelected();\n    if (!p || !p.data.id) {\n        this.removeAll();\n        return false;\n    }\n   \n    options.params['id'] = p.data.id;\n \n}",
-            "load" : "function (_self, records, options)\n{\n    var p = _this.grid.selModel.getSelected();\n  //  Roo.log(p);\n    if (!p || !p.data.id) {\n        this.removeAll();\n        return false;\n    }\n \n}"
-           },
-           "xtype" : "Store",
            "$ xns" : "Roo.data",
            "* prop" : "store",
            "items" : [
             {
              "$ url" : "baseURL+'/Roo/Core_email.php'",
-             "xtype" : "HttpProxy",
-             "method" : "GET",
              "$ xns" : "Roo.data",
-             "* prop" : "proxy"
+             "* prop" : "proxy",
+             "method" : "GET",
+             "xtype" : "HttpProxy"
             },
             {
-             "id" : "id",
-             "root" : "data",
-             "xtype" : "JsonReader",
              "$ xns" : "Roo.data",
              "* prop" : "reader",
-             "totalProperty" : "total"
+             "id" : "id",
+             "root" : "data",
+             "totalProperty" : "total",
+             "xtype" : "JsonReader"
             }
-           ]
+           ],
+           "listeners" : {
+            "beforeload" : [
+             "function (_self, options)",
+             "{",
+             "    options.params = options.params || {};",
+             "    var p = _this.grid.selModel.getSelected();",
+             "    if (!p || !p.data.id) {",
+             "        this.removeAll();",
+             "        return false;",
+             "    }",
+             "   ",
+             "    options.params['id'] = p.data.id;",
+             " ",
+             "}"
+            ],
+            "load" : [
+             "function (_self, records, options)",
+             "{",
+             "    var p = _this.grid.selModel.getSelected();",
+             "  //  Roo.log(p);",
+             "    if (!p || !p.data.id) {",
+             "        this.removeAll();",
+             "        return false;",
+             "    }",
+             " ",
+             "}"
+            ]
+           },
+           "xtype" : "Store"
           }
-         ]
+         ],
+         "listeners" : {
+          "preparedata" : [
+           "function (_self, data, i, rec)",
+           "{",
+           "   // Roo.log(data);",
+           "    //Roo.apply(data, rec.json);",
+           "}"
+          ]
+         },
+         "xtype" : "View"
         }
-       ]
+       ],
+       "listeners" : {
+        "render" : [
+         "function (_self)",
+         "{",
+         "    _this.viewPanel = _self;",
+         "}"
+        ]
+       },
+       "region" : "south",
+       "title" : "View Message",
+       "xtype" : "ContentPanel"
       }
-     ]
+     ],
+     "xtype" : "BorderLayout"
     }
-   ]
+   ],
+   "listeners" : {
+    "render" : [
+     "function (_self)",
+     "{",
+     "    _this.nest = this;",
+     "}"
+    ]
+   },
+   "region" : "center",
+   "title" : "Email Template",
+   "xtype" : "NestedLayoutPanel"
   }
- ]
+ ],
+ "modOrder" : "999",
+ "name" : "Pman.Tab.AdminEmailTemplates",
+ "parent" : "Pman.Tab.Admin",
+ "path" : "/home/alan/gitlive/Pman.Admin/Pman.Tab.AdminEmailTemplates.bjs",
+ "permname" : "",
+ "strings" : {
+  "00d6e06d2f3c092b4f5e1e708a360b0f" : "Displaying Message{0} - {1} of {2}",
+  "01bd6a16732dfa2b760dc8566c58afae" : "Download to Excel",
+  "49ee3087348e8d44e1feda1917443987" : "Name",
+  "4a4a8fe0c6dfb6bd2a41755d15eb6f0b" : "From Name",
+  "4ca679a383343ab3d4ca1cd7c91b43f7" : "From Email",
+  "5fb63579fc981698f97d55bfecb213ea" : "Copy",
+  "68b00d723d37122f64da8d9939f836f0" : "BCC Group",
+  "9076cbba1d9ef79280b4f39e2aa0d115" : "Nothing found",
+  "9e11143e29a031212f2cdefcf61f39e9" : "View Message",
+  "b78a3223503896721cca1303f776159b" : "Title",
+  "c7d299bf3f9e37c77ab646f7e5366696" : "core_email",
+  "ec211f7c20af43e742bf2570c3cb84f9" : "Add",
+  "f2a6c498fb90ee345d997f888fce3b18" : "Delete",
+  "f49559cda3fb906fbd7736f8b8a0e37d" : "Email Template"
+ },
+ "title" : "Manage Email Templates"
 }
\ No newline at end of file
index 08dd07a..d71a2fd 100644 (file)
 {
- "name" : "Pman.Tab.AdminNotify",
- "parent" : "Pman.Tab.AdminWatchNotify",
- "title" : "Pman.Tab.AdminNotify",
- "path" : "/home/alan/gitlive/Pman.Admin/Pman.Tab.AdminNotify.bjs",
- "permname" : "",
- "modOrder" : "001",
- "strings" : {
-  "aed6676e8238afe7cf55e3baf2ad72a2" : "Search Subject",
-  "136fac3c5c5881e0a7d0039e57decd68" : "Select notify type",
-  "bf1cb7e2a337a5e2ebf614009cbce9cc" : "Current Notifications",
-  "8535bcc0f05358a583bb432bbadf7e0d" : "Select type",
-  "e12167aa0a7698e6ebc92b4ce3909b53" : "To",
-  "478192f02d448c49bc6b7d76818d8483" : "Ontable",
-  "dca4dd744d00b6fe1362ef7825ffdee5" : "No core_notify found",
-  "dc873ea4b71ca217b0d8d1fdd45854ac" : "id#",
-  "0f6d01b16d57911731aa44b94dbfefcc" : "Act when",
-  "7f8c0283f16925caed8e632086b81b9c" : "Sent",
-  "c956c97343a45cca5d492e70c56daa8e" : "Select person",
-  "12832b4def6eb0b6105b3d11e16066ea" : "Msgid",
-  "1243daf593fa297e07ab03bf06d925af" : "Searching...",
-  "24463f10155b8af973300f86302c4fde" : "Who to notify",
-  "b22e7ea679daf5146f08f477419dd8bd" : "Triggered by",
-  "5da618e8e4b89c66fe86e32cdafde142" : "From",
-  "e4b478c05a833569833f9cc63b6c4354" : "Displaying core_notify{0} - {1} of {2}",
-  "4c3880bb027f159e801041b1021e88e8" : "Method",
-  "a4ecfc70574394990cf17bd83df499f7" : "Event",
-  "12ea1a38991aa3bc4992b10adac0f3bc" : "Event Details",
-  "f2a6c498fb90ee345d997f888fce3b18" : "Delete",
-  "f821027bade4aa6b7a4191cd1676cf41" : "Show Completed"
- },
  "items" : [
   {
-   "listeners" : {
-    "render" : "function (_self)\n{\n    _this.nest = this;\n}"
-   },
-   "xtype" : "NestedLayoutPanel",
-   "String region" : "center",
    "$ xns" : "Roo",
-   "String title" : "Current Notifications",
    "Boolean background" : false,
+   "String region" : "center",
+   "String title" : "Current Notifications",
    "items" : [
     {
-     "xtype" : "BorderLayout",
      "$ xns" : "Roo",
      "* prop" : "layout",
      "items" : [
       {
-       "xtype" : "LayoutRegion",
        "$ xns" : "Roo",
-       "* prop" : "center"
+       "* prop" : "center",
+       "xtype" : "LayoutRegion"
       },
       {
-       "autoScroll" : true,
-       "String collapsedTitle" : "View Details",
-       "xtype" : "LayoutRegion",
        "$ xns" : "Roo",
+       "* prop" : "south",
        "Boolean collapsible" : true,
-       "split" : true,
+       "Boolean split" : true,
+       "String collapsedTitle" : "View Details",
        "String title" : "Event Details",
+       "autoScroll" : true,
        "height" : 150,
-       "* prop" : "south",
-       "Boolean split" : true
+       "xtype" : "LayoutRegion"
       },
       {
-       "listeners" : {
-        "|activate" : "function() {\n    _this.panel = this;\n    if (_this.grid) {\n        _this.grid.footer.onClick('first');\n    }\n    \n}"
-       },
+       "$ xns" : "Roo",
        "bool background" : false,
-       "region" : "center",
-       "fitToframe" : true,
-       "title" : "Current Notifications",
-       "xtype" : "GridPanel",
        "fitContainer" : true,
-       "$ xns" : "Roo",
-       "tableName" : "core_notify",
+       "fitToframe" : true,
        "items" : [
         {
-         "listeners" : {
-          "|render" : "function() \n{\n    _this.grid = this; \n    //_this.dialog = Pman.Dialog.FILL_IN\n    if (_this.panel.active) {\n       this.footer.onClick('first');\n    }\n}"
-         },
-         "autoExpandColumn" : "person_id_name",
-         "xtype" : "Grid",
-         "loadMask" : true,
          "$ xns" : "Roo.grid",
          "* prop" : "grid",
+         "autoExpandColumn" : "person_id_name",
          "items" : [
           {
-           "listeners" : {
-            "beforeload" : "function (_self, options)\n{\n    options.params = options.params || {};\n    \n    options.params._evtype_align = 1;\n    \n    if (!_this.toggleBtn.pressed) {\n        options.params['event_id'] = 0;\n    } else  {\n        options.params['!event_id'] = 0;\n    }\n    \n    if (!_this.personCombo) {\n        return false;\n    }\n    var p = _this.personCombo.getValue();\n    if (p*1) { \n        options.params.person_id = p;\n    }\n    \n    var from = _this.fromDateSel.getValue();\n    \n    if(from){\n        options.params.from = from.format('Y-m-d');\n    }\n    \n    var to = _this.toDateSel.getValue();\n    \n    if(to){\n        options.params.to = to.format('Y-m-d');\n    }\n    \n    var type = _this.typeCombo.getValue();\n    \n    if(type.length){\n        options.params.evtype = type;\n    }\n    options.params['search[contains]'] = _this.searchBox.getValue();\n    \n}"
-           },
-           "xtype" : "Store",
-           "remoteSort" : true,
            "$ sortInfo" : "{ field : 'act_when', direction: 'DESC' }",
            "$ xns" : "Roo.data",
            "* prop" : "dataSource",
            "items" : [
             {
              "$ url" : "baseURL + '/Roo/core_notify.php'",
-             "xtype" : "HttpProxy",
-             "method" : "GET",
              "$ xns" : "Roo.data",
-             "* prop" : "proxy"
+             "* prop" : "proxy",
+             "method" : "GET",
+             "xtype" : "HttpProxy"
             },
             {
-             "id" : "id",
-             "root" : "data",
-             "xtype" : "JsonReader",
+             "$ fields" : [
+              "[",
+              "    {",
+              "        'name': 'id',",
+              "        'type': 'int'",
+              "    },",
+              "    {",
+              "        'name': 'act_when',",
+              "        'type': 'date',",
+              "        'dateFormat': 'Y-m-d'",
+              "    },",
+              "    {",
+              "        'name': 'onid',",
+              "        'type': 'int'",
+              "    },",
+              "    {",
+              "        'name': 'ontable',",
+              "        'type': 'string'",
+              "    },",
+              "    {",
+              "        'name': 'person_id',",
+              "        'type': 'int'",
+              "    },",
+              "    {",
+              "        'name': 'msgid',",
+              "        'type': 'string'",
+              "    },",
+              "    {",
+              "        'name': 'sent',",
+              "        'type': 'date',",
+              "        'dateFormat': 'Y-m-d'",
+              "    },",
+              "    {",
+              "        'name': 'event_id',",
+              "        'type': 'int'",
+              "    },",
+              "    {",
+              "        'name': 'person_id_id',",
+              "        'type': 'int'",
+              "    },",
+              "    {",
+              "        'name': 'person_id_office_id',",
+              "        'type': 'int'",
+              "    },",
+              "    {",
+              "        'name': 'person_id_name',",
+              "        'type': 'string'",
+              "    },",
+              "    {",
+              "        'name': 'person_id_phone',",
+              "        'type': 'string'",
+              "    },",
+              "    {",
+              "        'name': 'person_id_fax',",
+              "        'type': 'string'",
+              "    },",
+              "    {",
+              "        'name': 'person_id_email',",
+              "        'type': 'string'",
+              "    },",
+              "    {",
+              "        'name': 'person_id_company_id',",
+              "        'type': 'int'",
+              "    },",
+              "    {",
+              "        'name': 'person_id_role',",
+              "        'type': 'string'",
+              "    },",
+              "    {",
+              "        'name': 'person_id_active',",
+              "        'type': 'int'",
+              "    },",
+              "    {",
+              "        'name': 'person_id_remarks',",
+              "        'type': 'string'",
+              "    },",
+              "    {",
+              "        'name': 'person_id_passwd',",
+              "        'type': 'string'",
+              "    },",
+              "    {",
+              "        'name': 'person_id_owner_id',",
+              "        'type': 'int'",
+              "    },",
+              "    {",
+              "        'name': 'person_id_lang',",
+              "        'type': 'string'",
+              "    },",
+              "    {",
+              "        'name': 'person_id_no_reset_sent',",
+              "        'type': 'int'",
+              "    },",
+              "    {",
+              "        'name': 'person_id_action_type',",
+              "        'type': 'string'",
+              "    },",
+              "    {",
+              "        'name': 'person_id_project_id',",
+              "        'type': 'int'",
+              "    },",
+              "    {",
+              "        'name': 'person_id_deleted_by',",
+              "        'type': 'int'",
+              "    },",
+              "    {",
+              "        'name': 'person_id_deleted_dt',",
+              "        'type': 'date'",
+              "    },",
+              "    {",
+              "        'name': 'event_id_id',",
+              "        'type': 'int'",
+              "    },",
+              "    {",
+              "        'name': 'event_id_person_name',",
+              "        'type': 'string'",
+              "    },",
+              "    {",
+              "        'name': 'event_id_event_when',",
+              "        'type': 'date'",
+              "    },",
+              "    {",
+              "        'name': 'event_id_action',",
+              "        'type': 'string'",
+              "    },",
+              "    {",
+              "        'name': 'event_id_ipaddr',",
+              "        'type': 'string'",
+              "    },",
+              "    {",
+              "        'name': 'event_id_on_id',",
+              "        'type': 'int'",
+              "    },",
+              "    {",
+              "        'name': 'event_id_on_table',",
+              "        'type': 'string'",
+              "    },",
+              "    {",
+              "        'name': 'event_id_person_id',",
+              "        'type': 'int'",
+              "    },",
+              "    {",
+              "        'name': 'event_id_remarks',",
+              "        'type': 'string'",
+              "    }",
+              "]"
+             ],
              "$ xns" : "Roo.data",
-             "$ fields" : "[\n    {\n        'name': 'id',\n        'type': 'int'\n    },\n    {\n        'name': 'act_when',\n        'type': 'date',\n        'dateFormat': 'Y-m-d'\n    },\n    {\n        'name': 'onid',\n        'type': 'int'\n    },\n    {\n        'name': 'ontable',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id',\n        'type': 'int'\n    },\n    {\n        'name': 'msgid',\n        'type': 'string'\n    },\n    {\n        'name': 'sent',\n        'type': 'date',\n        'dateFormat': 'Y-m-d'\n    },\n    {\n        'name': 'event_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_office_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_name',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_phone',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_fax',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_email',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_company_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_role',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_active',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_remarks',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_passwd',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_owner_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_lang',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_no_reset_sent',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_action_type',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_project_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_deleted_by',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_deleted_dt',\n        'type': 'date'\n    },\n    {\n        'name': 'event_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'event_id_person_name',\n        'type': 'string'\n    },\n    {\n        'name': 'event_id_event_when',\n        'type': 'date'\n    },\n    {\n        'name': 'event_id_action',\n        'type': 'string'\n    },\n    {\n        'name': 'event_id_ipaddr',\n        'type': 'string'\n    },\n    {\n        'name': 'event_id_on_id',\n        'type': 'int'\n    },\n    {\n        'name': 'event_id_on_table',\n        'type': 'string'\n    },\n    {\n        'name': 'event_id_person_id',\n        'type': 'int'\n    },\n    {\n        'name': 'event_id_remarks',\n        'type': 'string'\n    }\n]",
              "* prop" : "reader",
-             "totalProperty" : "total"
+             "id" : "id",
+             "root" : "data",
+             "totalProperty" : "total",
+             "xtype" : "JsonReader"
             }
-           ]
+           ],
+           "listeners" : {
+            "beforeload" : [
+             "function (_self, options)",
+             "{",
+             "    options.params = options.params || {};",
+             "    ",
+             "    options.params._evtype_align = 1;",
+             "    ",
+             "    if (!_this.toggleBtn.pressed) {",
+             "        options.params['event_id'] = 0;",
+             "    } else  {",
+             "        options.params['!event_id'] = 0;",
+             "    }",
+             "    ",
+             "    if (!_this.personCombo) {",
+             "        return false;",
+             "    }",
+             "    var p = _this.personCombo.getValue();",
+             "    if (p*1) { ",
+             "        options.params.person_id = p;",
+             "    }",
+             "    ",
+             "    var from = _this.fromDateSel.getValue();",
+             "    ",
+             "    if(from){",
+             "        options.params.from = from.format('Y-m-d');",
+             "    }",
+             "    ",
+             "    var to = _this.toDateSel.getValue();",
+             "    ",
+             "    if(to){",
+             "        options.params.to = to.format('Y-m-d');",
+             "    }",
+             "    ",
+             "    var type = _this.typeCombo.getValue();",
+             "    ",
+             "    if(type.length){",
+             "        options.params.evtype = type;",
+             "    }",
+             "    options.params['search[contains]'] = _this.searchBox.getValue();",
+             "    ",
+             "}"
+            ]
+           },
+           "remoteSort" : true,
+           "xtype" : "Store"
           },
           {
+           "$ xns" : "Roo.grid",
+           "* prop" : "sm",
            "listeners" : {
-            "afterselectionchange" : "function (_self)\n{\n    // load detail log in _this.viewPanel;\n    if (!this.getSelected()) {\n        this.viewPanel.setContent(\"Nothing Selected\");\n        return;\n    }\n    var id = this.getSelected().data.event_id;\n    if (id *1 < 1) {\n    \n       _this.viewPanel.setContent(\"No Event for this line\");    \n        return;\n    }\n    _this.viewPanel.load( { url : baseURL + \"/Admin/EventView/\" + id + \".html\" });\n    \n}"
+            "afterselectionchange" : [
+             "function (_self)",
+             "{",
+             "    // load detail log in _this.viewPanel;",
+             "    if (!this.getSelected()) {",
+             "        this.viewPanel.setContent(\"Nothing Selected\");",
+             "        return;",
+             "    }",
+             "    var id = this.getSelected().data.event_id;",
+             "    if (id *1 < 1) {",
+             "    ",
+             "       _this.viewPanel.setContent(\"No Event for this line\");    ",
+             "        return;",
+             "    }",
+             "    _this.viewPanel.load( { url : baseURL + \"/Admin/EventView/\" + id + \".html\" });",
+             "    ",
+             "}"
+            ]
            },
-           "xtype" : "RowSelectionModel",
-           "singleSelect" : true,
-           "$ xns" : "Roo.grid",
-           "* prop" : "sm"
+           "singleSelect" : false,
+           "xtype" : "RowSelectionModel"
           },
           {
-           "pageSize" : 25,
-           "xtype" : "PagingToolbar",
-           "emptyMsg" : "No core_notify found",
            "$ xns" : "Roo",
+           "* prop" : "footer",
            "displayInfo" : true,
            "displayMsg" : "Displaying core_notify{0} - {1} of {2}",
-           "* prop" : "footer"
+           "emptyMsg" : "No core_notify found",
+           "pageSize" : 25,
+           "xtype" : "PagingToolbar"
           },
           {
-           "xtype" : "Toolbar",
            "$ xns" : "Roo",
            "* prop" : "toolbar",
            "items" : [
             {
+             "$ xns" : "Roo.form",
+             "String emptyText" : "Search Subject",
              "listeners" : {
-              "specialkey" : "function (_self, e)\n{\n    _this.grid.footer.onClick('first');\n}",
-              "render" : "function (_self)\n{\n    _this.searchBox = this;\n}"
+              "render" : [
+               "function (_self)",
+               "{",
+               "    _this.searchBox = this;",
+               "}"
+              ],
+              "specialkey" : [
+               "function (_self, e)",
+               "{",
+               "    _this.grid.footer.onClick('first');",
+               "}"
+              ]
              },
-             "xtype" : "TextField",
-             "String emptyText" : "Search Subject",
-             "$ xns" : "Roo.form"
+             "xtype" : "TextField"
             },
             {
-             "listeners" : {
-              "render" : "function (_self)\n{\n   _this.personCombo = _self;\n}",
-              "select" : "function (combo, record, index)\n{\n   _this.grid.footer.onClick('first');\n}"
-             },
-             "listWidth" : 400,
-             "triggerAction" : "all",
-             "forceSelection" : true,
-             "selectOnFocus" : true,
-             "pageSize" : 20,
-             "displayField" : "person_id_name",
-             "emptyText" : "Select person",
-             "minChars" : 2,
-             "valueField" : "person_id",
-             "xtype" : "ComboBox",
+             "$ xns" : "Roo.form",
              "allowBlank" : true,
+             "displayField" : "person_id_name",
              "editable" : true,
-             "width" : 200,
-             "$ xns" : "Roo.form",
-             "qtip" : "Select person",
-             "queryParam" : "query[person_id_name]",
-             "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{person_id_name}</b> {person_id_email}</div>",
-             "loadingText" : "Searching...",
+             "emptyText" : "Select person",
+             "forceSelection" : true,
              "items" : [
               {
-               "listeners" : {
-                "|beforeload" : "function (_self, o){\n    o.params = o.params || {};\n    o.params._distinct='person_id';\n    o.params._columns='person_id,person_id_name,person_id_email';\n    o.params['!person_id_name'] = '';\n    \n    // set more here\n}\n"
-               },
-               "xtype" : "Store",
-               "remoteSort" : true,
                "$ sortInfo" : "{ direction : 'ASC', field: 'person_id_name' }",
                "$ xns" : "Roo.data",
                "* prop" : "store",
                "items" : [
                 {
                  "$ url" : "baseURL + '/Roo/core_notify.php'",
-                 "xtype" : "HttpProxy",
-                 "method" : "GET",
                  "$ xns" : "Roo.data",
-                 "* prop" : "proxy"
+                 "* prop" : "proxy",
+                 "method" : "GET",
+                 "xtype" : "HttpProxy"
                 },
                 {
-                 "id" : "id",
-                 "root" : "data",
-                 "xtype" : "JsonReader",
-                 "$ xns" : "Roo.data",
                  "$ fields" : "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"ontable\",\"type\":\"string\"}]",
+                 "$ xns" : "Roo.data",
                  "* prop" : "reader",
-                 "totalProperty" : "total"
+                 "id" : "id",
+                 "root" : "data",
+                 "totalProperty" : "total",
+                 "xtype" : "JsonReader"
                 }
-               ]
+               ],
+               "listeners" : {
+                "|beforeload" : [
+                 "function (_self, o){",
+                 "    o.params = o.params || {};",
+                 "    o.params._distinct='person_id';",
+                 "    o.params._columns='person_id,person_id_name,person_id_email';",
+                 "    o.params['!person_id_name'] = '';",
+                 "    ",
+                 "    // set more here",
+                 "}",
+                 ""
+                ]
+               },
+               "remoteSort" : true,
+               "xtype" : "Store"
               }
-             ]
+             ],
+             "listWidth" : 400,
+             "listeners" : {
+              "render" : [
+               "function (_self)",
+               "{",
+               "   _this.personCombo = _self;",
+               "}"
+              ],
+              "select" : [
+               "function (combo, record, index)",
+               "{",
+               "   _this.grid.footer.onClick('first');",
+               "}"
+              ]
+             },
+             "loadingText" : "Searching...",
+             "minChars" : 2,
+             "pageSize" : 20,
+             "qtip" : "Select person",
+             "queryParam" : "query[person_id_name]",
+             "selectOnFocus" : true,
+             "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{person_id_name}</b> {person_id_email}</div>",
+             "triggerAction" : "all",
+             "valueField" : "person_id",
+             "width" : 200,
+             "xtype" : "ComboBox"
             },
             {
-             "xtype" : "Separator",
-             "$ xns" : "Roo.Toolbar"
+             "$ xns" : "Roo.Toolbar",
+             "xtype" : "Separator"
             },
             {
-             "listeners" : {
-              "render" : "function (_self)\n{\n   _this.typeCombo = _self;\n}",
-              "select" : "function (combo, record, index)\n{\n   _this.grid.footer.onClick('first');\n}"
-             },
-             "listWidth" : 400,
-             "triggerAction" : "all",
-             "forceSelection" : true,
-             "selectOnFocus" : true,
-             "pageSize" : 20,
-             "displayField" : "display_name",
-             "emptyText" : "Select notify type",
-             "minChars" : 2,
-             "valueField" : "name",
-             "xtype" : "ComboBox",
+             "$ xns" : "Roo.form",
              "allowBlank" : true,
+             "displayField" : "display_name",
              "editable" : true,
-             "width" : 200,
-             "$ xns" : "Roo.form",
-             "qtip" : "Select type",
-             "queryParam" : "query[name]",
-             "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{display_name}</b></div>",
-             "loadingText" : "Searching...",
+             "emptyText" : "Select notify type",
+             "forceSelection" : true,
              "items" : [
               {
-               "listeners" : {
-                "|beforeload" : "function (_self, o){\n    o.params = o.params || {};\n    o.params.etype = 'Core.NotifyType';\n    o.params.active = 1;\n}\n"
-               },
-               "xtype" : "Store",
-               "remoteSort" : true,
                "$ sortInfo" : "{ direction : 'ASC', field: 'id' }",
                "$ xns" : "Roo.data",
                "* prop" : "store",
                "items" : [
                 {
                  "$ url" : "baseURL + '/Roo/core_enum.php'",
-                 "method" : "GET",
-                 "xtype" : "HttpProxy",
                  "$ xns" : "Roo.data",
-                 "* prop" : "proxy"
+                 "* prop" : "proxy",
+                 "method" : "GET",
+                 "xtype" : "HttpProxy"
                 },
                 {
-                 "id" : "id",
-                 "root" : "data",
-                 "xtype" : "JsonReader",
-                 "$ xns" : "Roo.data",
                  "$ fields" : "[{\"name\":\"name\",\"type\":\"string\"},{\"name\":\"display_name\",\"type\":\"string\"}]",
+                 "$ xns" : "Roo.data",
                  "* prop" : "reader",
-                 "totalProperty" : "total"
+                 "id" : "id",
+                 "root" : "data",
+                 "totalProperty" : "total",
+                 "xtype" : "JsonReader"
                 }
-               ]
+               ],
+               "listeners" : {
+                "|beforeload" : [
+                 "function (_self, o){",
+                 "    o.params = o.params || {};",
+                 "    o.params.etype = 'Core.NotifyType';",
+                 "    o.params.active = 1;",
+                 "}",
+                 ""
+                ]
+               },
+               "remoteSort" : true,
+               "xtype" : "Store"
               }
-             ]
+             ],
+             "listWidth" : 400,
+             "listeners" : {
+              "render" : [
+               "function (_self)",
+               "{",
+               "   _this.typeCombo = _self;",
+               "}"
+              ],
+              "select" : [
+               "function (combo, record, index)",
+               "{",
+               "   _this.grid.footer.onClick('first');",
+               "}"
+              ]
+             },
+             "loadingText" : "Searching...",
+             "minChars" : 2,
+             "pageSize" : 20,
+             "qtip" : "Select type",
+             "queryParam" : "query[name]",
+             "selectOnFocus" : true,
+             "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{display_name}</b></div>",
+             "triggerAction" : "all",
+             "valueField" : "name",
+             "width" : 200,
+             "xtype" : "ComboBox"
             },
             {
-             "xtype" : "Separator",
-             "$ xns" : "Roo.Toolbar"
+             "$ xns" : "Roo.Toolbar",
+             "xtype" : "Separator"
             },
             {
+             "$ xns" : "Roo.Toolbar",
              "text" : "From",
-             "xtype" : "TextItem",
-             "$ xns" : "Roo.Toolbar"
+             "xtype" : "TextItem"
             },
             {
+             "$ xns" : "Roo.form",
+             "format" : "d/M/Y",
              "listeners" : {
-              "render" : "function (_self)\r\n{\r\n    _this.fromDateSel = _self;\r\n   //_self.setValue(  new Date() );\r\n}",
-              "select" : "function (combo, date)\n{\n    _this.grid.footer.onClick('first');\n}"
+              "render" : [
+               "function (_self)\r",
+               "{\r",
+               "    _this.fromDateSel = _self;\r",
+               "   //_self.setValue(  new Date() );\r",
+               "}"
+              ],
+              "select" : [
+               "function (combo, date)",
+               "{",
+               "    _this.grid.footer.onClick('first');",
+               "}"
+              ]
              },
-             "format" : "d/M/Y",
-             "xtype" : "DateField",
              "width" : 100,
-             "$ xns" : "Roo.form"
+             "xtype" : "DateField"
             },
             {
-             "xtype" : "Separator",
-             "$ xns" : "Roo.Toolbar"
+             "$ xns" : "Roo.Toolbar",
+             "xtype" : "Separator"
             },
             {
+             "$ xns" : "Roo.Toolbar",
              "text" : "To",
-             "xtype" : "TextItem",
-             "$ xns" : "Roo.Toolbar"
+             "xtype" : "TextItem"
             },
             {
+             "$ xns" : "Roo.form",
+             "format" : "d/M/Y",
              "listeners" : {
-              "render" : "function (_self)\r\n{\r\n    _this.toDateSel = _self;\r\n   //_self.setValue(  new Date() );\r\n}",
-              "select" : "function (combo, date)\n{\n    _this.grid.footer.onClick('first');\n}"
+              "render" : [
+               "function (_self)\r",
+               "{\r",
+               "    _this.toDateSel = _self;\r",
+               "   //_self.setValue(  new Date() );\r",
+               "}"
+              ],
+              "select" : [
+               "function (combo, date)",
+               "{",
+               "    _this.grid.footer.onClick('first');",
+               "}"
+              ]
              },
-             "format" : "d/M/Y",
-             "xtype" : "DateField",
              "width" : 100,
-             "$ xns" : "Roo.form"
+             "xtype" : "DateField"
             },
             {
-             "xtype" : "Fill",
-             "$ xns" : "Roo.Toolbar"
+             "$ xns" : "Roo.Toolbar",
+             "xtype" : "Fill"
             },
             {
+             "$ icon" : "rootURL + '/Pman/templates/images/trash.gif'",
+             "$ xns" : "Roo.Toolbar",
+             "cls" : "x-btn-text-icon",
              "listeners" : {
-              "|click" : "function()\n{\n    Pman.genericDelete(_this, 'core_notify'); \n}\n        "
+              "|click" : [
+               "function()",
+               "{",
+               "    Pman.genericDelete(_this, 'core_notify'); ",
+               "}",
+               "        "
+              ]
              },
              "text" : "Delete",
-             "xtype" : "Button",
-             "cls" : "x-btn-text-icon",
-             "$ icon" : "rootURL + '/Pman/templates/images/trash.gif'",
-             "$ xns" : "Roo.Toolbar"
+             "xtype" : "Button"
             },
             {
+             "$ xns" : "Roo.Toolbar",
+             "enableToggle" : true,
              "listeners" : {
-              "toggle" : "function (_self, pressed)\n{\n    this.setText(pressed ? \"Hide Completed\" : \"Show Completed\");\n    _this.grid.footer.onClick('first');\n}",
-              "render" : "function (_self)\n{\n    _this.toggleBtn = _self;\n}"
+              "render" : [
+               "function (_self)",
+               "{",
+               "    _this.toggleBtn = _self;",
+               "}"
+              ],
+              "toggle" : [
+               "function (_self, pressed)",
+               "{",
+               "    this.setText(pressed ? \"Hide Completed\" : \"Show Completed\");",
+               "    _this.grid.footer.onClick('first');",
+               "}"
+              ]
              },
              "text" : "Show Completed",
-             "enableToggle" : true,
-             "xtype" : "Button",
-             "$ xns" : "Roo.Toolbar"
+             "xtype" : "Button"
             }
-           ]
+           ],
+           "xtype" : "Toolbar"
           },
           {
-           "xtype" : "ColumnModel",
-           "sortable" : true,
-           "header" : "id#",
-           "width" : 50,
            "$ renderer" : "function(v) { return String.format('{0}', v ); }",
            "$ xns" : "Roo.grid",
            "* prop" : "colModel[]",
-           "dataIndex" : "id"
+           "dataIndex" : "id",
+           "header" : "id#",
+           "sortable" : true,
+           "width" : 50,
+           "xtype" : "ColumnModel"
           },
           {
-           "xtype" : "ColumnModel",
-           "sortable" : true,
-           "header" : "Method",
-           "width" : 70,
-           "$ renderer" : "function(v,x,r) \n{ \n    var vv = (typeof(r.data.evtype_align) != 'undefined' && r.data.evtype_align) ? r.data.evtype_align : v;\n    return String.format('<span qtip=\"{0}\">{1}</span>', v, vv ); \n}",
+           "$ renderer" : [
+            "function(v,x,r) ",
+            "{ ",
+            "    var vv = (typeof(r.data.evtype_align) != 'undefined' && r.data.evtype_align) ? r.data.evtype_align : v;",
+            "    return String.format('<span qtip=\"{0}\">{1}</span>', v, vv ); ",
+            "}"
+           ],
            "$ xns" : "Roo.grid",
            "* prop" : "colModel[]",
-           "dataIndex" : "evtype"
+           "dataIndex" : "evtype",
+           "header" : "Method",
+           "sortable" : true,
+           "width" : 70,
+           "xtype" : "ColumnModel"
           },
           {
-           "xtype" : "ColumnModel",
-           "sortable" : true,
-           "header" : "Act when",
-           "width" : 130,
            "$ renderer" : "function(v) { return String.format('{0}', v ? v.format('d/M/Y H:i:s') : ''); }",
            "$ xns" : "Roo.grid",
            "* prop" : "colModel[]",
-           "dataIndex" : "act_when"
-          },
-          {
-           "xtype" : "ColumnModel",
+           "dataIndex" : "act_when",
+           "header" : "Act when",
            "sortable" : true,
-           "header" : "Sent",
            "width" : 130,
-           "$ renderer" : "function(v,x,r) {\n    if (r.data.event_id *1 == 0) {\n        return '';\n    }\n     return String.format('{0}', v ? v.format('d/M/Y H:i:s') : '');\n  }",
+           "xtype" : "ColumnModel"
+          },
+          {
+           "$ renderer" : [
+            "function(v,x,r) {",
+            "    if (r.data.event_id *1 == 0) {",
+            "        return '';",
+            "    }",
+            "     return String.format('{0}', v ? v.format('d/M/Y H:i:s') : '');",
+            "  }"
+           ],
            "$ xns" : "Roo.grid",
            "* prop" : "colModel[]",
-           "dataIndex" : "sent"
+           "dataIndex" : "sent",
+           "header" : "Sent",
+           "sortable" : true,
+           "width" : 130,
+           "xtype" : "ColumnModel"
           },
           {
-           "xtype" : "ColumnModel",
-           "width" : 150,
-           "header" : "Ontable",
            "$ renderer" : "function(v,x,r) { return String.format('{0}:{1}', v,r.data.onid); }",
            "$ xns" : "Roo.grid",
            "* prop" : "colModel[]",
-           "dataIndex" : "ontable"
+           "dataIndex" : "ontable",
+           "header" : "Ontable",
+           "width" : 150,
+           "xtype" : "ColumnModel"
           },
           {
-           "xtype" : "ColumnModel",
-           "width" : 100,
-           "header" : "Who to notify",
-           "$ renderer" : "function(v,x,r) {\n\n    var pt = r.data.person_table.toLowerCase() ;\n    var pt = pt.length ? pt : 'person';\n     var ecol = pt + '_id_email' ;\n     var ncol = pt + '_id_name' ;\n     return String.format('{0} <u>&lt;{1}&gt;</u>', r.data[ncol], r.data[ecol]); \n }",
+           "$ renderer" : [
+            "function(v,x,r) {",
+            "",
+            "    var pt = r.data.person_table.toLowerCase() ;",
+            "    var pt = pt.length ? pt : 'person';",
+            "     var ecol = pt + '_id_email' ;",
+            "     var ncol = pt + '_id_name' ;",
+            "     return String.format('{0} <u>&lt;{1}&gt;</u>', r.data[ncol], r.data[ecol]); ",
+            " }"
+           ],
            "$ xns" : "Roo.grid",
            "* prop" : "colModel[]",
-           "dataIndex" : "person_id_name"
+           "dataIndex" : "person_id_name",
+           "header" : "Who to notify",
+           "width" : 100,
+           "xtype" : "ColumnModel"
           },
           {
-           "xtype" : "ColumnModel",
-           "width" : 100,
-           "header" : "Triggered by",
-           "$ renderer" : "function(v,x,r) {\n     return String.format(\n            '{0} : {1} {2}', \n            r.data.trigger_event_id_on_table, \n            r.data.trigger_event_id_on_id, \n            r.data.trigger_event_id_remarks\n        ); \n }",
+           "$ renderer" : [
+            "function(v,x,r) {",
+            "     return String.format(",
+            "            '{0} : {1} {2}', ",
+            "            r.data.trigger_event_id_on_table, ",
+            "            r.data.trigger_event_id_on_id, ",
+            "            r.data.trigger_event_id_remarks",
+            "        ); ",
+            " }"
+           ],
            "$ xns" : "Roo.grid",
            "* prop" : "colModel[]",
-           "dataIndex" : "trigger_event_id"
+           "dataIndex" : "trigger_event_id",
+           "header" : "Triggered by",
+           "width" : 100,
+           "xtype" : "ColumnModel"
           },
           {
-           "xtype" : "ColumnModel",
-           "header" : "Msgid",
-           "width" : 50,
            "$ renderer" : "function(v) { return String.format('{0}', v); }",
            "$ xns" : "Roo.grid",
            "* prop" : "colModel[]",
-           "dataIndex" : "msgid"
+           "dataIndex" : "msgid",
+           "header" : "Msgid",
+           "width" : 50,
+           "xtype" : "ColumnModel"
           },
           {
-           "xtype" : "ColumnModel",
-           "width" : 300,
-           "header" : "Event",
            "$ renderer" : "function(v) { return String.format('<span qtip=\"{0}\">{0}</span>', v); }",
            "$ xns" : "Roo.grid",
            "* prop" : "colModel[]",
-           "dataIndex" : "event_id_remarks"
+           "dataIndex" : "event_id_remarks",
+           "header" : "Event",
+           "width" : 300,
+           "xtype" : "ColumnModel"
           }
-         ]
+         ],
+         "listeners" : {
+          "|render" : [
+           "function() ",
+           "{",
+           "    _this.grid = this; ",
+           "    //_this.dialog = Pman.Dialog.FILL_IN",
+           "    if (_this.panel.active) {",
+           "       this.footer.onClick('first');",
+           "    }",
+           "}"
+          ]
+         },
+         "loadMask" : true,
+         "xtype" : "Grid"
         }
-       ]
+       ],
+       "listeners" : {
+        "|activate" : [
+         "function() {",
+         "    _this.panel = this;",
+         "    if (_this.grid) {",
+         "        _this.grid.footer.onClick('first');",
+         "    }",
+         "    ",
+         "}"
+        ]
+       },
+       "region" : "center",
+       "tableName" : "core_notify",
+       "title" : "Current Notifications",
+       "xtype" : "GridPanel"
       },
       {
+       "$ xns" : "Roo",
+       "fitToFrame" : true,
        "listeners" : {
-        "render" : "function (_self)\n{\n  _this.viewPanel = _self;\n}"
+        "render" : [
+         "function (_self)",
+         "{",
+         "  _this.viewPanel = _self;",
+         "}"
+        ]
        },
-       "fitToFrame" : true,
        "region" : "south",
-       "xtype" : "ContentPanel",
-       "$ xns" : "Roo"
+       "xtype" : "ContentPanel"
       }
-     ]
+     ],
+     "xtype" : "BorderLayout"
     }
-   ]
+   ],
+   "listeners" : {
+    "render" : [
+     "function (_self)",
+     "{",
+     "    _this.nest = this;",
+     "}"
+    ]
+   },
+   "xtype" : "NestedLayoutPanel"
   }
- ]
+ ],
+ "modOrder" : "001",
+ "name" : "Pman.Tab.AdminNotify",
+ "parent" : "Pman.Tab.AdminWatchNotify",
+ "path" : "/home/alan/gitlive/Pman.Admin/Pman.Tab.AdminNotify.bjs",
+ "permname" : "",
+ "strings" : {
+  "0f6d01b16d57911731aa44b94dbfefcc" : "Act when",
+  "1243daf593fa297e07ab03bf06d925af" : "Searching...",
+  "12832b4def6eb0b6105b3d11e16066ea" : "Msgid",
+  "12ea1a38991aa3bc4992b10adac0f3bc" : "Event Details",
+  "136fac3c5c5881e0a7d0039e57decd68" : "Select notify type",
+  "24463f10155b8af973300f86302c4fde" : "Who to notify",
+  "478192f02d448c49bc6b7d76818d8483" : "Ontable",
+  "4c3880bb027f159e801041b1021e88e8" : "Method",
+  "5da618e8e4b89c66fe86e32cdafde142" : "From",
+  "7f8c0283f16925caed8e632086b81b9c" : "Sent",
+  "8535bcc0f05358a583bb432bbadf7e0d" : "Select type",
+  "a4ecfc70574394990cf17bd83df499f7" : "Event",
+  "aed6676e8238afe7cf55e3baf2ad72a2" : "Search Subject",
+  "b22e7ea679daf5146f08f477419dd8bd" : "Triggered by",
+  "bf1cb7e2a337a5e2ebf614009cbce9cc" : "Current Notifications",
+  "c956c97343a45cca5d492e70c56daa8e" : "Select person",
+  "dc873ea4b71ca217b0d8d1fdd45854ac" : "id#",
+  "dca4dd744d00b6fe1362ef7825ffdee5" : "No core_notify found",
+  "e12167aa0a7698e6ebc92b4ce3909b53" : "To",
+  "e4b478c05a833569833f9cc63b6c4354" : "Displaying core_notify{0} - {1} of {2}",
+  "f2a6c498fb90ee345d997f888fce3b18" : "Delete",
+  "f821027bade4aa6b7a4191cd1676cf41" : "Show Completed"
+ },
+ "title" : "Pman.Tab.AdminNotify"
 }
\ No newline at end of file
index ba691e8..5326e59 100644 (file)
@@ -578,7 +578,7 @@ Pman.Tab.AdminNotify = new Roo.XComponent({
        },
        sm : {
         xtype : 'RowSelectionModel',
-        singleSelect : true,
+        singleSelect : false,
         listeners : {
          afterselectionchange : function (_self)
           {