Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ,getMainRightBottomFields: function(config) {
- config = config || {};
- var menuindex = [{
- xtype: 'numberfield'
- ,fieldLabel: _('resource_menuindex')
- ,description: '<b>[[*menuindex]]</b><br />'+_('resource_menuindex_help')
- ,name: 'menuindex'
- ,id: 'modx-resource-menuindex'
- ,width: 75
- ,value: parseInt(config.record.menuindex) || 0
- }];
- var items = [{
- xtype: 'xcheckbox'
- ,boxLabel: _('resource_hide_from_menus')
- ,hideLabel: true
- ,cls: 'warning'
- ,description: '<b>[[*hidemenu]]</b><br />'+_('resource_hide_from_menus_help')
- ,name: 'hidemenu'
- ,id: 'modx-resource-hidemenu'
- ,inputValue: 1
- ,checked: parseInt(config.record.hidemenu) || false
- },{
- xtype: 'textfield'
- ,fieldLabel: _('resource_menutitle')
- ,description: '<b>[[*menutitle]]</b><br />'+_('resource_menutitle_help')
- ,name: 'menutitle'
- ,id: 'modx-resource-menutitle'
- ,maxLength: 255
- ,anchor: '100%'
- ,value: config.record.menutitle || ''
- },{
- xtype: 'textfield'
- ,fieldLabel: _('resource_link_attributes')
- ,description: '<b>[[*link_attributes]]</b><br />'+_('resource_link_attributes_help')
- ,name: 'link_attributes'
- ,id: 'modx-resource-link-attributes'
- ,maxLength: 255
- ,anchor: '100%'
- ,value: config.record.link_attributes || ''
- }];
- if (MODx.perm.resourcegroup_resource_list) {
- items.push(menuindex);
- }
- var it = [{
- layout: 'form'
- ,id: 'modx-resource-main-right-bottom'
- ,cls: 'modx-resource-panel'
- ,title: _('resource_right_bottom_title')
- ,collapsible: true
- ,stateful: true
- ,stateEvents: ['collapse', 'expand']
- ,getState: function() {
- return { collapsed: this.collapsed };
- }
- ,items: items
- }]
- return it;
- }
- ,getMainRightFields: function(config) {
- config = config || {};
- var it = [{
- layout: 'form'
- ,id: 'modx-resource-main-right-top'
- ,cls: 'modx-resource-panel'
- ,title: _('resource_right_top_title')
- ,collapsible: true
- ,stateful: true
- ,stateEvents: ['collapse', 'expand']
- ,getState: function() {
- return { collapsed: this.collapsed };
- }
- ,items: [{
- xtype: 'xcheckbox'
- ,boxLabel: _('resource_published')
- ,hideLabel: true
- ,description: '<b>[[*published]]</b><br />'+_('resource_published_help')
- ,name: 'published'
- ,id: 'modx-resource-published'
- ,inputValue: 1
- ,checked: parseInt(config.record.published)
- },{
- xtype: 'xdatetime'
- ,fieldLabel: _('resource_publishedon')
- ,description: '<b>[[*publishedon]]</b><br />'+_('resource_publishedon_help')
- ,name: 'publishedon'
- ,id: 'modx-resource-publishedon'
- ,allowBlank: true
- ,dateFormat: MODx.config.manager_date_format
- ,timeFormat: MODx.config.manager_time_format
- ,startDay: parseInt(MODx.config.manager_week_start)
- ,dateWidth: '100%'
- ,timeWidth: '100%'
- ,offset_time: MODx.config.server_offset_time
- ,value: config.record.publishedon
- },{
- xtype: MODx.config.publish_document ? 'xdatetime' : 'hidden'
- ,fieldLabel: _('resource_publishdate')
- ,description: '<b>[[*pub_date]]</b><br />'+_('resource_publishdate_help')
- ,name: 'pub_date'
- ,id: 'modx-resource-pub-date'
- ,allowBlank: true
- ,dateFormat: MODx.config.manager_date_format
- ,timeFormat: MODx.config.manager_time_format
- ,startDay: parseInt(MODx.config.manager_week_start)
- ,dateWidth: '100%'
- ,timeWidth: '100%'
- ,offset_time: MODx.config.server_offset_time
- ,value: config.record.pub_date
- },{
- xtype: MODx.config.publish_document ? 'xdatetime' : 'hidden'
- ,fieldLabel: _('resource_unpublishdate')
- ,description: '<b>[[*unpub_date]]</b><br />'+_('resource_unpublishdate_help')
- ,name: 'unpub_date'
- ,id: 'modx-resource-unpub-date'
- ,allowBlank: true
- ,dateFormat: MODx.config.manager_date_format
- ,timeFormat: MODx.config.manager_time_format
- ,startDay: parseInt(MODx.config.manager_week_start)
- ,dateWidth: '100%'
- ,timeWidth: '100%'
- ,offset_time: MODx.config.server_offset_time
- ,value: config.record.unpub_date
- }]
- },{
- layout: 'form'
- ,id: 'modx-resource-main-right-middle'
- ,cls: 'modx-resource-panel'
- ,title: _('resource_right_middle_title')
- ,collapsible: true
- ,stateful: true
- ,stateEvents: ['collapse', 'expand']
- ,getState: function() {
- return { collapsed: this.collapsed };
- }
- ,items: [{
- xtype: 'modx-combo-template'
- ,fieldLabel: _('resource_template')
- ,hideLabel: true
- ,description: '<b>[[*template]]</b><br />'+_('resource_template_help')
- ,name: 'template'
- ,id: 'modx-resource-template'
- ,anchor: '100%'
- ,editable: true
- ,typeAhead: true
- ,typeAheadDelay: 300
- ,forceSelection: true
- ,baseParams: {
- action: 'element/template/getList'
- ,combo: '1'
- ,limit: 0
- }
- ,listeners: {
- 'select': {fn: this.templateWarning,scope: this}
- }
- }]
- }]
- it.push(this.getMainRightBottomFields(config));
- return it;
- }
Add Comment
Please, Sign In to add comment