{ "name" : "Pman.Tab.BAdminIPAccess", "parent" : "Pman.Tab.BAdmin", "title" : "", "path" : "/home/alan/gitlive/Pman.BAdmin/Pman.Tab.BAdminIPAccess.bjs", "permname" : "", "modOrder" : "006", "strings" : { "ce8ae9da5b7cd6c3df2929543a9af92d" : "Email", "86f16ddf147752b95ffe69e2dfa769a1" : "Authorized By", "ec53a8c4f07baed5d8825072c89799be" : "Status", "7dce122004969d56ae2e0245cb754d35" : "Edit", "fc6f97505d89fe9277965c126744647a" : "No Companies found", "11e8622b4aa4b1924aee81a9ec54c555" : "Create Date", "a12a3079e14ced46e69ba52b8a90b21a" : "IP", "155ca6a755e25c15ad7ce45e2f638f10" : "Displaying Companies{0} - {1} of {2}", "5a787141d53b573ec9b86e900bfe0d79" : "Expire Date", "f2a6c498fb90ee345d997f888fce3b18" : "Delete", "e3030abfa75de4573fb37032affa11e7" : "IP Access" }, "named_strings" : { "footer_displayMsg" : "155ca6a755e25c15ad7ce45e2f638f10", "footer_emptyMsg" : "fc6f97505d89fe9277965c126744647a" }, "items" : [ { "xtype" : "Nest", "$ xns" : "Roo.bootstrap.panel", "String title" : "IP Access", "Boolean background" : true, "items" : [ { "xtype" : "Border", "$ xns" : "Roo.bootstrap.layout", "* prop" : "layout", "items" : [ { "String tabPosition" : "top", "xtype" : "Region", "Boolean hideTabs" : true, "$ xns" : "Roo.bootstrap.layout", "* prop" : "center" }, { "listeners" : { "activate" : "function (_self)\n{\n _this.edit_btn.hide();\n _this.delete_btn.hide();\n \n if (_this.table) {\n _this.table.footer.onClick('first');\n }\n}", "render" : "function (_self)\n{\n _this.grid = _self;\n}" }, "xtype" : "Grid", "Boolean fitToFrame" : true, "$ xns" : "Roo.bootstrap.panel", "String region" : "center", "String title" : "IP Access", "Boolean closable" : false, "items" : [ { "xtype" : "NavSimplebar", "$ xns" : "Roo.bootstrap", "* prop" : "toolbar", "items" : [ { "xtype" : "NavGroup", "$ xns" : "Roo.bootstrap", "items" : [ { "xtype" : "NavItem", "$ xns" : "Roo.bootstrap", "items" : [ { "xtype" : "Element", "$ xns" : "Roo.bootstrap", "items" : [ { "String cls" : "roo-toolbar", "xtype" : "Row", "$ xns" : "Roo.bootstrap", "items" : [ { "Number md" : 3, "xtype" : "Column", "$ xns" : "Roo.bootstrap", "items" : [ { "listeners" : { "render" : "function (_self)\n{\n _this.status = this;\n \n this.setValue(0);\n}", "select" : "function (combo, record, index)\n{\n _this.table.footer.onClick('first'); \n}" }, "Boolean allowBlank" : false, "String name" : "status_name", "String mode" : "local", "String valueField" : "code", "Boolean editable" : false, "xtype" : "ComboBox", "String triggerAction" : "all", "$ xns" : "Roo.bootstrap", "String/Roo.Template tpl" : "
{value}
", "String hiddenName" : "status", "String displayField" : "value", "items" : [ { "$ string data" : "[\n ['0', 'Pending'],\n ['1', 'Approve'],\n ['-2', 'Temporary'],\n ['-1', 'Reject']\n] ", "xtype" : "SimpleStore", "$ xns" : "Roo.data", "$ fields" : "[ 'code', 'value' ]", "* prop" : "store" } ] } ] }, { "Number md" : 9, "xtype" : "Column", "$ xns" : "Roo.bootstrap", "String style" : "text-align: right;", "items" : [ { "listeners" : { "render" : "function (_self)\n{\n _this.edit_btn = this;\n \n this.hide();\n}", "click" : "function (_self, e)\n{\n var sel = _this.table.getSelectionModel().getSelected();\n \n if(!sel || sel.data.id * 1 < 1){\n Roo.bootstrap.MessageBox.alert('Error', 'Please select a row');\n return;\n }\n\n Pman.Dialog.BAdminIPAccess.show({ \n id : sel.data.id\n }, function(res) {\n _this.table.store.load({});\n });\n\n}" }, "String cls" : "roo-toolbar-button", "String weight" : "default", "xtype" : "Button", "$ xns" : "Roo.bootstrap", "String html" : "Edit", "String glyphicon" : "edit" }, { "listeners" : { "render" : "function (_self)\n{\n _this.delete_btn = this;\n \n this.hide();\n}", "click" : "function (_self, e)\n{\n Pman.genericDelete(_this.grid, 'core_ip_access'); \n\n}" }, "String cls" : "roo-toolbar-button", "String weight" : "primary", "xtype" : "Button", "$ xns" : "Roo.bootstrap", "String html" : "Delete", "String glyphicon" : "trash" } ] } ] } ] } ] } ] } ] }, { "listeners" : { "rowdblclick" : "function (_self, el, rowIndex, e)\n{\n var s = _this.table.store.getAt(rowIndex);\n \n if(!s || s.data.id * 1 < 1){\n return;\n }\n \n Pman.Dialog.BAdminIPAccess.show({ \n id : s.data.id\n }, function(res) {\n _this.table.footer.onClick('first');\n });\n}", "render" : "function (_self)\n{\n _this.table = this;\n}" }, "String cls" : "table-fixed", "boolean hover" : true, "boolean striped" : false, "xtype" : "Table", "Boolean rowSelection" : true, "$ xns" : "Roo.bootstrap", "Boolean loadMask" : true, "* prop" : "grid", "items" : [ { "listeners" : { "selectionchange" : "function (_self)\n{\n _this.edit_btn.hide();\n _this.delete_btn.hide();\n \n if (!this.getSelected()) {\n return;\n }\n \n _this.edit_btn.show();\n _this.delete_btn.show();\n \n}" }, "Boolean singleSelect" : true, "xtype" : "RowSelectionModel", "$ xns" : "Roo.bootstrap.Table", "* prop" : "sm" }, { "listeners" : { "beforeload" : "function (_self, o)\n{\n if (!Pman.buildCompleted) {\n return false;\n }\n\n o.params = o.params || {};\n \n var status = _this.status.getValue() * 1;\n \n o.params.status = status;\n \n}", "load" : "function (_self, records, options)\n{\n _this.edit_btn.hide();\n _this.delete_btn.hide();\n}" }, "xtype" : "Store", "boolean remoteSort" : true, "$ xns" : "Roo.data", "$ sortInfo" : "{ field : 'display_name', direction: 'ASC' }", "* prop" : "store", "items" : [ { "$ Array fields" : "[\n {\n 'name': 'id',\n 'type': 'int'\n },\n {\n 'name': 'created_dt',\n 'type': 'date',\n 'formatDate' : 'Y-m-d'\n },\n {\n 'name': 'status',\n 'type': 'int'\n },\n {\n 'name': 'authorized_by',\n 'type': 'int'\n },\n {\n 'name': 'authorized_by_name',\n 'type': 'string'\n },\n {\n 'name': 'authorized_by_email',\n 'type': 'string'\n },\n {\n 'name': 'authorized_key',\n 'type': 'string'\n },\n {\n 'name': 'email',\n 'type': 'string'\n },\n {\n 'name': 'expire_dt',\n 'type': 'date',\n 'formatDate' : 'Y-m-d'\n },\n {\n 'name': 'user_agent',\n 'type': 'string'\n },\n {\n 'name': 'updated_by',\n 'type': 'int'\n },\n {\n 'name': 'updated_by_name',\n 'type': 'string'\n },\n {\n 'name': 'updated_by_email',\n 'type': 'string'\n }\n \n]", "xtype" : "JsonReader", "String root" : "data", "$ xns" : "Roo.data", "String id" : "id", "* prop" : "reader", "String totalProperty" : "total" }, { "$ url" : "baseURL + '/Roo/Core_ip_access.php'", "xtype" : "HttpProxy", "$ xns" : "Roo.data", "String method" : "GET", "* prop" : "proxy" } ] }, { "String header" : "Create Date", "String cursor" : "pointer", "String dataIndex" : "created_dt", "xtype" : "ColumnModel", "Number xs" : 2, "$ xns" : "Roo.grid", "$ renderer" : "function(v,x,r) { \n return String.format('{0}', v ? v.format('Y-m-d') : '');\n}", "Boolean sortable" : true, "* prop" : "cm[]" }, { "String header" : "IP", "String cursor" : "pointer", "String dataIndex" : "ip", "xtype" : "ColumnModel", "Number xs" : 2, "$ xns" : "Roo.grid", "$ renderer" : "function(v,x,r) { \n return String.format('{0}', v ? v : '');\n}", "Boolean sortable" : true, "* prop" : "cm[]" }, { "String header" : "Email", "String cursor" : "pointer", "String dataIndex" : "email", "xtype" : "ColumnModel", "Number xs" : 2, "$ xns" : "Roo.grid", "$ renderer" : "function(v,x,r) \n{ \n return String.format('{0}', v ? v : '')\n}", "Boolean sortable" : true, "* prop" : "cm[]" }, { "String header" : "Authorized By", "String cursor" : "pointer", "String dataIndex" : "authorized_by", "xtype" : "ColumnModel", "Number xs" : 2, "$ xns" : "Roo.grid", "$ renderer" : "function(v,x,r) \n{ \n if(v * 1 == 0){\n return '';\n }\n \n return String.format('{0}', r.data.authorized_by_name);\n}", "Boolean sortable" : true, "* prop" : "cm[]" }, { "String header" : "Status", "String cursor" : "pointer", "String dataIndex" : "status", "xtype" : "ColumnModel", "Number xs" : 2, "$ xns" : "Roo.grid", "$ renderer" : "function(v,x,r) \n{\n v = v * 1;\n \n var status = 'Pending';\n \n switch (v) {\n case 1 :\n status = 'Approve';\n break;\n case -1 :\n status = 'Reject';\n break;\n case -2 :\n status = 'Temporary';\n break;\n default : \n break;\n }\n \n return String.format('{0}', status);\n \n}", "Boolean sortable" : true, "* prop" : "cm[]" }, { "String header" : "Expire Date", "String cursor" : "pointer", "String dataIndex" : "expire_dt", "xtype" : "ColumnModel", "Number xs" : 2, "$ xns" : "Roo.grid", "$ renderer" : "function(v,x,r) { \n \n if(r.data.status * 1 != -2){\n return '';\n }\n \n return String.format('{0}', v ? v.format('Y-m-d') : '');\n}", "Boolean sortable" : true, "* prop" : "cm[]" }, { "Number pageSize" : 25, "String displayMsg" : "Displaying Companies{0} - {1} of {2}", "Boolean displayInfo" : false, "xtype" : "PagingToolbar", "String emptyMsg" : "No Companies found", "$ xns" : "Roo.bootstrap", "* prop" : "footer", "string name" : "footer" } ] } ] } ] } ] } ] }