2 "name" : "Pman.Tab.BAdminIPAccess",
3 "parent" : "Pman.Tab.BAdmin",
5 "path" : "/home/edward/gitlive/Pman.BAdmin/Pman.Tab.BAdminIPAccess.bjs",
9 "ce8ae9da5b7cd6c3df2929543a9af92d" : "Email",
10 "ec211f7c20af43e742bf2570c3cb84f9" : "Add",
11 "0eceeb45861f9585dd7a97a3e36f85c6" : "Created",
12 "ec53a8c4f07baed5d8825072c89799be" : "Status",
13 "7dce122004969d56ae2e0245cb754d35" : "Edit",
14 "a12a3079e14ced46e69ba52b8a90b21a" : "IP",
15 "dae8ace18bdcbcc6ae5aece263e14fe8" : "Options",
16 "f2a6c498fb90ee345d997f888fce3b18" : "Delete",
17 "e3030abfa75de4573fb37032affa11e7" : "IP Access"
22 "$ xns" : "Roo.bootstrap.panel",
23 "String title" : "IP Access",
24 "Boolean background" : true,
28 "$ xns" : "Roo.bootstrap.layout",
32 "String tabPosition" : "top",
34 "Boolean hideTabs" : true,
35 "$ xns" : "Roo.bootstrap.layout",
40 "activate" : "function (_self)\n{\n _this.edit_btn.hide();\n _this.delete_btn.hide();\n \n if (_this.option_grid) {\n _this.option_grid.store.load({});\n }\n}",
41 "render" : "function (_self)\n{\n _this.option_panel = _self;\n}"
43 "Boolean fitContainer" : true,
45 "Boolean fitToFrame" : true,
46 "String region" : "center",
47 "$ xns" : "Roo.bootstrap.panel",
48 "String title" : "Options",
49 "Boolean background" : false,
52 "xtype" : "NavSimplebar",
53 "$ xns" : "Roo.bootstrap",
58 "$ xns" : "Roo.bootstrap",
62 "$ xns" : "Roo.bootstrap",
66 "$ xns" : "Roo.bootstrap",
69 "String cls" : "roo-toolbar",
71 "$ xns" : "Roo.bootstrap",
76 "$ xns" : "Roo.bootstrap",
80 "click" : "function (_self, e)\n{\n var sel = _this.type_grid.getSelectionModel().getSelected();\n \n if(!sel || sel.data.id * 1 < 1 || !sel.data.name.length ){\n Roo.bootstrap.MessageBox.alert('Error', 'Please select a type');\n return;\n }\n\n Pman.Dialog.BAdminCoreEnum.show({ \n id : 0,\n etype : sel.data.name\n }, function(res) {\n _this.option_grid.store.load({});\n });\n\n}"
82 "String cls" : "roo-toolbar-button",
83 "String weight" : "default",
85 "$ xns" : "Roo.bootstrap",
86 "String html" : "Add",
87 "String glyphicon" : "plus"
91 "render" : "function (_self)\n{\n _this.edit_btn = this;\n \n this.hide();\n}",
92 "click" : "function (_self, e)\n{\n var sel = _this.option_grid.getSelectionModel().getSelected();\n \n if(!sel || sel.data.id * 1 < 1){\n Roo.bootstrap.MessageBox.alert('Error', 'Please select a option');\n return;\n }\n\n Pman.Dialog.BAdminCoreEnum.show({ \n id : sel.data.id\n }, function(res) {\n _this.option_grid.store.load({});\n });\n\n}"
94 "String cls" : "roo-toolbar-button",
95 "String weight" : "default",
97 "$ xns" : "Roo.bootstrap",
98 "String html" : "Edit",
99 "String glyphicon" : "edit"
103 "render" : "function (_self)\n{\n _this.delete_btn = this;\n \n this.hide();\n}",
104 "click" : "function (_self, e)\n{\n var sel = _this.option_grid.getSelectionModel().getSelected();\n \n if(!sel || sel.data.id * 1 < 1){\n Roo.bootstrap.MessageBox.alert('Error', 'Please select a option');\n return;\n }\n\n new Pman.Request({\n url: baseURL + '/Roo/Core_enum.php',\n method : 'POST',\n params : {\n _delete : sel.data.id\n }, \n success : function(res) {\n _this.option_grid.store.load({});\n }\n });\n\n}"
106 "String cls" : "roo-toolbar-button",
107 "String weight" : "primary",
109 "$ xns" : "Roo.bootstrap",
110 "String html" : "Delete",
111 "String glyphicon" : "trash"
127 "rowdblclick" : "function (_self, el, rowIndex, e)\n{\n var sel = _this.option_grid.store.getAt(rowIndex);\n \n if(!sel || sel.data.id * 1 < 1){\n return;\n }\n \n Pman.Dialog.BAdminCoreEnum.show({ \n id : sel.data.id\n }, function(res) {\n _this.option_grid.store.load({});\n });\n \n}",
128 "cellclick" : "function (_self, el, rowIndex, columnIndex, e)\n{\n var di = _this.option_grid.colModel.getDataIndex(columnIndex);\n \n if (di != 'active') {\n return;\n }\n \n var rec = _this.option_grid.store.getAt(rowIndex);\n \n rec.set('active', rec.data.active ? 0 : 1);\n \n rec.commit();\n}",
129 "render" : "function (_self)\n{\n _this.option_grid = _self; \n\n}"
131 "Boolean cellSelection" : true,
132 "String cls" : "table-fixed",
133 "Boolean footerShow" : false,
134 "boolean hover" : true,
135 "boolean striped" : true,
137 "boolean responsive" : true,
138 "Boolean rowSelection" : true,
139 "$ xns" : "Roo.bootstrap",
140 "Boolean loadMask" : true,
145 "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}"
147 "Boolean singleSelect" : true,
148 "xtype" : "RowSelectionModel",
149 "$ xns" : "Roo.bootstrap.Table",
154 "update" : "function (_self, record, operation)\n{\n if (operation != 'commit') {\n return;\n }\n\n new Pman.Request({\n url : baseURL + '/Roo/Core_enum',\n method :'POST',\n params : {\n id : record.data.id,\n active: record.data.active\n },\n success : function() {\n\n },\n failure : function() \n {\n Roo.bootstrap.MessageBox.alert(\"Error\", \"saving failed\", function() {\n _this.grid.footer.onClick('first');\n });\n }\n });\n}",
155 "beforeload" : "function (_self, o)\n{\n o.params = o.params || {};\n \n \n}",
156 "load" : "function (_self, records, options)\n{\n _this.edit_btn.hide();\n _this.delete_btn.hide();\n}"
159 "boolean remoteSort" : true,
160 "$ xns" : "Roo.data",
161 "$ sortinfo" : "{ field : 'display_name', direction: 'ASC' }",
165 "$ 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]",
166 "xtype" : "JsonReader",
167 "String root" : "data",
168 "$ xns" : "Roo.data",
171 "String totalProperty" : "total"
174 "$ url" : "baseURL + '/Roo/Core_ip_access.php'",
175 "xtype" : "HttpProxy",
176 "$ xns" : "Roo.data",
177 "String method" : "GET",
183 "String header" : "Created",
184 "String cursor" : "pointer",
185 "String dataIndex" : "created_dt",
186 "xtype" : "ColumnModel",
187 "$ xns" : "Roo.grid",
188 "$ renderer" : "function(v,x,r) { \n return String.format('{0}', v ? v : '');\n}",
189 "Boolean sortable" : true,
193 "String header" : "IP",
194 "String cursor" : "pointer",
195 "String dataIndex" : "ip",
196 "xtype" : "ColumnModel",
197 "$ xns" : "Roo.grid",
198 "$ renderer" : "function(v,x,r) { \n return String.format('{0}', v ? v : '');\n}",
199 "Boolean sortable" : true,
203 "String header" : "Email",
204 "String cursor" : "pointer",
205 "String dataIndex" : "email",
206 "xtype" : "ColumnModel",
207 "$ xns" : "Roo.grid",
208 "$ renderer" : "function(v,x,r) \n{ \n return String.format('<a href=\"mailto:{0}\">{0}</a>', v ? v : '')\n}",
209 "Boolean sortable" : true,
213 "String header" : "Status",
214 "String cursor" : "pointer",
215 "String dataIndex" : "status",
216 "xtype" : "ColumnModel",
217 "$ xns" : "Roo.grid",
218 "$ 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}",
219 "Boolean sortable" : true,