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) {
239 return String.format('<span tooltip="{1}">Coba: {0}</span>', v, r.data.name);
255 title : _this._strings['dae8ace18bdcbcc6ae5aece263e14fe8'] /* Options */,
257 activate : function (_self)
259 if (_this.option_grid) {
260 _this.option_grid.store.load({});
261 // _this.option_grid.footer.onClick('first');
264 render : function (_self)
266 _this.option_panel = _self;
269 xns : Roo.bootstrap.panel,
270 '|xns' : 'Roo.bootstrap.panel',
272 xtype : 'NavSimplebar',
274 '|xns' : 'Roo.bootstrap',
279 '|xns' : 'Roo.bootstrap',
284 '|xns' : 'Roo.bootstrap',
289 html : _this._strings['ec211f7c20af43e742bf2570c3cb84f9'] /* Add */,
290 style : 'margin: 10px;',
293 click : function (_self, e)
295 var sel = _this.type_grid.getSelectionModel().getSelected();
297 if(!sel || sel.data.id * 1 < 1 || !sel.data.name.length ){
298 Roo.bootstrap.MessageBox.alert('Error', 'Please select a type');
302 Pman.Dialog.BAdminCoreEnum.show({
304 etype : sel.data.name
306 _this.option_grid.store.load({});
312 '|xns' : 'Roo.bootstrap'
316 glyphicon : 'pencil',
317 html : _this._strings['7dce122004969d56ae2e0245cb754d35'] /* Edit */,
318 style : 'margin: 10px;',
321 click : function (_self, e)
323 var sel = _this.option_grid.getSelectionModel().getSelected();
325 if(!sel || sel.data.id * 1 < 1){
326 Roo.bootstrap.MessageBox.alert('Error', 'Please select a option');
330 Pman.Dialog.BAdminCoreEnum.show({
333 _this.option_grid.store.load({});
339 '|xns' : 'Roo.bootstrap'
344 html : _this._strings['f2a6c498fb90ee345d997f888fce3b18'] /* Delete */,
345 style : 'margin: 10px;',
348 click : function (_self, e)
350 var sel = _this.option_grid.getSelectionModel().getSelected();
352 if(!sel || sel.data.id * 1 < 1){
353 Roo.bootstrap.MessageBox.alert('Error', 'Please select a option');
358 url: baseURL + '/Roo/Core_enum.php',
361 _delete : sel.data.id
363 success : function(res) {
364 _this.option_grid.store.load({});
371 '|xns' : 'Roo.bootstrap'
381 cellSelection : true,
390 cellclick : function (_self, el, rowIndex, columnIndex, e)
392 var di = _this.option_grid.colModel.getDataIndex(columnIndex);
394 if (di != 'active') {
398 var rec = _this.option_grid.store.getAt(rowIndex);
400 rec.set('active', rec.data.active ? 0 : 1);
404 render : function (_self)
406 _this.option_grid = _self;
409 rowdblclick : function (_self, el, rowIndex, e)
411 var sel = _this.option_grid.store.getAt(rowIndex);
413 if(!sel || sel.data.id * 1 < 1){
417 Pman.Dialog.BAdminCoreEnum.show({
420 _this.option_grid.store.load({});
426 '|xns' : 'Roo.bootstrap',
430 sortinfo : { field : 'display_name', direction: 'ASC' },
432 beforeload : function (_self, o)
434 o.params = o.params || {};
436 var sel = _this.type_grid.getSelectionModel().getSelected();
438 if(!sel || sel.data.id * 1 < 1 || !sel.data.name.length){
443 o.params.etype = sel.data.name;
446 update : function (_self, record, operation)
448 if (operation != 'commit') {
453 url : baseURL + '/Roo/Core_enum',
457 active: record.data.active
459 success : function() {
464 Roo.bootstrap.MessageBox.alert("Error", "saving failed", function() {
465 _this.grid.footer.onClick('first');
476 url : baseURL + '/Roo/core_enum.php',
481 xtype : 'JsonReader',
496 'name': 'display_name',
510 totalProperty : 'total',
516 xtype : 'RowSelectionModel',
518 xns : Roo.bootstrap.Table,
519 '|xns' : 'Roo.bootstrap.Table'
523 xtype : 'ColumnModel',
525 header : _this._strings['01abfc750a0c942167651c40d088531d'] /* # */,
527 renderer : function(v,x,r) {
528 //console.log(r.data.seqid);
529 //return String.format('{0}', v ? v : '');
532 String.format('{0}', r.data.seqid ? r.data.seqid : '')
533 +" <span style='color:lightgrey'>"
534 + String.format('{0}', r.data.id ? r.data.id : '')
544 xtype : 'ColumnModel',
546 header : _this._strings['49ee3087348e8d44e1feda1917443987'] /* Name */,
548 renderer : function(v,x,r) {
549 return String.format('{0}', v ? v : '');
558 xtype : 'ColumnModel',
559 dataIndex : 'display_name',
560 header : _this._strings['b48968e1c912da07df5e8d6d246291ec'] /* Display Name */,
562 renderer : function(v,x,r) {
563 return String.format('{0}', v ? v : '');
572 xtype : 'ColumnModel',
573 dataIndex : 'active',
574 header : _this._strings['4d3d769b812b6faa6b76e1a8abaece2d'] /* Active */,
576 renderer : function(v,x,r) {
577 var state = v > 0 ? '-checked' : '';
579 return '<img class="x-grid-check-icon' + state + '" src="' + Roo.BLANK_IMAGE_URL + '"/>';