{ "name" : "Pman.Tab.AdminLogEvents", "parent" : "Pman.Tab.AdminLogs", "title" : "Admin - Logs - Events", "path" : "/home/edward/gitlive/Pman.Admin/Pman.Tab.AdminLogEvents.bjs", "permname" : "Admin.Logs", "modOrder" : "001", "strings" : { "e4ef97f584a9c8d2d686f84569307575" : "Download to Excel (with extra descriptions)", "231bc72756b5e6de492aaaa1577f61b1" : "Remarks", "2ea72778ebaacc973260c88837dd7a2f" : "Displaying Events {0} - {1} of {2}", "87f9f735a1d36793ceaecd4e47124b63" : "Events", "1b7f7d24575cdbfadb83b9587fa1bf97" : "#id", "a12a3079e14ced46e69ba52b8a90b21a" : "IP", "1243daf593fa297e07ab03bf06d925af" : "Searching...", "01bd6a16732dfa2b760dc8566c58afae" : "Download to Excel", "498f79c4c5bbde77f1bceb6c86fd0f6d" : "Show", "037fd50b0e85bb65995ca7125d06c7cd" : "Select Person Table", "40bed7cf9b3d4bb3a3d7a7e3eb18c5eb" : "Person", "340c2ee497b85d5954b01c64de7f44f6" : "Select Person ", "679308a758de538c5f39c4c6cdba6593" : "Select Affects", "a8929eb5c1553d3f70497f862d25d0ce" : "Select Action", "39b9e051f9fe75e65c7a330bb00499d4" : "Date Range", "4e97aeeaa8b15ca1180fcd1f3ac478d1" : "When", "004bf6c9a40003140292e97330236c53" : "Action", "2bd339d85ee3b33e513359ce781b60cc" : "Restore", "90e4ac2e5a22e53df63b6b186d8727ba" : "No Events found", "2c92a9a6a5dbf570825e62eabcdecd8d" : "Affected" }, "items" : [ { "region" : "center", "xtype" : "NestedLayoutPanel", "title" : "Events", "$ xns" : "Roo", "items" : [ { "xtype" : "BorderLayout", "$ xns" : "Roo", "* prop" : "layout", "items" : [ { "xtype" : "LayoutRegion", "$ xns" : "Roo", "* prop" : "center" }, { "autoScroll" : true, "xtype" : "LayoutRegion", "$ xns" : "Roo", "split" : true, "height" : 150, "* prop" : "south" }, { "listeners" : { "render" : "function (_self)\n{\n _this.viewPanel = _self;\n}" }, "fitToFrame" : true, "region" : "south", "xtype" : "ContentPanel", "$ xns" : "Roo" }, { "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", "title" : "Events", "xtype" : "GridPanel", "fitContainer" : true, "$ xns" : "Roo", "tableName" : "Events", "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" : "remarks", "xtype" : "Grid", "loadMask" : true, "$ xns" : "Roo.grid", "* prop" : "grid", "items" : [ { "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.id;\n _this.viewPanel.load( { url : baseURL + \"/Admin/EventView/\" + id + \".html\" });\n \n}" }, "xtype" : "RowSelectionModel", "singleSelect" : true, "$ xns" : "Roo.grid", "* prop" : "sm" }, { "listeners" : { "|beforeload" : "function (_self, o)\n{\n if (!Pman.buildCompleted) {\n return false;\n }\n \n \n if (! _this.personSel) {\n return false;\n }\n o.params = o.params || {};\n o.params.person_id = _this.personSel.getValue();\n o.params.person_table = _this.tableSel.getValue();\n var act = _this.actionSel.getValue();\n if (act.length) {\n o.params.action = act;\n }\n var tbl = _this.affectSel.getValue();\n if (tbl.length) {\n o.params.on_table = tbl;\n }\n act = _this.dateFrom.getValue();\n if (act.format) {\n o.params['query[from]'] = act.format('Y-m-d');\n }\n act = _this.dateTo.getValue();\n if (act.format) {\n o.params['query[to]'] = act.format('Y-m-d');\n }\n \n \n /*\n act = _this.groupedCombo.getValue();\n o.params['query[grouped]'] = act;\n if (o.params['query[grouped]'] == 'gr') {\n \n if (!tbl.length) {\n Roo.MessageBox.alert(\"Error\", \"Select a table to group results on\");\n return false;\n }\n// o.params['_columns'] = \n o.params['_distinct'] = 'on_id';\n \n \n }\n \n */\n\n \n}" }, "xtype" : "Store", "remoteSort" : true, "$ sortInfo" : "{ field: 'event_when', direction: 'DESC'}", "$ xns" : "Roo.data", "* prop" : "dataSource", "items" : [ { "id" : "id", "root" : "data", "xtype" : "JsonReader", "$ xns" : "Roo.data", "$ fields" : "[\n {\n 'name': 'id',\n 'type': 'int'\n },\n {\n 'name': 'person_name',\n 'type': 'string'\n },\n {\n 'name': 'event_when',\n 'type': 'date',\n 'dateFormat': 'Y-m-d'\n },\n {\n 'name': 'action',\n 'type': 'string'\n },\n {\n 'name': 'ipaddr',\n 'type': 'string'\n },\n {\n 'name': 'on_id',\n 'type': 'int'\n },\n {\n 'name': 'on_table',\n 'type': 'string'\n },\n {\n 'name': 'person_id',\n 'type': 'int'\n },\n {\n 'name': 'remarks',\n 'type': 'string'\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]", "* prop" : "reader", "totalProperty" : "total" }, { "$ url" : "baseURL + '/Roo/Events.php'", "method" : "GET", "xtype" : "HttpProxy", "$ xns" : "Roo.data", "* prop" : "proxy" } ] }, { "pageSize" : 25, "xtype" : "PagingToolbar", "emptyMsg" : "No Events found", "$ xns" : "Roo", "displayInfo" : true, "displayMsg" : "Displaying Events {0} - {1} of {2}", "* prop" : "footer", "items" : [ { "listeners" : { "click" : "function (_self, e)\n{\n \n var params = {\n 'sort' : 'event_when',\n 'dir' : 'DESC',\n 'start' : 0,\n 'limit' : 900,\n person_id : _this.personSel.getValue(), \n 'csvTitles[0]' : 'When', 'csvCols[0]' : 'event_when', \n 'csvTitles[1]' : 'Staff', 'csvCols[1]' : 'person_id_name', \n 'csvTitles[2]' : 'Action', 'csvCols[2]' : 'action', \n 'csvTitles[3]' : 'Record ID', 'csvCols[3]' : 'on_id' ,\n 'csvTitles[4]' : 'Record Type', 'csvCols[4]' : 'on_table',\n 'csvTitles[5]' : 'Remarks', 'csvCols[5]' : 'remarks' \n };\n \n params.person_id = _this.personSel.getValue();\n var act = _this.actionSel.getValue();\n if (act.length) {\n params.action = act;\n }\n var tbl = _this.affectSel.getValue();\n if (tbl.length) {\n params.on_table = tbl;\n }\n act = _this.dateFrom.getValue();\n if (act.format) {\n params['query[from]'] = act.format('Y-m-d');\n }\n act = _this.dateTo.getValue();\n if (act.format) {\n params['query[to]'] = act.format('Y-m-d');\n }\n params.limit = 9999;\n \n\n new Pman.download({\n url : baseURL + '/Roo/Events.php',\n params : params ,\n newWindow: true\n \n });\n}" }, "text" : "Download to Excel", "xtype" : "Button", "$ xns" : "Roo.Toolbar" }, { "listeners" : { "click" : "function (_self, e)\n{\n \n var params = {\n 'sort' : 'event_when',\n 'dir' : 'DESC',\n 'start' : 0,\n 'limit' : 900,\n person_id : _this.personSel.getValue(), \n 'csvTitles[0]' : 'ID#', 'csvCols[0]' : 'id', \n 'csvTitles[1]' : 'When', 'csvCols[1]' : 'event_when', \n 'csvTitles[2]' : 'Staff', 'csvCols[2]' : 'person_id_name', \n 'csvTitles[3]' : 'Action', 'csvCols[3]' : 'action', \n 'csvTitles[4]' : 'Record ID', 'csvCols[4]' : 'on_id' ,\n 'csvTitles[5]' : 'Record Type', 'csvCols[5]' : 'on_table',\n 'csvTitles[6]' : 'Remarks', 'csvCols[6]' : 'remarks' \n };\n params._with_obj_summary = 1;\n params.person_id = _this.personSel.getValue();\n var act = _this.actionSel.getValue();\n if (act.length) {\n params.action = act;\n }\n var tbl = _this.affectSel.getValue();\n if (tbl.length) {\n params.on_table = tbl;\n }\n act = _this.dateFrom.getValue();\n if (act.format) {\n params['query[from]'] = act.format('Y-m-d');\n }\n act = _this.dateTo.getValue();\n if (act.format) {\n params['query[to]'] = act.format('Y-m-d');\n }\n params.limit = 9999;\n \n\n new Pman.download({\n url : baseURL + '/Roo/Events.php',\n params : params ,\n newWindow: true\n \n });\n}" }, "text" : "Download to Excel (with extra descriptions)", "xtype" : "Button", "$ xns" : "Roo.Toolbar" }, { "xtype" : "Separator", "$ xns" : "Roo.Toolbar" }, { "listeners" : { "|click" : "function()\n{\n var s = _this.grid.getSelectionModel().getSelected();\n \n if(!s || s.data.id * 1 < 1 || s.data.action != 'DELETE'){\n Roo.MessageBox.alert('Error', 'Please select a deleted person');\n return;\n }\n \n new Pman.Request({\n url: baseURL + '/Roo/Events',\n method : 'POST',\n mask : 'Sending...',\n params : {\n id : s.data.id,\n _restore : 1\n },\n success : function(ret) {\n _this.grid.footer.onClick('refresh');\n Roo.MessageBox.alert('Notice', 'Restored person successfully');\n }\n });\n}\n" }, "text" : "Restore", "xtype" : "Button", "cls" : "x-btn-text-icon", "$ icon" : "Roo.rootURL + 'images/default/tree/leaf.gif'", "$ xns" : "Roo.Toolbar" } ] }, { "xtype" : "Toolbar", "$ xns" : "Roo", "* prop" : "toolbar", "items" : [ { "text" : "Show", "xtype" : "TextItem", "$ xns" : "Roo.Toolbar" }, { "listeners" : { "|render" : "function (_self)\n{\n _this.tableSel = _self;\n \n if(\n typeof(uiConfig) == 'undefined' || \n typeof(uiConfig.events_person_table) == 'undefined' || \n !uiConfig.events_person_table.length\n ){\n this.hide();\n }\n \n}", "|select" : "function (combo, record, index)\n{\n _this.grid.footer.onClick('first');\n}" }, "listWidth" : 300, "triggerAction" : "all", "forceSelection" : true, "selectOnFocus" : true, "pageSize" : 20, "displayField" : "value", "emptyText" : "Select Person Table", "minChars" : 2, "valueField" : "value", "xtype" : "ComboBox", "allowBlank" : true, "typeAhead" : true, "Boolean alwaysQuery" : true, "editable" : false, "width" : 150, "$ xns" : "Roo.form", "name" : "person_table", "qtip" : "Select Person Table", "tpl" : "