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 'ce8ae9da5b7cd6c3df2929543a9af92d' :"Email",
11 'ec211f7c20af43e742bf2570c3cb84f9' :"Add",
12 '0eceeb45861f9585dd7a97a3e36f85c6' :"Created",
13 '86f16ddf147752b95ffe69e2dfa769a1' :"Authorized By",
14 'ec53a8c4f07baed5d8825072c89799be' :"Status",
15 '7dce122004969d56ae2e0245cb754d35' :"Edit",
16 'a12a3079e14ced46e69ba52b8a90b21a' :"IP",
17 'dae8ace18bdcbcc6ae5aece263e14fe8' :"Options",
18 'f2a6c498fb90ee345d997f888fce3b18' :"Delete",
19 'e3030abfa75de4573fb37032affa11e7' :"IP Access"
22 part : ["BAdmin", "IPAccess" ],
23 order : '006-Pman.Tab.BAdminIPAccess',
25 parent : 'Pman.Tab.BAdmin',
26 name : "unnamed module",
29 _tree : function(_data)
36 title : _this._strings['e3030abfa75de4573fb37032affa11e7'] /* IP Access */,
37 xns : Roo.bootstrap.panel,
38 '|xns' : 'Roo.bootstrap.panel',
41 xns : Roo.bootstrap.layout,
42 '|xns' : 'Roo.bootstrap.layout',
47 xns : Roo.bootstrap.layout,
48 '|xns' : 'Roo.bootstrap.layout'
57 title : _this._strings['dae8ace18bdcbcc6ae5aece263e14fe8'] /* Options */,
59 activate : function (_self)
61 _this.edit_btn.hide();
62 _this.delete_btn.hide();
64 if (_this.option_grid) {
65 _this.option_grid.store.load({});
68 render : function (_self)
70 _this.option_panel = _self;
73 xns : Roo.bootstrap.panel,
74 '|xns' : 'Roo.bootstrap.panel',
76 xtype : 'NavSimplebar',
78 '|xns' : 'Roo.bootstrap',
83 '|xns' : 'Roo.bootstrap',
88 '|xns' : 'Roo.bootstrap',
93 '|xns' : 'Roo.bootstrap',
99 '|xns' : 'Roo.bootstrap',
105 '|xns' : 'Roo.bootstrap',
109 cls : 'roo-toolbar-button',
111 html : _this._strings['ec211f7c20af43e742bf2570c3cb84f9'] /* Add */,
114 click : function (_self, e)
116 var sel = _this.type_grid.getSelectionModel().getSelected();
118 if(!sel || sel.data.id * 1 < 1 || !sel.data.name.length ){
119 Roo.bootstrap.MessageBox.alert('Error', 'Please select a type');
123 Pman.Dialog.BAdminCoreEnum.show({
125 etype : sel.data.name
127 _this.option_grid.store.load({});
133 '|xns' : 'Roo.bootstrap'
137 cls : 'roo-toolbar-button',
139 html : _this._strings['7dce122004969d56ae2e0245cb754d35'] /* Edit */,
142 click : function (_self, e)
144 var sel = _this.option_grid.getSelectionModel().getSelected();
146 if(!sel || sel.data.id * 1 < 1){
147 Roo.bootstrap.MessageBox.alert('Error', 'Please select a option');
151 Pman.Dialog.BAdminCoreEnum.show({
154 _this.option_grid.store.load({});
158 render : function (_self)
160 _this.edit_btn = this;
166 '|xns' : 'Roo.bootstrap'
170 cls : 'roo-toolbar-button',
172 html : _this._strings['f2a6c498fb90ee345d997f888fce3b18'] /* Delete */,
175 click : function (_self, e)
177 var sel = _this.option_grid.getSelectionModel().getSelected();
179 if(!sel || sel.data.id * 1 < 1){
180 Roo.bootstrap.MessageBox.alert('Error', 'Please select a option');
185 url: baseURL + '/Roo/Core_enum.php',
188 _delete : sel.data.id
190 success : function(res) {
191 _this.option_grid.store.load({});
196 render : function (_self)
198 _this.delete_btn = this;
204 '|xns' : 'Roo.bootstrap'
220 cellSelection : true,
229 cellclick : function (_self, el, rowIndex, columnIndex, e)
231 var di = _this.option_grid.colModel.getDataIndex(columnIndex);
233 if (di != 'active') {
237 var rec = _this.option_grid.store.getAt(rowIndex);
239 rec.set('active', rec.data.active ? 0 : 1);
243 render : function (_self)
245 _this.option_grid = _self;
248 rowdblclick : function (_self, el, rowIndex, e)
250 var sel = _this.option_grid.store.getAt(rowIndex);
252 if(!sel || sel.data.id * 1 < 1){
256 Pman.Dialog.BAdminCoreEnum.show({
259 _this.option_grid.store.load({});
265 '|xns' : 'Roo.bootstrap',
269 sortinfo : { field : 'display_name', direction: 'ASC' },
271 beforeload : function (_self, o)
273 o.params = o.params || {};
277 load : function (_self, records, options)
279 _this.edit_btn.hide();
280 _this.delete_btn.hide();
282 update : function (_self, record, operation)
284 if (operation != 'commit') {
289 url : baseURL + '/Roo/Core_enum',
293 active: record.data.active
295 success : function() {
300 Roo.bootstrap.MessageBox.alert("Error", "saving failed", function() {
301 _this.grid.footer.onClick('first');
312 url : baseURL + '/Roo/Core_ip_access.php',
317 xtype : 'JsonReader',
324 'name': 'created_dt',
326 'formatDate' : 'Y-m-d'
333 'name': 'authorized_by',
337 'name': 'authorized_by_name',
341 'name': 'authorized_by_email',
345 'name': 'authorized_key',
355 'formatDate' : 'Y-m-d'
358 'name': 'user_agent',
362 'name': 'updated_by',
366 'name': 'updated_by_name',
370 'name': 'updated_by_email',
377 totalProperty : 'total',
383 xtype : 'RowSelectionModel',
386 selectionchange : function (_self)
388 _this.edit_btn.hide();
389 _this.delete_btn.hide();
391 if (!this.getSelected()) {
395 _this.edit_btn.show();
396 _this.delete_btn.show();
400 xns : Roo.bootstrap.Table,
401 '|xns' : 'Roo.bootstrap.Table'
405 xtype : 'ColumnModel',
407 dataIndex : 'created_dt',
408 header : _this._strings['0eceeb45861f9585dd7a97a3e36f85c6'] /* Created */,
409 renderer : function(v,x,r) {
410 return String.format('{0}', v ? v.format('Y-m-d') : '');
417 xtype : 'ColumnModel',
420 header : _this._strings['a12a3079e14ced46e69ba52b8a90b21a'] /* IP */,
421 renderer : function(v,x,r) {
422 return String.format('{0}', v ? v : '');
429 xtype : 'ColumnModel',
432 header : _this._strings['ce8ae9da5b7cd6c3df2929543a9af92d'] /* Email */,
433 renderer : function(v,x,r)
435 return String.format('<a href="mailto:{0}">{0}</a>', v ? v : '')
442 xtype : 'ColumnModel',
444 dataIndex : 'authorized_by',
445 header : _this._strings['86f16ddf147752b95ffe69e2dfa769a1'] /* Authorized By */,
446 renderer : function(v,x,r)
448 return String.format('<a href="mailto:{0}">{0}</a>', v ? v : '')
455 xtype : 'ColumnModel',
457 dataIndex : 'status',
458 header : _this._strings['ec53a8c4f07baed5d8825072c89799be'] /* Status */,
459 renderer : function(v,x,r)
463 var status = 'Pending';
473 status = 'Temporary';
479 return String.format('{0}', status);