MODx.panel.ImageTV=function(A){A=A||{};A.filemanager_url=MODx.config.filemanager_url;Ext.applyIf(A,{layout:"form",autoHeight:true,border:false,hideLabels:true,defaults:{autoHeight:true,border:false},items:[{xtype:"hidden",name:"tv"+A.tv,id:"tv"+A.tv,value:A.value},{xtype:"modx-combo-browser",browserEl:"tvbrowser"+A.tv,name:"tvbrowser"+A.tv,id:"tvbrowser"+A.tv,value:A.relativeValue,hideFiles:true,basePath:A.basePath||"",basePathRelative:A.basePathRelative||"",baseUrl:A.baseUrl||"",baseUrlRelative:A.baseUrlRelative||"",allowedFileTypes:A.allowedFileTypes||"",openTo:A.openTo||"",listeners:{select:{fn:function(B){Ext.getCmp("tv"+this.config.tv).setValue(B.relativeUrl);Ext.getCmp("tvbrowser"+this.config.tv).setValue(B.relativeUrl);this.fireEvent("select",B);},scope:this},change:{fn:function(B,C){Ext.getCmp("tv"+this.config.tv).setValue(C);this.fireEvent("select",{relativeUrl:C,url:C});},scope:this}}}]});MODx.panel.ImageTV.superclass.constructor.call(this,A);this.addEvents({select:true});};Ext.extend(MODx.panel.ImageTV,MODx.Panel);Ext.reg("modx-panel-tv-image",MODx.panel.ImageTV);MODx.panel.FileTV=function(A){A=A||{};A.filemanager_url=MODx.config.filemanager_url;Ext.applyIf(A,{layout:"form",autoHeight:true,border:false,hideLabels:true,defaults:{autoHeight:true,border:false},items:[{xtype:"hidden",name:"tv"+A.tv,id:"tv"+A.tv,value:A.value},{xtype:"modx-combo-browser",browserEl:"tvbrowser"+A.tv,name:"tvbrowser"+A.tv,id:"tvbrowser"+A.tv,value:A.relativeValue,hideFiles:true,basePath:A.basePath||"",basePathRelative:A.basePathRelative||"",baseUrl:A.baseUrl||"",baseUrlRelative:A.baseUrlRelative||"",allowedFileTypes:A.allowedFileTypes||"",wctx:A.wctx||"web",openTo:A.openTo||"",listeners:{select:{fn:function(B){Ext.getCmp("tv"+this.config.tv).setValue(B.relativeUrl);Ext.getCmp("tvbrowser"+this.config.tv).setValue(B.relativeUrl);this.fireEvent("select",B);},scope:this},change:{fn:function(B,C){Ext.getCmp("tv"+this.config.tv).setValue(C);this.fireEvent("select",{relativeUrl:C,url:C});},scope:this}}}]});MODx.panel.FileTV.superclass.constructor.call(this,A);this.addEvents({select:true});};Ext.extend(MODx.panel.FileTV,MODx.Panel);Ext.reg("modx-panel-tv-file",MODx.panel.FileTV);MODx.checkTV=function(B){var A=Ext.get("tv"+B);Ext.get("tvh"+B).dom.value=A.dom.checked?A.dom.value:"";};