Pman.Tab.AdminEnum.bjs
[Pman.Admin] / Pman.Tab.AdminNotify.bjs
index bde4522..32247ad 100644 (file)
   "e4b478c05a833569833f9cc63b6c4354" : "Displaying core_notify{0} - {1} of {2}",
   "4c3880bb027f159e801041b1021e88e8" : "Method",
   "a4ecfc70574394990cf17bd83df499f7" : "Event",
+  "12ea1a38991aa3bc4992b10adac0f3bc" : "Event Details",
   "f2a6c498fb90ee345d997f888fce3b18" : "Delete",
   "f821027bade4aa6b7a4191cd1676cf41" : "Show Completed"
  },
  "items" : [
   {
-   "listeners" : {
-    "|activate" : "function() {\n    _this.panel = this;\n    if (_this.grid) {\n        _this.grid.footer.onClick('first');\n    }\n    \n}"
-   },
-   "bool background" : true,
-   "fitToframe" : true,
-   "region" : "center",
-   "title" : "Current Notifications",
-   "xtype" : "GridPanel",
-   "fitContainer" : true,
+   "xtype" : "NestedLayoutPanel",
    "$ xns" : "Roo",
-   "tableName" : "core_notify",
+   "String region" : "center",
+   "String title" : "Current Notifications",
+   "Boolean background" : false,
    "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",
+     "xtype" : "BorderLayout",
+     "$ xns" : "Roo",
+     "* prop" : "layout",
      "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    }\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}"
-       },
-       "xtype" : "Store",
-       "remoteSort" : true,
-       "$ sortInfo" : "{ field : 'act_when', direction: 'DESC' }",
-       "$ xns" : "Roo.data",
-       "* prop" : "dataSource",
-       "items" : [
-        {
-         "$ url" : "baseURL + '/Roo/core_notify.php'",
-         "method" : "GET",
-         "xtype" : "HttpProxy",
-         "$ xns" : "Roo.data",
-         "* prop" : "proxy"
-        },
-        {
-         "id" : "id",
-         "root" : "data",
-         "xtype" : "JsonReader",
-         "$ 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"
-        }
-       ]
+       "xtype" : "LayoutRegion",
+       "$ xns" : "Roo",
+       "* prop" : "center"
       },
       {
-       "pageSize" : 25,
-       "xtype" : "PagingToolbar",
-       "emptyMsg" : "No core_notify found",
+       "autoScroll" : true,
+       "xtype" : "LayoutRegion",
+       "String collapsedTitle" : "View Details",
        "$ xns" : "Roo",
-       "displayInfo" : true,
-       "displayMsg" : "Displaying core_notify{0} - {1} of {2}",
-       "* prop" : "footer"
+       "Boolean collapsible" : true,
+       "split" : true,
+       "String title" : "Event Details",
+       "height" : 150,
+       "* prop" : "south",
+       "Boolean split" : true
       },
       {
-       "xtype" : "Toolbar",
+       "listeners" : {
+        "|activate" : "function() {\n    _this.panel = this;\n    if (_this.grid) {\n        _this.grid.footer.onClick('first');\n    }\n    \n}"
+       },
+       "bool background" : true,
+       "fitToframe" : true,
+       "region" : "center",
+       "title" : "Current Notifications",
+       "xtype" : "GridPanel",
+       "fitContainer" : true,
        "$ xns" : "Roo",
-       "* prop" : "toolbar",
+       "tableName" : "core_notify",
        "items" : [
         {
          "listeners" : {
-          "render" : "function (_self)\n{\n   _this.personCombo = _self;\n}",
-          "select" : "function (combo, record, index)\n{\n   _this.grid.footer.onClick('first');\n}"
+          "|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}"
          },
-         "listWidth" : 400,
-         "triggerAction" : "all",
-         "forceSelection" : true,
-         "selectOnFocus" : true,
-         "pageSize" : 20,
-         "displayField" : "person_id_name",
-         "emptyText" : "Select person",
-         "minChars" : 2,
-         "valueField" : "person_id",
-         "xtype" : "ComboBox",
-         "allowBlank" : true,
-         "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...",
+         "autoExpandColumn" : "person_id_name",
+         "xtype" : "Grid",
+         "loadMask" : true,
+         "$ xns" : "Roo.grid",
+         "* prop" : "grid",
          "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"
+            "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    }\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}"
            },
            "xtype" : "Store",
            "remoteSort" : true,
-           "$ sortInfo" : "{ direction : 'ASC', field: 'person_id_name' }",
+           "$ sortInfo" : "{ field : 'act_when', direction: 'DESC' }",
            "$ xns" : "Roo.data",
-           "* prop" : "store",
+           "* prop" : "dataSource",
            "items" : [
             {
              "$ url" : "baseURL + '/Roo/core_notify.php'",
              "root" : "data",
              "xtype" : "JsonReader",
              "$ xns" : "Roo.data",
-             "$ fields" : "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"ontable\",\"type\":\"string\"}]",
+             "$ 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"
             }
            ]
-          }
-         ]
-        },
-        {
-         "xtype" : "Separator",
-         "$ xns" : "Roo.Toolbar"
-        },
-        {
-         "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",
-         "allowBlank" : true,
-         "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...",
-         "items" : [
+          },
           {
            "listeners" : {
-            "|beforeload" : "function (_self, o){\n    o.params = o.params || {};\n    o.params.etype = 'Core.NotifyType';\n    o.params.active = 1;\n}\n"
+            "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 < 0) {\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}"
            },
-           "xtype" : "Store",
-           "remoteSort" : true,
-           "$ sortInfo" : "{ direction : 'ASC', field: 'id' }",
-           "$ xns" : "Roo.data",
-           "* prop" : "store",
+           "xtype" : "RowSelectionModel",
+           "singleSelect" : true,
+           "$ xns" : "Roo.grid",
+           "* prop" : "sm"
+          },
+          {
+           "pageSize" : 25,
+           "xtype" : "PagingToolbar",
+           "emptyMsg" : "No core_notify found",
+           "$ xns" : "Roo",
+           "displayInfo" : true,
+           "displayMsg" : "Displaying core_notify{0} - {1} of {2}",
+           "* prop" : "footer"
+          },
+          {
+           "xtype" : "Toolbar",
+           "$ xns" : "Roo",
+           "* prop" : "toolbar",
            "items" : [
             {
-             "$ url" : "baseURL + '/Roo/core_enum.php'",
-             "xtype" : "HttpProxy",
-             "method" : "GET",
-             "$ xns" : "Roo.data",
-             "* prop" : "proxy"
+             "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",
+             "allowBlank" : true,
+             "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...",
+             "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'",
+                 "method" : "GET",
+                 "xtype" : "HttpProxy",
+                 "$ xns" : "Roo.data",
+                 "* prop" : "proxy"
+                },
+                {
+                 "id" : "id",
+                 "root" : "data",
+                 "xtype" : "JsonReader",
+                 "$ xns" : "Roo.data",
+                 "$ fields" : "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"ontable\",\"type\":\"string\"}]",
+                 "* prop" : "reader",
+                 "totalProperty" : "total"
+                }
+               ]
+              }
+             ]
             },
             {
-             "id" : "id",
-             "root" : "data",
-             "xtype" : "JsonReader",
-             "$ xns" : "Roo.data",
-             "$ fields" : "[{\"name\":\"name\",\"type\":\"string\"},{\"name\":\"display_name\",\"type\":\"string\"}]",
-             "* prop" : "reader",
-             "totalProperty" : "total"
+             "xtype" : "Separator",
+             "$ xns" : "Roo.Toolbar"
+            },
+            {
+             "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",
+             "allowBlank" : true,
+             "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...",
+             "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'",
+                 "xtype" : "HttpProxy",
+                 "method" : "GET",
+                 "$ xns" : "Roo.data",
+                 "* prop" : "proxy"
+                },
+                {
+                 "id" : "id",
+                 "root" : "data",
+                 "xtype" : "JsonReader",
+                 "$ xns" : "Roo.data",
+                 "$ fields" : "[{\"name\":\"name\",\"type\":\"string\"},{\"name\":\"display_name\",\"type\":\"string\"}]",
+                 "* prop" : "reader",
+                 "totalProperty" : "total"
+                }
+               ]
+              }
+             ]
+            },
+            {
+             "xtype" : "Separator",
+             "$ xns" : "Roo.Toolbar"
+            },
+            {
+             "text" : "From",
+             "xtype" : "TextItem",
+             "$ xns" : "Roo.Toolbar"
+            },
+            {
+             "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}"
+             },
+             "format" : "d/M/Y",
+             "xtype" : "DateField",
+             "width" : 100,
+             "$ xns" : "Roo.form"
+            },
+            {
+             "xtype" : "Separator",
+             "$ xns" : "Roo.Toolbar"
+            },
+            {
+             "text" : "To",
+             "xtype" : "TextItem",
+             "$ xns" : "Roo.Toolbar"
+            },
+            {
+             "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}"
+             },
+             "format" : "d/M/Y",
+             "xtype" : "DateField",
+             "width" : 100,
+             "$ xns" : "Roo.form"
+            },
+            {
+             "xtype" : "Fill",
+             "$ xns" : "Roo.Toolbar"
+            },
+            {
+             "listeners" : {
+              "|click" : "function()\n{\n    Pman.genericDelete(_this, 'core_notify'); \n}\n        "
+             },
+             "text" : "Delete",
+             "xtype" : "Button",
+             "cls" : "x-btn-text-icon",
+             "$ icon" : "rootURL + '/Pman/templates/images/trash.gif'",
+             "$ xns" : "Roo.Toolbar"
+            },
+            {
+             "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}"
+             },
+             "text" : "Show Completed",
+             "enableToggle" : true,
+             "xtype" : "Button",
+             "$ xns" : "Roo.Toolbar"
             }
            ]
+          },
+          {
+           "xtype" : "ColumnModel",
+           "sortable" : true,
+           "header" : "id#",
+           "width" : 50,
+           "$ renderer" : "function(v) { return String.format('{0}', v ); }",
+           "$ xns" : "Roo.grid",
+           "* prop" : "colModel[]",
+           "dataIndex" : "id"
+          },
+          {
+           "xtype" : "ColumnModel",
+           "sortable" : true,
+           "header" : "Method",
+           "width" : 100,
+           "$ 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}",
+           "$ xns" : "Roo.grid",
+           "* prop" : "colModel[]",
+           "dataIndex" : "evtype"
+          },
+          {
+           "xtype" : "ColumnModel",
+           "sortable" : true,
+           "header" : "Act when",
+           "width" : 150,
+           "$ 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",
+           "sortable" : true,
+           "header" : "Sent",
+           "width" : 150,
+           "$ 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  }",
+           "$ xns" : "Roo.grid",
+           "* prop" : "colModel[]",
+           "dataIndex" : "sent"
+          },
+          {
+           "xtype" : "ColumnModel",
+           "header" : "Ontable",
+           "width" : 150,
+           "$ renderer" : "function(v,x,r) { return String.format('{0}:{1}', v,r.data.onid); }",
+           "$ xns" : "Roo.grid",
+           "* prop" : "colModel[]",
+           "dataIndex" : "ontable"
+          },
+          {
+           "xtype" : "ColumnModel",
+           "header" : "Who to notify",
+           "width" : 100,
+           "$ 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 }",
+           "$ xns" : "Roo.grid",
+           "* prop" : "colModel[]",
+           "dataIndex" : "person_id_name"
+          },
+          {
+           "xtype" : "ColumnModel",
+           "header" : "Triggered by",
+           "width" : 100,
+           "$ 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 }",
+           "$ xns" : "Roo.grid",
+           "* prop" : "colModel[]",
+           "dataIndex" : "trigger_event_id"
+          },
+          {
+           "xtype" : "ColumnModel",
+           "width" : 200,
+           "header" : "Msgid",
+           "$ renderer" : "function(v) { return String.format('{0}', v); }",
+           "$ xns" : "Roo.grid",
+           "* prop" : "colModel[]",
+           "dataIndex" : "msgid"
+          },
+          {
+           "xtype" : "ColumnModel",
+           "header" : "Event",
+           "width" : 300,
+           "$ renderer" : "function(v) { return String.format('<span qtip=\"{0}\">{0}</span>', v); }",
+           "$ xns" : "Roo.grid",
+           "* prop" : "colModel[]",
+           "dataIndex" : "event_id_remarks"
           }
          ]
-        },
-        {
-         "xtype" : "Separator",
-         "$ xns" : "Roo.Toolbar"
-        },
-        {
-         "text" : "From",
-         "xtype" : "TextItem",
-         "$ xns" : "Roo.Toolbar"
-        },
-        {
-         "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}"
-         },
-         "format" : "d/M/Y",
-         "xtype" : "DateField",
-         "width" : 100,
-         "$ xns" : "Roo.form"
-        },
-        {
-         "xtype" : "Separator",
-         "$ xns" : "Roo.Toolbar"
-        },
-        {
-         "text" : "To",
-         "xtype" : "TextItem",
-         "$ xns" : "Roo.Toolbar"
-        },
-        {
-         "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}"
-         },
-         "format" : "d/M/Y",
-         "xtype" : "DateField",
-         "width" : 100,
-         "$ xns" : "Roo.form"
-        },
-        {
-         "xtype" : "Fill",
-         "$ xns" : "Roo.Toolbar"
-        },
-        {
-         "listeners" : {
-          "|click" : "function()\n{\n    Pman.genericDelete(_this, 'core_notify'); \n}\n        "
-         },
-         "text" : "Delete",
-         "xtype" : "Button",
-         "cls" : "x-btn-text-icon",
-         "$ icon" : "rootURL + '/Pman/templates/images/trash.gif'",
-         "$ xns" : "Roo.Toolbar"
-        },
-        {
-         "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}"
-         },
-         "text" : "Show Completed",
-         "enableToggle" : true,
-         "xtype" : "Button",
-         "$ xns" : "Roo.Toolbar"
         }
        ]
       },
       {
-       "xtype" : "ColumnModel",
-       "sortable" : true,
-       "header" : "id#",
-       "width" : 50,
-       "$ renderer" : "function(v) { return String.format('{0}', v ); }",
-       "$ xns" : "Roo.grid",
-       "* prop" : "colModel[]",
-       "dataIndex" : "id"
-      },
-      {
-       "xtype" : "ColumnModel",
-       "sortable" : true,
-       "header" : "Method",
-       "width" : 100,
-       "$ 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}",
-       "$ xns" : "Roo.grid",
-       "* prop" : "colModel[]",
-       "dataIndex" : "evtype"
-      },
-      {
-       "xtype" : "ColumnModel",
-       "sortable" : true,
-       "header" : "Act when",
-       "width" : 150,
-       "$ 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",
-       "sortable" : true,
-       "header" : "Sent",
-       "width" : 150,
-       "$ 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  }",
-       "$ xns" : "Roo.grid",
-       "* prop" : "colModel[]",
-       "dataIndex" : "sent"
-      },
-      {
-       "xtype" : "ColumnModel",
-       "header" : "Ontable",
-       "width" : 150,
-       "$ renderer" : "function(v,x,r) { return String.format('{0}:{1}', v,r.data.onid); }",
-       "$ xns" : "Roo.grid",
-       "* prop" : "colModel[]",
-       "dataIndex" : "ontable"
-      },
-      {
-       "xtype" : "ColumnModel",
-       "header" : "Who to notify",
-       "width" : 100,
-       "$ 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 }",
-       "$ xns" : "Roo.grid",
-       "* prop" : "colModel[]",
-       "dataIndex" : "person_id_name"
-      },
-      {
-       "xtype" : "ColumnModel",
-       "header" : "Triggered by",
-       "width" : 100,
-       "$ 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 }",
-       "$ xns" : "Roo.grid",
-       "* prop" : "colModel[]",
-       "dataIndex" : "trigger_event_id"
-      },
-      {
-       "xtype" : "ColumnModel",
-       "width" : 200,
-       "header" : "Msgid",
-       "$ renderer" : "function(v) { return String.format('{0}', v); }",
-       "$ xns" : "Roo.grid",
-       "* prop" : "colModel[]",
-       "dataIndex" : "msgid"
-      },
-      {
-       "xtype" : "ColumnModel",
-       "header" : "Event",
-       "width" : 300,
-       "$ renderer" : "function(v) { return String.format('<span qtip=\"{0}\">{0}</span>', v); }",
-       "$ xns" : "Roo.grid",
-       "* prop" : "colModel[]",
-       "dataIndex" : "event_id_remarks"
+       "listeners" : {
+        "render" : "function (_self)\n{\n  _this.viewPanel = _self;\n}"
+       },
+       "fitToFrame" : true,
+       "region" : "south",
+       "xtype" : "ContentPanel",
+       "$ xns" : "Roo"
       }
      ]
     }