MODx.grid.PackageVersions=function(A){A=A||{};this.exp=new Ext.grid.RowExpander({tpl:new Ext.Template('<p class="package-readme"><i>{readme}</i></p>')});Ext.applyIf(A,{title:_("packages"),id:"modx-grid-package-versions",url:MODx.config.connectors_url+"workspace/package/version.php",baseParams:{action:"getList",signature:A.signature},fields:["signature","name","version","release","created","updated","installed","state","workspace","provider","provider_name","disabled","source","readme","menu"],plugins:[this.exp],pageSize:20,columns:[this.exp,{header:_("name"),dataIndex:"name"},{header:_("version"),dataIndex:"version"},{header:_("release"),dataIndex:"release"},{header:_("installed"),dataIndex:"installed",renderer:this._rins},{header:_("provider"),dataIndex:"provider_name",editable:false}],primaryKey:"signature",paging:true,autosave:true});MODx.grid.PackageVersions.superclass.constructor.call(this,A);};Ext.extend(MODx.grid.PackageVersions,MODx.grid.Grid,{_rins:function(A,B){switch(A){case"":case null:B.css="not-installed";return _("not_installed");default:B.css="";return A;}},removePriorVersion:function(A,C){var B=this.menu.record;MODx.msg.confirm({title:_("warning"),text:_("package_version_remove_confirm"),url:this.config.url,params:{action:"remove",signature:B.signature},listeners:{"success":{fn:function(){if(this.fireEvent("afterRemoveRow",B)){this.removeActiveRow(B);}},scope:this}}});}});Ext.reg("modx-grid-package-versions",MODx.grid.PackageVersions);