modx.panel.system.settings.js 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /**
  2. * Loads the panel for managing system settings.
  3. *
  4. * @class MODx.panel.SystemSettings
  5. * @extends MODx.FormPanel
  6. * @param {Object} config An object of configuration properties
  7. * @xtype modx-panel-system-settings
  8. */
  9. MODx.panel.SystemSettings = function(config) {
  10. config = config || {};
  11. Ext.applyIf(config,{
  12. id: 'modx-panel-system-settings'
  13. ,cls: 'container'
  14. ,bodyStyle: ''
  15. ,defaults: { collapsible: false ,autoHeight: true }
  16. ,items: [{
  17. html: _('system_settings')+' & '+_('events')
  18. ,id: 'modx-system-settings-header'
  19. ,xtype: 'modx-header'
  20. },MODx.getPageStructure([{
  21. title: _('system_settings')
  22. ,autoHeight: true
  23. ,layout: 'form'
  24. ,defaults: { border: false ,msgTarget: 'side' }
  25. ,items:[{
  26. layout: 'form'
  27. ,autoHeight: true
  28. ,defaults: { border: false }
  29. ,items: [{
  30. html: '<p>'+_('settings_desc')+'</p>'
  31. ,xtype: 'modx-description'
  32. },{
  33. xtype: 'modx-grid-system-settings'
  34. ,cls: 'main-wrapper'
  35. ,preventSaveRefresh: true
  36. },{
  37. html: MODx.onSiteSettingsRender
  38. }]
  39. }]
  40. },{
  41. title: _('system_events')
  42. ,autoHeight: true
  43. ,layout: 'form'
  44. ,defaults: { border: false ,msgTarget: 'side' }
  45. ,items:[{
  46. layout: 'form'
  47. ,autoHeight: true
  48. ,defaults: { border: false }
  49. ,items: [{
  50. html: '<p>'+_('system_events.desc')+'</p>'
  51. ,xtype: 'modx-description'
  52. },{
  53. xtype: 'modx-grid-system-event'
  54. ,cls: 'main-wrapper'
  55. ,preventSaveRefresh: true
  56. }]
  57. }]
  58. }],{
  59. id: 'modx-context-tabs'
  60. })]
  61. });
  62. MODx.panel.SystemSettings.superclass.constructor.call(this,config);
  63. };
  64. Ext.extend(MODx.panel.SystemSettings,MODx.FormPanel);
  65. Ext.reg('modx-panel-system-settings',MODx.panel.SystemSettings);
  66. /**
  67. * Loads a grid of System Settings
  68. *
  69. * @class MODx.grid.SystemSettings
  70. * @extends MODx.grid.Grid
  71. * @param {Object} config An object of options.
  72. * @xtype modx-grid-system-settings
  73. */
  74. MODx.grid.SystemSettings = function(config) {
  75. config = config || {};
  76. MODx.grid.SystemSettings.superclass.constructor.call(this, config);
  77. };
  78. Ext.extend(MODx.grid.SystemSettings, MODx.grid.SettingsGrid);
  79. Ext.reg('modx-grid-system-settings', MODx.grid.SystemSettings);