modx.panel.resource.group.js 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /**
  2. * @class MODx.panel.ResourceGroups
  3. * @extends MODx.FormPanel
  4. * @param {Object} config An object of configuration properties
  5. * @xtype modx-panel-resource-groups
  6. */
  7. MODx.panel.ResourceGroups = function(config) {
  8. config = config || {};
  9. Ext.applyIf(config,{
  10. id: 'modx-panel-resource-groups'
  11. ,cls: 'container'
  12. ,defaults: { collapsible: false ,autoHeight: true }
  13. ,items: [{
  14. html: _('resource_groups')
  15. ,id: 'modx-resource-groups-header'
  16. ,xtype: 'modx-header'
  17. },{
  18. layout: 'form'
  19. ,defaults: { border: false ,autoHeight: true }
  20. ,items: [{
  21. html: '<p>'+_('rrg_drag')+'</p>'
  22. ,xtype: 'modx-description'
  23. },{
  24. layout: 'column'
  25. ,cls:'main-wrapper'
  26. ,defaults: { border: false }
  27. ,items: [{
  28. columnWidth: .5
  29. ,items: [{
  30. xtype: 'modx-tree-resource-group'
  31. ,id: 'modx-gr-tree-resourcegroup'
  32. ,ddGroup: 'rg2resource'
  33. ,height: 400
  34. }]
  35. },{
  36. columnWidth: .5
  37. ,defaults: { autoHeight: true }
  38. ,items: [{
  39. xtype: 'modx-tree-resource-simple'
  40. ,id: 'modx-gr-tree-resource'
  41. ,url: MODx.config.connector_url
  42. ,baseParams: {
  43. action: 'resource/getNodes'
  44. ,noMenu: true
  45. }
  46. ,ddGroup: 'rg2resource'
  47. ,title: _('resources')
  48. ,enableDrop: false
  49. ,allowDrop: false
  50. ,enableDD: false
  51. ,rootVisible: false
  52. }]
  53. }]
  54. }]
  55. }]
  56. });
  57. MODx.panel.ResourceGroups.superclass.constructor.call(this,config);
  58. };
  59. Ext.extend(MODx.panel.ResourceGroups,MODx.FormPanel);
  60. Ext.reg('modx-panel-resource-groups',MODx.panel.ResourceGroups);