Pman.Tab.AdminLogEvents.bjs
authorEdward <edward@roojs.com>
Thu, 18 Dec 2014 08:23:26 +0000 (16:23 +0800)
committerEdward <edward@roojs.com>
Thu, 18 Dec 2014 08:23:26 +0000 (16:23 +0800)
Pman.Tab.AdminLogEvents.js

Pman.Tab.AdminLogEvents.bjs
Pman.Tab.AdminLogEvents.js

index 6351a1b..976fcb1 100644 (file)
@@ -8,8 +8,8 @@
     "items" : [
         {
             "region" : "center",
-            "xtype" : "NestedLayoutPanel",
             "title" : "Events",
+            "xtype" : "NestedLayoutPanel",
             "$ xns" : "Roo",
             "items" : [
                 {
@@ -43,9 +43,9 @@
                             "listeners" : {
                                 "|activate" : "function() {\n    _this.panel = this;\n    if (_this.grid) {\n        _this.grid.footer.onClick('first');\n    }\n}"
                             },
+                            "region" : "center",
                             "fitToframe" : true,
                             "background" : false,
-                            "region" : "center",
                             "title" : "Events",
                             "xtype" : "GridPanel",
                             "fitContainer" : true,
@@ -92,8 +92,8 @@
                                                 },
                                                 {
                                                     "$ url" : "baseURL + '/Roo/Events.php'",
-                                                    "method" : "GET",
                                                     "xtype" : "HttpProxy",
+                                                    "method" : "GET",
                                                     "$ xns" : "Roo.data",
                                                     "* prop" : "proxy"
                                                 }
                                                     "loadingText" : "Searching...",
                                                     "items" : [
                                                         {
-                                                            "| data" : "(function() { \n\n    if(typeof(uiConfig.events_person_table) == 'undefined' || !uiConfig.events_person_table.length){\n\n        return [];        \n    }\n\n    return uiConfig.events_person_table;\n    \n})()",
+                                                            "| data" : "(function() { \n\n    if(typeof(uiConfig) == 'undefined' || typeof(uiConfig.events_person_table) == 'undefined' || !uiConfig.events_person_table.length){\n\n        return [];        \n    }\n\n    return uiConfig.events_person_table;\n    \n})()",
                                                             "xtype" : "SimpleStore",
                                                             "$ fields" : "[ 'value' ]",
                                                             "$ xns" : "Roo.data",
                                                             "items" : [
                                                                 {
                                                                     "$ url" : "baseURL + '/Roo/Person.php'",
-                                                                    "xtype" : "HttpProxy",
                                                                     "method" : "GET",
+                                                                    "xtype" : "HttpProxy",
                                                                     "$ xns" : "Roo.data",
                                                                     "* prop" : "proxy"
                                                                 },
                                                             "items" : [
                                                                 {
                                                                     "$ url" : "baseURL + '/Roo/Events.php'",
-                                                                    "xtype" : "HttpProxy",
                                                                     "method" : "GET",
+                                                                    "xtype" : "HttpProxy",
                                                                     "$ xns" : "Roo.data",
                                                                     "* prop" : "proxy"
                                                                 },
                                                             "items" : [
                                                                 {
                                                                     "$ url" : "baseURL + '/Roo/Events.php'",
-                                                                    "xtype" : "HttpProxy",
                                                                     "method" : "GET",
+                                                                    "xtype" : "HttpProxy",
                                                                     "$ xns" : "Roo.data",
                                                                     "* prop" : "proxy"
                                                                 },
                                         },
                                         {
                                             "xtype" : "ColumnModel",
-                                            "header" : "When",
                                             "width" : 100,
+                                            "header" : "When",
                                             "$ renderer" : "function(v) { return v ? v.dateFormat('d/m/Y H:i') : ''; }",
                                             "$ xns" : "Roo.grid",
                                             "* prop" : "colModel[]",
                                         },
                                         {
                                             "xtype" : "ColumnModel",
-                                            "header" : "#id",
                                             "width" : 100,
+                                            "header" : "#id",
                                             "$ xns" : "Roo.grid",
                                             "* prop" : "colModel[]",
                                             "dataIndex" : "id"
                                         },
                                         {
                                             "xtype" : "ColumnModel",
-                                            "header" : "Staff",
                                             "width" : 150,
+                                            "header" : "Staff",
                                             "$ renderer" : "function(v,x,r) { \n    \n    var efield = typeof(_this.email_field) == 'undefined' ? 'person_id_email' : _this.email_field;\n    var nfield = typeof(_this.name_field) == 'undefined' ? 'person_id_name' : _this.name_field;    \n    \n    //Roo.log([r, efield, nfield]);\n    \n    var email = r.json[efield]; // ? r.data.person_id_email : r.data.person_id_email;\n    var name  = r.json[nfield]; // ? r.data.person_id_name : r.data.person_id_name;    \n    return String.format('{0} &lt;<a href=\"mailto:{1}\">{1}</a>&gt;', \n        name, email); \n\n\n}",
                                             "$ xns" : "Roo.grid",
                                             "* prop" : "colModel[]",
                                         },
                                         {
                                             "xtype" : "ColumnModel",
-                                            "width" : 100,
                                             "header" : "Action",
+                                            "width" : 100,
                                             "$ renderer" : "function(v) { return String.format('{0}', v); }",
                                             "$ xns" : "Roo.grid",
                                             "* prop" : "colModel[]",
                                         },
                                         {
                                             "xtype" : "ColumnModel",
-                                            "width" : 100,
                                             "header" : "IP",
+                                            "width" : 100,
                                             "$ renderer" : "function(v) { return String.format('{0}', v); }",
                                             "$ xns" : "Roo.grid",
                                             "* prop" : "colModel[]",
                                         },
                                         {
                                             "xtype" : "ColumnModel",
-                                            "header" : "Affected",
                                             "width" : 100,
+                                            "header" : "Affected",
                                             "$ renderer" : "function(v, x, r) {                     \n            return v ? String.format('{0}({1})', v,  r.data.on_id)  : '';  \n   }",
                                             "$ xns" : "Roo.grid",
                                             "* prop" : "colModel[]",
                                         },
                                         {
                                             "xtype" : "ColumnModel",
-                                            "header" : "Remarks",
                                             "width" : 300,
+                                            "header" : "Remarks",
                                             "$ renderer" : "function(v) { return String.format('<span qtip=\"{1}\">{0}</span>', v, Roo.util.Format.htmlEncode(v)); }",
                                             "$ xns" : "Roo.grid",
                                             "* prop" : "colModel[]",
index e7239df..92c1074 100644 (file)
@@ -192,8 +192,8 @@ Pman.Tab.AdminLogEvents = new Roo.XComponent({
                                 proxy : {
                                     '|xns' : 'Roo.data',
                                     url : baseURL + '/Roo/Events.php',
-                                    method : 'GET',
                                     xtype : 'HttpProxy',
+                                    method : 'GET',
                                     xns : Roo.data
                                 },
                                 '|xns' : 'Roo.data',
@@ -338,7 +338,7 @@ Pman.Tab.AdminLogEvents = new Roo.XComponent({
                                             '|xns' : 'Roo.data',
                                             data : (function() { 
                                             
-                                                if(typeof(uiConfig.events_person_table) == 'undefined' || !uiConfig.events_person_table.length){
+                                                if(typeof(uiConfig) == 'undefined' || typeof(uiConfig.events_person_table) == 'undefined' || !uiConfig.events_person_table.length){
                                             
                                                     return [];        
                                                 }
@@ -392,8 +392,8 @@ Pman.Tab.AdminLogEvents = new Roo.XComponent({
                                             proxy : {
                                                 '|xns' : 'Roo.data',
                                                 url : baseURL + '/Roo/Person.php',
-                                                xtype : 'HttpProxy',
                                                 method : 'GET',
+                                                xtype : 'HttpProxy',
                                                 xns : Roo.data
                                             },
                                             reader : {
@@ -799,8 +799,8 @@ Pman.Tab.AdminLogEvents = new Roo.XComponent({
                                             proxy : {
                                                 '|xns' : 'Roo.data',
                                                 url : baseURL + '/Roo/Events.php',
-                                                xtype : 'HttpProxy',
                                                 method : 'GET',
+                                                xtype : 'HttpProxy',
                                                 xns : Roo.data
                                             },
                                             reader : {
@@ -985,8 +985,8 @@ Pman.Tab.AdminLogEvents = new Roo.XComponent({
                                             proxy : {
                                                 '|xns' : 'Roo.data',
                                                 url : baseURL + '/Roo/Events.php',
-                                                xtype : 'HttpProxy',
                                                 method : 'GET',
+                                                xtype : 'HttpProxy',
                                                 xns : Roo.data
                                             },
                                             reader : {
@@ -1216,8 +1216,8 @@ Pman.Tab.AdminLogEvents = new Roo.XComponent({
                                 {
                                        '|xns' : 'Roo.grid',
                                        xtype : 'ColumnModel',
-                                       header : 'When',
                                        width : 100,
+                                       header : 'When',
                                        renderer : function(v) { return v ? v.dateFormat('d/m/Y H:i') : ''; },
                                        xns : Roo.grid,
                                        dataIndex : 'event_when'
@@ -1225,16 +1225,16 @@ Pman.Tab.AdminLogEvents = new Roo.XComponent({
 {
                                        '|xns' : 'Roo.grid',
                                        xtype : 'ColumnModel',
-                                       header : '#id',
                                        width : 100,
+                                       header : '#id',
                                        xns : Roo.grid,
                                        dataIndex : 'id'
                                    },
 {
                                        '|xns' : 'Roo.grid',
                                        xtype : 'ColumnModel',
-                                       header : 'Staff',
                                        width : 150,
+                                       header : 'Staff',
                                        renderer : function(v,x,r) { 
                                            
                                            var efield = typeof(_this.email_field) == 'undefined' ? 'person_id_email' : _this.email_field;
@@ -1255,8 +1255,8 @@ Pman.Tab.AdminLogEvents = new Roo.XComponent({
 {
                                        '|xns' : 'Roo.grid',
                                        xtype : 'ColumnModel',
-                                       width : 100,
                                        header : 'Action',
+                                       width : 100,
                                        renderer : function(v) { return String.format('{0}', v); },
                                        xns : Roo.grid,
                                        dataIndex : 'action'
@@ -1264,8 +1264,8 @@ Pman.Tab.AdminLogEvents = new Roo.XComponent({
 {
                                        '|xns' : 'Roo.grid',
                                        xtype : 'ColumnModel',
-                                       width : 100,
                                        header : 'IP',
+                                       width : 100,
                                        renderer : function(v) { return String.format('{0}', v); },
                                        xns : Roo.grid,
                                        dataIndex : 'ipaddr'
@@ -1273,8 +1273,8 @@ Pman.Tab.AdminLogEvents = new Roo.XComponent({
 {
                                        '|xns' : 'Roo.grid',
                                        xtype : 'ColumnModel',
-                                       header : 'Affected',
                                        width : 100,
+                                       header : 'Affected',
                                        renderer : function(v, x, r) {                     
                                                    return v ? String.format('{0}({1})', v,  r.data.on_id)  : '';  
                                           },
@@ -1284,8 +1284,8 @@ Pman.Tab.AdminLogEvents = new Roo.XComponent({
 {
                                        '|xns' : 'Roo.grid',
                                        xtype : 'ColumnModel',
-                                       header : 'Remarks',
                                        width : 300,
+                                       header : 'Remarks',
                                        renderer : function(v) { return String.format('<span qtip="{1}">{0}</span>', v, Roo.util.Format.htmlEncode(v)); },
                                        xns : Roo.grid,
                                        dataIndex : 'remarks'
@@ -1306,9 +1306,9 @@ Pman.Tab.AdminLogEvents = new Roo.XComponent({
 
                         },
                         '|xns' : 'Roo',
+                        region : 'center',
                         fitToframe : true,
                         background : false,
-                        region : 'center',
                         title : "Events",
                         xtype : 'GridPanel',
                         fitContainer : true,
@@ -1332,8 +1332,8 @@ Pman.Tab.AdminLogEvents = new Roo.XComponent({
             },
             '|xns' : 'Roo',
             region : 'center',
-            xtype : 'NestedLayoutPanel',
             title : "Events",
+            xtype : 'NestedLayoutPanel',
             xns : Roo,
             items : [