From: Alan Knowles Date: Thu, 10 Dec 2015 06:58:01 +0000 (+0800) Subject: Pman.Tab.AdminLogEvents.bjs X-Git-Url: http://git.roojs.org/?p=Pman.Admin;a=commitdiff_plain;h=cfc6989673abebe695fd49453fa33fbf8010e318 Pman.Tab.AdminLogEvents.bjs Pman.Tab.AdminLogEvents.js --- diff --git a/Pman.Tab.AdminLogEvents.bjs b/Pman.Tab.AdminLogEvents.bjs index 52ff303..3886606 100644 --- a/Pman.Tab.AdminLogEvents.bjs +++ b/Pman.Tab.AdminLogEvents.bjs @@ -2,7 +2,7 @@ "name" : "Pman.Tab.AdminLogEvents", "parent" : "Pman.Tab.AdminLogs", "title" : "Admin - Logs - Events", - "path" : "/home/edward/gitlive/Pman.Admin/Pman.Tab.AdminLogEvents.bjs", + "path" : "/home/alan/gitlive/Pman.Admin/Pman.Tab.AdminLogEvents.bjs", "permname" : "Admin.Logs", "modOrder" : "001", "strings" : { @@ -16,13 +16,12 @@ "01bd6a16732dfa2b760dc8566c58afae" : "Download to Excel", "498f79c4c5bbde77f1bceb6c86fd0f6d" : "Show", "037fd50b0e85bb65995ca7125d06c7cd" : "Select Person Table", - "42cf593b947cd3d591fa132742486f89" : "Person ", - "fd7535ce3979bb8547e2c01689db0767" : "Select Person ", + "40bed7cf9b3d4bb3a3d7a7e3eb18c5eb" : "Person", + "340c2ee497b85d5954b01c64de7f44f6" : "Select Person ", "679308a758de538c5f39c4c6cdba6593" : "Select Affects", "a8929eb5c1553d3f70497f862d25d0ce" : "Select Action", "39b9e051f9fe75e65c7a330bb00499d4" : "Date Range", "4e97aeeaa8b15ca1180fcd1f3ac478d1" : "When", - "40bed7cf9b3d4bb3a3d7a7e3eb18c5eb" : "Person", "004bf6c9a40003140292e97330236c53" : "Action", "2bd339d85ee3b33e513359ce781b60cc" : "Restore", "90e4ac2e5a22e53df63b6b186d8727ba" : "No Events found", @@ -31,8 +30,8 @@ "items" : [ { "region" : "center", - "title" : "Events", "xtype" : "NestedLayoutPanel", + "title" : "Events", "$ xns" : "Roo", "items" : [ { @@ -66,9 +65,9 @@ "listeners" : { "|activate" : "function() {\n _this.panel = this;\n if (_this.grid) {\n _this.grid.footer.onClick('first');\n }\n}" }, + "fitToframe" : true, "background" : false, "region" : "center", - "fitToframe" : true, "title" : "Events", "xtype" : "GridPanel", "fitContainer" : true, @@ -115,8 +114,8 @@ }, { "$ url" : "baseURL + '/Roo/Events.php'", - "xtype" : "HttpProxy", "method" : "GET", + "xtype" : "HttpProxy", "$ xns" : "Roo.data", "* prop" : "proxy" } @@ -238,7 +237,7 @@ "items" : [ { "listeners" : { - "|beforeload" : "function (_self, o)\n{\n o.params = o.params || {};\n o.params.company_id = Pman.Login.authUser.company_id;\n}" + "|beforeload" : "function (_self, o)\n{\n o.params = o.params || {};\n // this will show everyone... - for MO - that means they can see users.\n //o.params.company_id = Pman.Login.authUser.company_id;\n}" }, "xtype" : "Store", "remoteSort" : true, @@ -248,8 +247,8 @@ "items" : [ { "$ url" : "baseURL + '/Roo/Person.php'", - "method" : "GET", "xtype" : "HttpProxy", + "method" : "GET", "$ xns" : "Roo.data", "* prop" : "proxy" }, @@ -304,8 +303,8 @@ "items" : [ { "$ url" : "baseURL + '/Roo/Events.php'", - "method" : "GET", "xtype" : "HttpProxy", + "method" : "GET", "$ xns" : "Roo.data", "* prop" : "proxy" }, @@ -360,8 +359,8 @@ "items" : [ { "$ url" : "baseURL + '/Roo/Events.php'", - "method" : "GET", "xtype" : "HttpProxy", + "method" : "GET", "$ xns" : "Roo.data", "* prop" : "proxy" }, @@ -405,8 +404,8 @@ }, { "xtype" : "ColumnModel", - "width" : 100, "header" : "When", + "width" : 100, "$ renderer" : "function(v) { return v ? v.dateFormat('d/m/Y H:i') : ''; }", "$ xns" : "Roo.grid", "* prop" : "colModel[]", @@ -414,16 +413,16 @@ }, { "xtype" : "ColumnModel", - "width" : 100, "header" : "#id", + "width" : 100, "$ xns" : "Roo.grid", "* prop" : "colModel[]", "dataIndex" : "id" }, { "xtype" : "ColumnModel", - "width" : 150, "header" : "Person", + "width" : 150, "$ renderer" : "function(v,x,r) { \n \n var ptable = _this.tableSel.getValue();\n \n var efield = 'person_id_email';\n var nfield = 'person_id_name'; \n \n if(\n ptable.length &&\n ptable != 'Person' &&\n typeof(r.data[ptable + '_id_email']) != 'undefined' &&\n typeof(r.data[ptable + '_id_name']) != 'undefined'\n ){\n efield = ptable + '_id_email';\n nfield = ptable + '_id_name'; \n }\n \n var email = r.data[efield]; // ? r.data.person_id_email : r.data.person_id_email;\n var name = r.data[nfield]; // ? r.data.person_id_name : r.data.person_id_name; \n return String.format('{0} <{1}>', \n name, email); \n\n\n}", "$ xns" : "Roo.grid", "* prop" : "colModel[]", @@ -431,8 +430,8 @@ }, { "xtype" : "ColumnModel", - "header" : "Action", "width" : 100, + "header" : "Action", "$ renderer" : "function(v) { return String.format('{0}', v); }", "$ xns" : "Roo.grid", "* prop" : "colModel[]", @@ -440,8 +439,8 @@ }, { "xtype" : "ColumnModel", - "header" : "IP", "width" : 100, + "header" : "IP", "$ renderer" : "function(v) { return String.format('{0}', v); }", "$ xns" : "Roo.grid", "* prop" : "colModel[]", @@ -449,8 +448,8 @@ }, { "xtype" : "ColumnModel", - "width" : 100, "header" : "Affected", + "width" : 100, "$ renderer" : "function(v, x, r) { \n return v ? String.format('{0}({1})', v, r.data.on_id) : ''; \n }", "$ xns" : "Roo.grid", "* prop" : "colModel[]", @@ -458,8 +457,8 @@ }, { "xtype" : "ColumnModel", - "width" : 300, "header" : "Remarks", + "width" : 300, "$ renderer" : "function(v) { return String.format('{0}', v, Roo.util.Format.htmlEncode(v)); }", "$ xns" : "Roo.grid", "* prop" : "colModel[]", diff --git a/Pman.Tab.AdminLogEvents.js b/Pman.Tab.AdminLogEvents.js index df43b46..bcfa222 100644 --- a/Pman.Tab.AdminLogEvents.js +++ b/Pman.Tab.AdminLogEvents.js @@ -17,8 +17,8 @@ Pman.Tab.AdminLogEvents = new Roo.XComponent({ '01bd6a16732dfa2b760dc8566c58afae' :"Download to Excel", '498f79c4c5bbde77f1bceb6c86fd0f6d' :"Show", '037fd50b0e85bb65995ca7125d06c7cd' :"Select Person Table", - '42cf593b947cd3d591fa132742486f89' :"Person ", - 'fd7535ce3979bb8547e2c01689db0767' :"Select Person ", + '40bed7cf9b3d4bb3a3d7a7e3eb18c5eb' :"Person ", + '340c2ee497b85d5954b01c64de7f44f6' :"Select Person ", '679308a758de538c5f39c4c6cdba6593' :"Select Affects", 'a8929eb5c1553d3f70497f862d25d0ce' :"Select Action", '39b9e051f9fe75e65c7a330bb00499d4' :"Date Range", @@ -340,15 +340,15 @@ Pman.Tab.AdminLogEvents = new Roo.XComponent({ allowBlank : true, displayField : 'name', editable : true, - emptyText : _this._strings['fd7535ce3979bb8547e2c01689db0767'] /* Select Person */, - fieldLabel : _this._strings['42cf593b947cd3d591fa132742486f89'] /* Person */, + emptyText : _this._strings['340c2ee497b85d5954b01c64de7f44f6'] /* Select Person */, + fieldLabel : _this._strings['40bed7cf9b3d4bb3a3d7a7e3eb18c5eb'] /* Person */, forceSelection : true, listWidth : 600, loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */, minChars : 2, name : 'person_id_name', pageSize : 20, - qtip : _this._strings['fd7535ce3979bb8547e2c01689db0767'] /* Select Person */, + qtip : _this._strings['340c2ee497b85d5954b01c64de7f44f6'] /* Select Person */, queryParam : 'query[name]', selectOnFocus : true, tpl : '
{name} ({company_id_name}) <{email}>
', @@ -380,7 +380,8 @@ Pman.Tab.AdminLogEvents = new Roo.XComponent({ beforeload : function (_self, o) { o.params = o.params || {}; - o.params.company_id = Pman.Login.authUser.company_id; + // this will show everyone... - for MO - that means they can see users. + //o.params.company_id = Pman.Login.authUser.company_id; } }, proxy : {