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 '7dce122004969d56ae2e0245cb754d35' :"Edit",
12 '01abfc750a0c942167651c40d088531d' :"#",
13 'dae8ace18bdcbcc6ae5aece263e14fe8' :"Options",
14 'b48968e1c912da07df5e8d6d246291ec' :"Display Name",
15 'f2a6c498fb90ee345d997f888fce3b18' :"Delete",
16 '49ee3087348e8d44e1feda1917443987' :"Name",
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 || {};
274 var sel = _this.type_grid.getSelectionModel().getSelected();
276 if(!sel || sel.data.id * 1 < 1 || !sel.data.name.length){
282 load : function (_self, records, options)
284 _this.edit_btn.hide();
285 _this.delete_btn.hide();
287 update : function (_self, record, operation)
289 if (operation != 'commit') {
294 url : baseURL + '/Roo/Core_enum',
298 active: record.data.active
300 success : function() {
305 Roo.bootstrap.MessageBox.alert("Error", "saving failed", function() {
306 _this.grid.footer.onClick('first');
317 url : baseURL + '/Roo/core_enum.php',
322 xtype : 'JsonReader',
337 'name': 'display_name',
351 totalProperty : 'total',
357 xtype : 'RowSelectionModel',
360 selectionchange : function (_self)
362 _this.edit_btn.hide();
363 _this.delete_btn.hide();
365 if (!this.getSelected()) {
369 _this.edit_btn.show();
370 _this.delete_btn.show();
374 xns : Roo.bootstrap.Table,
375 '|xns' : 'Roo.bootstrap.Table'
379 xtype : 'ColumnModel',
382 header : _this._strings['01abfc750a0c942167651c40d088531d'] /* # */,
384 renderer : function(v,x,r) {
385 //console.log(r.data.seqid);
386 //return String.format('{0}', v ? v : '');
389 String.format('{0}', r.data.seqid ? r.data.seqid : '')
390 +" <span style='color:lightgrey'>"
391 + String.format('{0}', r.data.id ? r.data.id : '')
401 xtype : 'ColumnModel',
404 header : _this._strings['49ee3087348e8d44e1feda1917443987'] /* Name */,
406 renderer : function(v,x,r) {
407 return String.format('{0}', v ? v : '');
416 xtype : 'ColumnModel',
418 dataIndex : 'display_name',
419 header : _this._strings['b48968e1c912da07df5e8d6d246291ec'] /* Display Name */,
421 renderer : function(v,x,r) {
422 return String.format('{0}', v ? v : '');
431 xtype : 'ColumnModel',
433 dataIndex : 'active',
434 header : _this._strings['4d3d769b812b6faa6b76e1a8abaece2d'] /* Active */,
436 renderer : function(v,x,r) {
437 var state = v > 0 ? '-checked' : '';
439 return '<img class="x-grid-check-icon' + state + '" src="' + Roo.BLANK_IMAGE_URL + '"/>';