cmmit
authorbenny <benny@roojs.com>
Wed, 5 Sep 2018 03:56:37 +0000 (11:56 +0800)
committerbenny <benny@roojs.com>
Wed, 5 Sep 2018 03:56:37 +0000 (11:56 +0800)
Pman.Tab.AdminNotify.bjs
Pman.Tab.AdminNotify.js

index 32247ad..8537178 100644 (file)
@@ -2,7 +2,7 @@
  "name" : "Pman.Tab.AdminNotify",
  "parent" : "Pman.Tab.AdminWatchNotify",
  "title" : "Pman.Tab.AdminNotify",
- "path" : "/home/alan/gitlive/Pman.Admin/Pman.Tab.AdminNotify.bjs",
+ "path" : "/home/benny/gitlive/web.hhyc_membership_system/Pman.Admin/Pman.Tab.AdminNotify.bjs",
  "permname" : "",
  "modOrder" : "001",
  "strings" : {
@@ -31,8 +31,8 @@
  "items" : [
   {
    "xtype" : "NestedLayoutPanel",
-   "$ xns" : "Roo",
    "String region" : "center",
+   "$ xns" : "Roo",
    "String title" : "Current Notifications",
    "Boolean background" : false,
    "items" : [
@@ -48,8 +48,8 @@
       },
       {
        "autoScroll" : true,
-       "xtype" : "LayoutRegion",
        "String collapsedTitle" : "View Details",
+       "xtype" : "LayoutRegion",
        "$ xns" : "Roo",
        "Boolean collapsible" : true,
        "split" : true,
@@ -63,8 +63,8 @@
         "|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",
+       "fitToframe" : true,
        "title" : "Current Notifications",
        "xtype" : "GridPanel",
        "fitContainer" : true,
@@ -93,8 +93,8 @@
            "items" : [
             {
              "$ url" : "baseURL + '/Roo/core_notify.php'",
-             "method" : "GET",
              "xtype" : "HttpProxy",
+             "method" : "GET",
              "$ xns" : "Roo.data",
              "* prop" : "proxy"
             },
                "items" : [
                 {
                  "$ url" : "baseURL + '/Roo/core_notify.php'",
-                 "method" : "GET",
                  "xtype" : "HttpProxy",
+                 "method" : "GET",
                  "$ xns" : "Roo.data",
                  "* prop" : "proxy"
                 },
                "items" : [
                 {
                  "$ url" : "baseURL + '/Roo/core_enum.php'",
-                 "xtype" : "HttpProxy",
                  "method" : "GET",
+                 "xtype" : "HttpProxy",
                  "$ xns" : "Roo.data",
                  "* prop" : "proxy"
                 },
           },
           {
            "xtype" : "ColumnModel",
-           "header" : "Ontable",
            "width" : 150,
+           "header" : "Ontable",
            "$ renderer" : "function(v,x,r) { return String.format('{0}:{1}', v,r.data.onid); }",
            "$ xns" : "Roo.grid",
            "* prop" : "colModel[]",
           },
           {
            "xtype" : "ColumnModel",
-           "header" : "Who to notify",
            "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 }",
            "$ xns" : "Roo.grid",
            "* prop" : "colModel[]",
           },
           {
            "xtype" : "ColumnModel",
-           "header" : "Triggered by",
            "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 }",
            "$ xns" : "Roo.grid",
            "* prop" : "colModel[]",
           },
           {
            "xtype" : "ColumnModel",
-           "width" : 200,
            "header" : "Msgid",
+           "width" : 200,
            "$ renderer" : "function(v) { return String.format('{0}', v); }",
            "$ xns" : "Roo.grid",
            "* prop" : "colModel[]",
           },
           {
            "xtype" : "ColumnModel",
-           "header" : "Event",
            "width" : 300,
+           "header" : "Event",
            "$ renderer" : "function(v) { return String.format('<span qtip=\"{0}\">{0}</span>', v); }",
            "$ xns" : "Roo.grid",
            "* prop" : "colModel[]",
index d334228..74bf5b9 100644 (file)
@@ -37,27 +37,28 @@ Pman.Tab.AdminNotify = new Roo.XComponent({
   name     : "Pman.Tab.AdminNotify",
   disabled : false, 
   permname : '', 
-  _tree : function()
+  _tree : function(_data)
   {
    var _this = this;
    var MODULE = this;
    return {
+   xtype : 'NestedLayoutPanel',
    background : false,
    region : 'center',
    title : _this._strings['bf1cb7e2a337a5e2ebf614009cbce9cc'] /* Current Notifications */,
    xns : Roo,
    '|xns' : 'Roo',
-   xtype : 'NestedLayoutPanel',
    layout : {
+    xtype : 'BorderLayout',
     xns : Roo,
     '|xns' : 'Roo',
-    xtype : 'BorderLayout',
     center : {
+     xtype : 'LayoutRegion',
      xns : Roo,
-     '|xns' : 'Roo',
-     xtype : 'LayoutRegion'
+     '|xns' : 'Roo'
     },
     south : {
+     xtype : 'LayoutRegion',
      autoScroll : true,
      collapsedTitle : 'View Details',
      collapsible : true,
@@ -65,20 +66,17 @@ Pman.Tab.AdminNotify = new Roo.XComponent({
      split : true,
      title : _this._strings['12ea1a38991aa3bc4992b10adac0f3bc'] /* Event Details */,
      xns : Roo,
-     '|xns' : 'Roo',
-     xtype : 'LayoutRegion'
+     '|xns' : 'Roo'
     },
     items  : [
      {
+      xtype : 'GridPanel',
       background : true,
       fitContainer : true,
       fitToframe : true,
       region : 'center',
       tableName : 'core_notify',
       title : _this._strings['bf1cb7e2a337a5e2ebf614009cbce9cc'] /* Current Notifications */,
-      xns : Roo,
-      '|xns' : 'Roo',
-      xtype : 'GridPanel',
       listeners : {
        activate : function() {
             _this.panel = this;
@@ -88,12 +86,12 @@ Pman.Tab.AdminNotify = new Roo.XComponent({
             
         }
       },
+      xns : Roo,
+      '|xns' : 'Roo',
       grid : {
+       xtype : 'Grid',
        autoExpandColumn : 'person_id_name',
        loadMask : true,
-       xns : Roo.grid,
-       '|xns' : 'Roo.grid',
-       xtype : 'Grid',
        listeners : {
         render : function() 
          {
@@ -104,21 +102,24 @@ Pman.Tab.AdminNotify = new Roo.XComponent({
              }
          }
        },
+       xns : Roo.grid,
+       '|xns' : 'Roo.grid',
        footer : {
+        xtype : 'PagingToolbar',
         displayInfo : true,
         displayMsg : _this._strings['e4b478c05a833569833f9cc63b6c4354'] /* Displaying core_notify{0} - {1} of {2} */,
         emptyMsg : _this._strings['dca4dd744d00b6fe1362ef7825ffdee5'] /* No core_notify found */,
         pageSize : 25,
         xns : Roo,
-        '|xns' : 'Roo',
-        xtype : 'PagingToolbar'
+        '|xns' : 'Roo'
        },
        toolbar : {
+        xtype : 'Toolbar',
         xns : Roo,
         '|xns' : 'Roo',
-        xtype : 'Toolbar',
         items  : [
          {
+          xtype : 'ComboBox',
           allowBlank : true,
           displayField : 'person_id_name',
           editable : true,
@@ -135,9 +136,6 @@ Pman.Tab.AdminNotify = new Roo.XComponent({
           triggerAction : 'all',
           valueField : 'person_id',
           width : 200,
-          xns : Roo.form,
-          '|xns' : 'Roo.form',
-          xtype : 'ComboBox',
           listeners : {
            render : function (_self)
             {
@@ -148,12 +146,12 @@ Pman.Tab.AdminNotify = new Roo.XComponent({
                _this.grid.footer.onClick('first');
             }
           },
+          xns : Roo.form,
+          '|xns' : 'Roo.form',
           store : {
+           xtype : 'Store',
            remoteSort : true,
            sortInfo : { direction : 'ASC', field: 'person_id_name' },
-           xns : Roo.data,
-           '|xns' : 'Roo.data',
-           xtype : 'Store',
            listeners : {
             beforeload : function (_self, o){
                  o.params = o.params || {};
@@ -164,30 +162,33 @@ Pman.Tab.AdminNotify = new Roo.XComponent({
                  // set more here
              }
            },
+           xns : Roo.data,
+           '|xns' : 'Roo.data',
            proxy : {
+            xtype : 'HttpProxy',
             method : 'GET',
             url : baseURL + '/Roo/core_notify.php',
             xns : Roo.data,
-            '|xns' : 'Roo.data',
-            xtype : 'HttpProxy'
+            '|xns' : 'Roo.data'
            },
            reader : {
+            xtype : 'JsonReader',
             fields : [{"name":"id","type":"int"},{"name":"ontable","type":"string"}],
             id : 'id',
             root : 'data',
             totalProperty : 'total',
             xns : Roo.data,
-            '|xns' : 'Roo.data',
-            xtype : 'JsonReader'
+            '|xns' : 'Roo.data'
            }
           }
          },
          {
+          xtype : 'Separator',
           xns : Roo.Toolbar,
-          '|xns' : 'Roo.Toolbar',
-          xtype : 'Separator'
+          '|xns' : 'Roo.Toolbar'
          },
          {
+          xtype : 'ComboBox',
           allowBlank : true,
           displayField : 'display_name',
           editable : true,
@@ -204,9 +205,6 @@ Pman.Tab.AdminNotify = new Roo.XComponent({
           triggerAction : 'all',
           valueField : 'name',
           width : 200,
-          xns : Roo.form,
-          '|xns' : 'Roo.form',
-          xtype : 'ComboBox',
           listeners : {
            render : function (_self)
             {
@@ -217,12 +215,12 @@ Pman.Tab.AdminNotify = new Roo.XComponent({
                _this.grid.footer.onClick('first');
             }
           },
+          xns : Roo.form,
+          '|xns' : 'Roo.form',
           store : {
+           xtype : 'Store',
            remoteSort : true,
            sortInfo : { direction : 'ASC', field: 'id' },
-           xns : Roo.data,
-           '|xns' : 'Roo.data',
-           xtype : 'Store',
            listeners : {
             beforeload : function (_self, o){
                  o.params = o.params || {};
@@ -230,41 +228,41 @@ Pman.Tab.AdminNotify = new Roo.XComponent({
                  o.params.active = 1;
              }
            },
+           xns : Roo.data,
+           '|xns' : 'Roo.data',
            proxy : {
+            xtype : 'HttpProxy',
             method : 'GET',
             url : baseURL + '/Roo/core_enum.php',
             xns : Roo.data,
-            '|xns' : 'Roo.data',
-            xtype : 'HttpProxy'
+            '|xns' : 'Roo.data'
            },
            reader : {
+            xtype : 'JsonReader',
             fields : [{"name":"name","type":"string"},{"name":"display_name","type":"string"}],
             id : 'id',
             root : 'data',
             totalProperty : 'total',
             xns : Roo.data,
-            '|xns' : 'Roo.data',
-            xtype : 'JsonReader'
+            '|xns' : 'Roo.data'
            }
           }
          },
          {
+          xtype : 'Separator',
           xns : Roo.Toolbar,
-          '|xns' : 'Roo.Toolbar',
-          xtype : 'Separator'
+          '|xns' : 'Roo.Toolbar'
          },
          {
+          xtype : 'TextItem',
           text : _this._strings['5da618e8e4b89c66fe86e32cdafde142'] /* From */,
           xns : Roo.Toolbar,
-          '|xns' : 'Roo.Toolbar',
-          xtype : 'TextItem'
+          '|xns' : 'Roo.Toolbar'
          },
          {
+          xtype : 'DateField',
           format : 'd/M/Y',
           width : 100,
-          xns : Roo.form,
-          '|xns' : 'Roo.form',
-          xtype : 'DateField',
           listeners : {
            render : function (_self)\r
             {\r
@@ -275,25 +273,25 @@ Pman.Tab.AdminNotify = new Roo.XComponent({
             {
                 _this.grid.footer.onClick('first');
             }
-          }
+          },
+          xns : Roo.form,
+          '|xns' : 'Roo.form'
          },
          {
+          xtype : 'Separator',
           xns : Roo.Toolbar,
-          '|xns' : 'Roo.Toolbar',
-          xtype : 'Separator'
+          '|xns' : 'Roo.Toolbar'
          },
          {
+          xtype : 'TextItem',
           text : _this._strings['e12167aa0a7698e6ebc92b4ce3909b53'] /* To */,
           xns : Roo.Toolbar,
-          '|xns' : 'Roo.Toolbar',
-          xtype : 'TextItem'
+          '|xns' : 'Roo.Toolbar'
          },
          {
+          xtype : 'DateField',
           format : 'd/M/Y',
           width : 100,
-          xns : Roo.form,
-          '|xns' : 'Roo.form',
-          xtype : 'DateField',
           listeners : {
            render : function (_self)\r
             {\r
@@ -304,33 +302,33 @@ Pman.Tab.AdminNotify = new Roo.XComponent({
             {
                 _this.grid.footer.onClick('first');
             }
-          }
+          },
+          xns : Roo.form,
+          '|xns' : 'Roo.form'
          },
          {
+          xtype : 'Fill',
           xns : Roo.Toolbar,
-          '|xns' : 'Roo.Toolbar',
-          xtype : 'Fill'
+          '|xns' : 'Roo.Toolbar'
          },
          {
+          xtype : 'Button',
           cls : 'x-btn-text-icon',
           icon : rootURL + '/Pman/templates/images/trash.gif',
           text : _this._strings['f2a6c498fb90ee345d997f888fce3b18'] /* Delete */,
-          xns : Roo.Toolbar,
-          '|xns' : 'Roo.Toolbar',
-          xtype : 'Button',
           listeners : {
            click : function()
             {
                 Pman.genericDelete(_this, 'core_notify'); 
             }
-          }
+          },
+          xns : Roo.Toolbar,
+          '|xns' : 'Roo.Toolbar'
          },
          {
+          xtype : 'Button',
           enableToggle : true,
           text : _this._strings['f821027bade4aa6b7a4191cd1676cf41'] /* Show Completed */,
-          xns : Roo.Toolbar,
-          '|xns' : 'Roo.Toolbar',
-          xtype : 'Button',
           listeners : {
            render : function (_self)
             {
@@ -341,16 +339,16 @@ Pman.Tab.AdminNotify = new Roo.XComponent({
                 this.setText(pressed ? "Hide Completed" : "Show Completed");
                 _this.grid.footer.onClick('first');
             }
-          }
+          },
+          xns : Roo.Toolbar,
+          '|xns' : 'Roo.Toolbar'
          }
         ]
        },
        dataSource : {
+        xtype : 'Store',
         remoteSort : true,
         sortInfo : { field : 'act_when', direction: 'DESC' },
-        xns : Roo.data,
-        '|xns' : 'Roo.data',
-        xtype : 'Store',
         listeners : {
          beforeload : function (_self, options)
           {
@@ -388,14 +386,17 @@ Pman.Tab.AdminNotify = new Roo.XComponent({
               }
           }
         },
+        xns : Roo.data,
+        '|xns' : 'Roo.data',
         proxy : {
+         xtype : 'HttpProxy',
          method : 'GET',
          url : baseURL + '/Roo/core_notify.php',
          xns : Roo.data,
-         '|xns' : 'Roo.data',
-         xtype : 'HttpProxy'
+         '|xns' : 'Roo.data'
         },
         reader : {
+         xtype : 'JsonReader',
          fields : [
              {
                  'name': 'id',
@@ -544,15 +545,12 @@ Pman.Tab.AdminNotify = new Roo.XComponent({
          root : 'data',
          totalProperty : 'total',
          xns : Roo.data,
-         '|xns' : 'Roo.data',
-         xtype : 'JsonReader'
+         '|xns' : 'Roo.data'
         }
        },
        sm : {
-        singleSelect : true,
-        xns : Roo.grid,
-        '|xns' : 'Roo.grid',
         xtype : 'RowSelectionModel',
+        singleSelect : true,
         listeners : {
          afterselectionchange : function (_self)
           {
@@ -570,20 +568,23 @@ Pman.Tab.AdminNotify = new Roo.XComponent({
               _this.viewPanel.load( { url : baseURL + "/Admin/EventView/" + id + ".html" });
               
           }
-        }
+        },
+        xns : Roo.grid,
+        '|xns' : 'Roo.grid'
        },
        colModel : [
         {
+         xtype : 'ColumnModel',
          dataIndex : 'id',
          header : _this._strings['dc873ea4b71ca217b0d8d1fdd45854ac'] /* id# */,
          renderer : function(v) { return String.format('{0}', v ); },
          sortable : true,
          width : 50,
          xns : Roo.grid,
-         '|xns' : 'Roo.grid',
-         xtype : 'ColumnModel'
+         '|xns' : 'Roo.grid'
         },
         {
+         xtype : 'ColumnModel',
          dataIndex : 'evtype',
          header : _this._strings['4c3880bb027f159e801041b1021e88e8'] /* Method */,
          renderer : function(v,x,r) 
@@ -594,20 +595,20 @@ Pman.Tab.AdminNotify = new Roo.XComponent({
          sortable : true,
          width : 100,
          xns : Roo.grid,
-         '|xns' : 'Roo.grid',
-         xtype : 'ColumnModel'
+         '|xns' : 'Roo.grid'
         },
         {
+         xtype : 'ColumnModel',
          dataIndex : 'act_when',
          header : _this._strings['0f6d01b16d57911731aa44b94dbfefcc'] /* Act when */,
          renderer : function(v) { return String.format('{0}', v ? v.format('d/M/Y H:i:s') : ''); },
          sortable : true,
          width : 150,
          xns : Roo.grid,
-         '|xns' : 'Roo.grid',
-         xtype : 'ColumnModel'
+         '|xns' : 'Roo.grid'
         },
         {
+         xtype : 'ColumnModel',
          dataIndex : 'sent',
          header : _this._strings['7f8c0283f16925caed8e632086b81b9c'] /* Sent */,
          renderer : function(v,x,r) {
@@ -619,19 +620,19 @@ Pman.Tab.AdminNotify = new Roo.XComponent({
          sortable : true,
          width : 150,
          xns : Roo.grid,
-         '|xns' : 'Roo.grid',
-         xtype : 'ColumnModel'
+         '|xns' : 'Roo.grid'
         },
         {
+         xtype : 'ColumnModel',
          dataIndex : 'ontable',
          header : _this._strings['478192f02d448c49bc6b7d76818d8483'] /* Ontable */,
          renderer : function(v,x,r) { return String.format('{0}:{1}', v,r.data.onid); },
          width : 150,
          xns : Roo.grid,
-         '|xns' : 'Roo.grid',
-         xtype : 'ColumnModel'
+         '|xns' : 'Roo.grid'
         },
         {
+         xtype : 'ColumnModel',
          dataIndex : 'person_id_name',
          header : _this._strings['24463f10155b8af973300f86302c4fde'] /* Who to notify */,
          renderer : function(v,x,r) {
@@ -644,10 +645,10 @@ Pman.Tab.AdminNotify = new Roo.XComponent({
           },
          width : 100,
          xns : Roo.grid,
-         '|xns' : 'Roo.grid',
-         xtype : 'ColumnModel'
+         '|xns' : 'Roo.grid'
         },
         {
+         xtype : 'ColumnModel',
          dataIndex : 'trigger_event_id',
          header : _this._strings['b22e7ea679daf5146f08f477419dd8bd'] /* Triggered by */,
          renderer : function(v,x,r) {
@@ -660,42 +661,41 @@ Pman.Tab.AdminNotify = new Roo.XComponent({
           },
          width : 100,
          xns : Roo.grid,
-         '|xns' : 'Roo.grid',
-         xtype : 'ColumnModel'
+         '|xns' : 'Roo.grid'
         },
         {
+         xtype : 'ColumnModel',
          dataIndex : 'msgid',
          header : _this._strings['12832b4def6eb0b6105b3d11e16066ea'] /* Msgid */,
          renderer : function(v) { return String.format('{0}', v); },
          width : 200,
          xns : Roo.grid,
-         '|xns' : 'Roo.grid',
-         xtype : 'ColumnModel'
+         '|xns' : 'Roo.grid'
         },
         {
+         xtype : 'ColumnModel',
          dataIndex : 'event_id_remarks',
          header : _this._strings['a4ecfc70574394990cf17bd83df499f7'] /* Event */,
          renderer : function(v) { return String.format('<span qtip="{0}">{0}</span>', v); },
          width : 300,
          xns : Roo.grid,
-         '|xns' : 'Roo.grid',
-         xtype : 'ColumnModel'
+         '|xns' : 'Roo.grid'
         }
        ]
       }
      },
      {
+      xtype : 'ContentPanel',
       fitToFrame : true,
       region : 'south',
-      xns : Roo,
-      '|xns' : 'Roo',
-      xtype : 'ContentPanel',
       listeners : {
        render : function (_self)
         {
           _this.viewPanel = _self;
         }
-      }
+      },
+      xns : Roo,
+      '|xns' : 'Roo'
      }
     ]
    }