MODx.page.ResourceData=function(A){A=A||{};var B=[];if(A.canEdit==1){B.push({process:"edit",text:_("edit"),params:{a:MODx.action["resource/update"],id:A.id},hidden:A.canEdit==1?false:true});B.push("-");}B.push({process:"preview",text:_("preview"),handler:this.preview.createDelegate(this,[A.id]),scope:this});B.push("-");B.push({process:"cancel",text:_("cancel"),params:{a:MODx.action.welcome}});Ext.applyIf(A,{form:"modx-resource-data",actions:{"new":MODx.action["resource/create"],edit:MODx.action["resource/update"],cancel:MODx.action.welcome},buttons:B,components:[{xtype:"modx-panel-resource-data",renderTo:"modx-panel-resource-data-div",resource:A.id,context:A.ctx,class_key:A.class_key,pagetitle:A.pagetitle}]});MODx.page.ResourceData.superclass.constructor.call(this,A);};Ext.extend(MODx.page.ResourceData,MODx.Component,{preview:function(A){window.open(MODx.config.base_url+"index.php?id="+A);return false;}});Ext.reg("modx-page-resource-data",MODx.page.ResourceData);