Server : Apache System : Linux indy02.toastserver.com 3.10.0-962.3.2.lve1.5.85.el7.x86_64 #1 SMP Thu Apr 18 15:18:36 UTC 2024 x86_64 User : palandch ( 1163) PHP Version : 7.1.33 Disable Function : NONE Directory : /home/palandch/public_html/manager/assets/modext/widgets/resource/ |
/** * @class MODx.panel.Static * @extends MODx.FormPanel * @param {Object} config An object of config properties * @xtype modx-panel-static */ MODx.panel.Static = function(config) { config = config || {record:{}}; config.record = config.record || {}; Ext.applyIf(config,{ id: 'modx-panel-resource' ,class_key: 'modStaticResource' ,items: this.getFields(config) }); MODx.panel.Static.superclass.constructor.call(this,config); }; Ext.extend(MODx.panel.Static,MODx.panel.Resource,{ defaultClassKey: 'modStaticResource' ,classLexiconKey: 'static_resource' ,rteElements: false ,getPageHeader: function(config) { config = config || {record:{}}; return { html: '<h2>'+_('static_resource_new')+'</h2>' ,id: 'modx-resource-header' ,cls: 'modx-page-header' ,border: false ,forceLayout: true ,anchor: '100%' }; } ,getMainFields: function(config) { var its = MODx.panel.Static.superclass.getMainFields.call(this,config); its.push({ xtype: 'modx-combo-browser' ,browserEl: 'modx-browser' ,prependPath: false ,prependUrl: false ,hideFiles: true ,fieldLabel: _('static_resource') ,description: '<b>[[*content]]</b>' ,name: 'content' ,id: 'modx-resource-content' ,maxLength: 255 ,anchor: '100%' ,value: (config.record.content || config.record.ta) || '' ,openTo: config.record.openTo ,listeners: { 'select':{fn:function(data) { var str = data.fullRelativeUrl; if (MODx.config.base_url != '/') { str = str.replace(MODx.config.base_url,''); } if (str.substring(0,1) == '/') { str = str.substring(1); } Ext.getCmp('modx-resource-content').setValue(str); this.markDirty(); },scope:this} } }); return its; } ,getContentField: function(config) { return null; } }); Ext.reg('modx-panel-static',MODx.panel.Static);