X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=blobdiff_plain;f=Pman.Tab.PersonList.js;h=cf2c3134042a9b52e5e3e2fc0e267840d9c113c7;hp=bc3fa86d2fea2572020188790b6d9b1abaecd5b5;hb=c1af5e6bb6064e88469651271f4d9aaff34d69c0;hpb=2b507a23b72ceb5326104c057ff89cb2ba51dfe2 diff --git a/Pman.Tab.PersonList.js b/Pman.Tab.PersonList.js index bc3fa86d..cf2c3134 100644 --- a/Pman.Tab.PersonList.js +++ b/Pman.Tab.PersonList.js @@ -263,15 +263,18 @@ Pman.Tab.PersonList.prototype = { } var rec = _this.grid.ds.getAt(rowIndex); - + rec.set('active', rec.data.active ? 0 : 1); rec.commit(); - - var el = Roo.select('.x-grid-row-selected').item(3); - el.addClass('x-grid-row-fadeout'); - el.on('transitionend',function(){ - _this.grid.ds.remove(rec); - },this,{single:true}); + + // only hide if viewing active members... + if (!_this.showInActive) { + var el = Roo.select('.x-grid-row-selected').item(3); + el.addClass('x-grid-row-fadeout'); + el.on('transitionend',function(){ + _this.grid.ds.remove(rec); + },this,{single:true}); + } } @@ -459,9 +462,9 @@ Pman.Tab.PersonList.prototype = { var rec = _this.grid.ds.getAt(_this.grid.selModel.last); - var ids = []; - ids.push(rec.id); - if (!ids.length) { + var rec_id = rec.id; + + if (rec_id * 1 < 1) { Roo.MessageBox.alert("Error", "Select row to delete"); return; } @@ -477,7 +480,7 @@ Pman.Tab.PersonList.prototype = { method : 'POST', url : baseURL + '/Roo/core_person', params : { - _delete : ids.join(',') + _delete : rec_id }, success : function() { _this.paging.onClick('refresh'); @@ -623,6 +626,24 @@ Pman.Tab.PersonList.prototype = { // width : 150 }, cfg); }, + + c_group_membership : function(cfg) { + cfg = cfg || {}; + return Roo.apply({ + // id : (this.id + '-name').toLowerCase(), + header : "Group Membership", + dataIndex : 'member_of', + sortable : false, + renderer : function(v,p,r) { + if(r.data.active != 1){ + return String.format('
{0}
', v).split("\n").join("
"); + } + return String.format('{0}', v).split("\n").join("
"); + }, + width : 150 + }, cfg); + }, + c_company_id_comptype : function(cfg) { cfg = cfg || {}; return Roo.apply({