1 //<script type="text/javascript">
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
5 Roo.namespace('Pman.Tab');
7 Pman.Tab.BAdminIPAccess = new Roo.XComponent({
10 'ec211f7c20af43e742bf2570c3cb84f9' :"Add",
11 '0eceeb45861f9585dd7a97a3e36f85c6' :"Created",
12 '7dce122004969d56ae2e0245cb754d35' :"Edit",
13 '01abfc750a0c942167651c40d088531d' :"#",
14 'a12a3079e14ced46e69ba52b8a90b21a' :"IP",
15 'dae8ace18bdcbcc6ae5aece263e14fe8' :"Options",
16 'f2a6c498fb90ee345d997f888fce3b18' :"Delete",
17 '4d3d769b812b6faa6b76e1a8abaece2d' :"Active",
18 'e3030abfa75de4573fb37032affa11e7' :"IP Access"
21 part : ["BAdmin", "IPAccess" ],
22 order : '006-Pman.Tab.BAdminIPAccess',
25 name : "unnamed module",
28 _tree : function(_data)
35 title : _this._strings['e3030abfa75de4573fb37032affa11e7'] /* IP Access */,
36 xns : Roo.bootstrap.panel,
37 '|xns' : 'Roo.bootstrap.panel',
40 xns : Roo.bootstrap.layout,
41 '|xns' : 'Roo.bootstrap.layout',
46 xns : Roo.bootstrap.layout,
47 '|xns' : 'Roo.bootstrap.layout'
56 title : _this._strings['dae8ace18bdcbcc6ae5aece263e14fe8'] /* Options */,
58 activate : function (_self)
60 _this.edit_btn.hide();
61 _this.delete_btn.hide();
63 if (_this.option_grid) {
64 _this.option_grid.store.load({});
67 render : function (_self)
69 _this.option_panel = _self;
72 xns : Roo.bootstrap.panel,
73 '|xns' : 'Roo.bootstrap.panel',
75 xtype : 'NavSimplebar',
77 '|xns' : 'Roo.bootstrap',
82 '|xns' : 'Roo.bootstrap',
87 '|xns' : 'Roo.bootstrap',
92 '|xns' : 'Roo.bootstrap',
98 '|xns' : 'Roo.bootstrap',
104 '|xns' : 'Roo.bootstrap',
108 cls : 'roo-toolbar-button',
110 html : _this._strings['ec211f7c20af43e742bf2570c3cb84f9'] /* Add */,
113 click : function (_self, e)
115 var sel = _this.type_grid.getSelectionModel().getSelected();
117 if(!sel || sel.data.id * 1 < 1 || !sel.data.name.length ){
118 Roo.bootstrap.MessageBox.alert('Error', 'Please select a type');
122 Pman.Dialog.BAdminCoreEnum.show({
124 etype : sel.data.name
126 _this.option_grid.store.load({});
132 '|xns' : 'Roo.bootstrap'
136 cls : 'roo-toolbar-button',
138 html : _this._strings['7dce122004969d56ae2e0245cb754d35'] /* Edit */,
141 click : function (_self, e)
143 var sel = _this.option_grid.getSelectionModel().getSelected();
145 if(!sel || sel.data.id * 1 < 1){
146 Roo.bootstrap.MessageBox.alert('Error', 'Please select a option');
150 Pman.Dialog.BAdminCoreEnum.show({
153 _this.option_grid.store.load({});
157 render : function (_self)
159 _this.edit_btn = this;
165 '|xns' : 'Roo.bootstrap'
169 cls : 'roo-toolbar-button',
171 html : _this._strings['f2a6c498fb90ee345d997f888fce3b18'] /* Delete */,
174 click : function (_self, e)
176 var sel = _this.option_grid.getSelectionModel().getSelected();
178 if(!sel || sel.data.id * 1 < 1){
179 Roo.bootstrap.MessageBox.alert('Error', 'Please select a option');
184 url: baseURL + '/Roo/Core_enum.php',
187 _delete : sel.data.id
189 success : function(res) {
190 _this.option_grid.store.load({});
195 render : function (_self)
197 _this.delete_btn = this;
203 '|xns' : 'Roo.bootstrap'
219 cellSelection : true,
228 cellclick : function (_self, el, rowIndex, columnIndex, e)
230 var di = _this.option_grid.colModel.getDataIndex(columnIndex);
232 if (di != 'active') {
236 var rec = _this.option_grid.store.getAt(rowIndex);
238 rec.set('active', rec.data.active ? 0 : 1);
242 render : function (_self)
244 _this.option_grid = _self;
247 rowdblclick : function (_self, el, rowIndex, e)
249 var sel = _this.option_grid.store.getAt(rowIndex);
251 if(!sel || sel.data.id * 1 < 1){
255 Pman.Dialog.BAdminCoreEnum.show({
258 _this.option_grid.store.load({});
264 '|xns' : 'Roo.bootstrap',
268 sortinfo : { field : 'display_name', direction: 'ASC' },
270 beforeload : function (_self, o)
272 o.params = o.params || {};
276 load : function (_self, records, options)
278 _this.edit_btn.hide();
279 _this.delete_btn.hide();
281 update : function (_self, record, operation)
283 if (operation != 'commit') {
288 url : baseURL + '/Roo/Core_enum',
292 active: record.data.active
294 success : function() {
299 Roo.bootstrap.MessageBox.alert("Error", "saving failed", function() {
300 _this.grid.footer.onClick('first');
311 url : baseURL + '/Roo/Core_ip_access.php',
316 xtype : 'JsonReader',
323 'name': 'created_dt',
325 'formatDate' : 'Y-m-d'
332 'name': 'authorized_by',
336 'name': 'authorized_by_name',
340 'name': 'authorized_by_email',
344 'name': 'authorized_key',
354 'formatDate' : 'Y-m-d'
357 'name': 'user_agent',
361 'name': 'updated_by',
365 'name': 'updated_by_name',
369 'name': 'updated_by_email',
376 totalProperty : 'total',
382 xtype : 'RowSelectionModel',
385 selectionchange : function (_self)
387 _this.edit_btn.hide();
388 _this.delete_btn.hide();
390 if (!this.getSelected()) {
394 _this.edit_btn.show();
395 _this.delete_btn.show();
399 xns : Roo.bootstrap.Table,
400 '|xns' : 'Roo.bootstrap.Table'
404 xtype : 'ColumnModel',
407 header : _this._strings['01abfc750a0c942167651c40d088531d'] /* # */,
408 renderer : function(v,x,r)
410 return String.format('{0}', v ? v : '');
417 xtype : 'ColumnModel',
419 dataIndex : 'created_dt',
420 header : _this._strings['0eceeb45861f9585dd7a97a3e36f85c6'] /* Created */,
421 renderer : function(v,x,r) {
422 return String.format('{0}', v ? v : '');
429 xtype : 'ColumnModel',
432 header : _this._strings['a12a3079e14ced46e69ba52b8a90b21a'] /* IP */,
433 renderer : function(v,x,r) {
434 return String.format('{0}', v ? v : '');
441 xtype : 'ColumnModel',
443 dataIndex : 'active',
444 header : _this._strings['4d3d769b812b6faa6b76e1a8abaece2d'] /* Active */,
446 renderer : function(v,x,r) {
447 var state = v > 0 ? '-checked' : '';
449 return '<img class="x-grid-check-icon' + state + '" src="' + Roo.BLANK_IMAGE_URL + '"/>';