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.BAdminCoreEnum = new Roo.XComponent({
10 'ec211f7c20af43e742bf2570c3cb84f9' :"Add",
11 '2df80d5febcde0c10a66818488622b7c' :"Pulldown Options",
12 '7dce122004969d56ae2e0245cb754d35' :"Edit",
13 '01abfc750a0c942167651c40d088531d' :"#",
14 'dae8ace18bdcbcc6ae5aece263e14fe8' :"Options",
15 'b48968e1c912da07df5e8d6d246291ec' :"Display Name",
16 'f2d346b1bb7c1c85ab6f7f21e3666b9f' :"Types",
17 '49ee3087348e8d44e1feda1917443987' :"Name",
18 'f2a6c498fb90ee345d997f888fce3b18' :"Delete",
19 '4d3d769b812b6faa6b76e1a8abaece2d' :"Active"
22 part : ["BAdmin", "CoreEnum" ],
23 order : '005-Pman.Tab.BAdminCoreEnum',
25 parent : 'Pman.Tab.BAdmin',
26 name : "unnamed module",
29 _tree : function(_data)
36 title : _this._strings['2df80d5febcde0c10a66818488622b7c'] /* Pulldown Options */,
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'
56 xns : Roo.bootstrap.layout,
57 '|xns' : 'Roo.bootstrap.layout'
67 title : _this._strings['f2d346b1bb7c1c85ab6f7f21e3666b9f'] /* Types */,
69 activate : function (_self)
72 _this.type_grid.footer.onClick('first');
75 render : function (_self)
77 _this.type_panel = _self;
80 xns : Roo.bootstrap.panel,
81 '|xns' : 'Roo.bootstrap.panel',
83 xtype : 'NavSimplebar',
85 '|xns' : 'Roo.bootstrap',
90 '|xns' : 'Roo.bootstrap',
95 '|xns' : 'Roo.bootstrap',
100 html : _this._strings['ec211f7c20af43e742bf2570c3cb84f9'] /* Add */,
101 style : 'margin: 10px;',
104 click : function (_self, e)
106 Pman.Dialog.BAdminCoreEnum.show({
109 _this.type_grid.footer.onClick('first');
115 '|xns' : 'Roo.bootstrap'
125 cellSelection : true,
133 render : function (_self)
135 _this.type_grid = _self;
138 rowdblclick : function (_self, el, rowIndex, e)
140 var r = _this.type_grid.store.getAt(rowIndex);
142 if(!r || r.data.id * 1 < 1){
146 Pman.Dialog.BAdminCoreEnum.show({
149 _this.type_grid.footer.onClick('first');
154 '|xns' : 'Roo.bootstrap',
156 xtype : 'PagingToolbar',
161 '|xns' : 'Roo.bootstrap'
166 sortInfo : { field : 'display_name', direction: 'ASC' },
168 beforeload : function (_self, o)
170 o.params = o.params || {};
172 o.params['query[empty_etype]'] = 1;
181 url : baseURL + '/Roo/core_enum.php',
186 xtype : 'JsonReader',
201 'name': 'display_name',
215 totalProperty : 'total',
221 xtype : 'RowSelectionModel',
224 selectionchange : function (_self)
226 _this.option_grid.store.load({});
229 xns : Roo.bootstrap.Table,
230 '|xns' : 'Roo.bootstrap.Table'
234 xtype : 'ColumnModel',
235 dataIndex : 'display_name',
236 header : _this._strings['49ee3087348e8d44e1feda1917443987'] /* Name */,
237 renderer : function(v,x,r) {
238 return String.format('<span tooltip="{1}">{0}</span>', v, r.data.name);
254 title : _this._strings['dae8ace18bdcbcc6ae5aece263e14fe8'] /* Options */,
256 activate : function (_self)
258 if (_this.option_grid) {
259 _this.option_grid.store.load({});
260 // _this.option_grid.footer.onClick('first');
263 render : function (_self)
265 _this.option_panel = _self;
268 xns : Roo.bootstrap.panel,
269 '|xns' : 'Roo.bootstrap.panel',
271 xtype : 'NavSimplebar',
273 '|xns' : 'Roo.bootstrap',
278 '|xns' : 'Roo.bootstrap',
283 '|xns' : 'Roo.bootstrap',
288 html : _this._strings['ec211f7c20af43e742bf2570c3cb84f9'] /* Add */,
289 style : 'margin: 10px;',
292 click : function (_self, e)
294 var sel = _this.type_grid.getSelectionModel().getSelected();
296 if(!sel || sel.data.id * 1 < 1 || !sel.data.name.length ){
297 Roo.bootstrap.MessageBox.alert('Error', 'Please select a type');
301 Pman.Dialog.BAdminCoreEnum.show({
303 etype : sel.data.name
305 _this.option_grid.store.load({});
311 '|xns' : 'Roo.bootstrap'
315 glyphicon : 'pencil',
316 html : _this._strings['7dce122004969d56ae2e0245cb754d35'] /* Edit */,
317 style : 'margin: 10px;',
320 click : function (_self, e)
322 var sel = _this.option_grid.getSelectionModel().getSelected();
324 if(!sel || sel.data.id * 1 < 1){
325 Roo.bootstrap.MessageBox.alert('Error', 'Please select a option');
329 Pman.Dialog.BAdminCoreEnum.show({
332 _this.option_grid.store.load({});
338 '|xns' : 'Roo.bootstrap'
343 html : _this._strings['f2a6c498fb90ee345d997f888fce3b18'] /* Delete */,
344 style : 'margin: 10px;',
347 click : function (_self, e)
349 var sel = _this.option_grid.getSelectionModel().getSelected();
351 if(!sel || sel.data.id * 1 < 1){
352 Roo.bootstrap.MessageBox.alert('Error', 'Please select a option');
357 url: baseURL + '/Roo/Core_enum.php',
360 _delete : sel.data.id
362 success : function(res) {
363 _this.option_grid.store.load({});
370 '|xns' : 'Roo.bootstrap'
380 cellSelection : true,
389 cellclick : function (_self, el, rowIndex, columnIndex, e)
391 var di = _this.option_grid.colModel.getDataIndex(columnIndex);
393 if (di != 'active') {
397 var rec = _this.option_grid.store.getAt(rowIndex);
399 rec.set('active', rec.data.active ? 0 : 1);
403 render : function (_self)
405 _this.option_grid = _self;
408 rowdblclick : function (_self, el, rowIndex, e)
410 var sel = _this.option_grid.store.getAt(rowIndex);
412 if(!sel || sel.data.id * 1 < 1){
416 Pman.Dialog.BAdminCoreEnum.show({
419 _this.option_grid.store.load({});
425 '|xns' : 'Roo.bootstrap',
429 sortinfo : { field : 'display_name', direction: 'ASC' },
431 beforeload : function (_self, o)
433 o.params = o.params || {};
435 var sel = _this.type_grid.getSelectionModel().getSelected();
437 if(!sel || sel.data.id * 1 < 1 || !sel.data.name.length){
442 o.params.etype = sel.data.name;
445 update : function (_self, record, operation)
447 if (operation != 'commit') {
452 url : baseURL + '/Roo/Core_enum',
456 active: record.data.active
458 success : function() {
463 Roo.bootstrap.MessageBox.alert("Error", "saving failed", function() {
464 _this.grid.footer.onClick('first');
475 url : baseURL + '/Roo/core_enum.php',
480 xtype : 'JsonReader',
495 'name': 'display_name',
509 totalProperty : 'total',
515 xtype : 'RowSelectionModel',
517 xns : Roo.bootstrap.Table,
518 '|xns' : 'Roo.bootstrap.Table'
522 xtype : 'ColumnModel',
524 header : _this._strings['01abfc750a0c942167651c40d088531d'] /* # */,
526 renderer : function(v,x,r) {
527 //console.log(r.data.seqid);
528 //return String.format('{0}', v ? v : '');
530 return String.format('{0}', r.data.seqid ? r.data.seqid : '')+"<light grey>"+ String.format('{0}', r.data.id ? r.data.id : '') +"</light grey>";
539 xtype : 'ColumnModel',
541 header : _this._strings['49ee3087348e8d44e1feda1917443987'] /* Name */,
543 renderer : function(v,x,r) {
544 return String.format('{0}', v ? v : '');
553 xtype : 'ColumnModel',
554 dataIndex : 'display_name',
555 header : _this._strings['b48968e1c912da07df5e8d6d246291ec'] /* Display Name */,
557 renderer : function(v,x,r) {
558 return String.format('{0}', v ? v : '');
567 xtype : 'ColumnModel',
568 dataIndex : 'active',
569 header : _this._strings['4d3d769b812b6faa6b76e1a8abaece2d'] /* Active */,
571 renderer : function(v,x,r) {
572 var state = v > 0 ? '-checked' : '';
574 return '<img class="x-grid-check-icon' + state + '" src="' + Roo.BLANK_IMAGE_URL + '"/>';