update.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. MODx.page.UpdateSource = function(config) {
  2. config = config || {};
  3. Ext.applyIf(config,{
  4. formpanel: 'modx-panel-source'
  5. ,actions: {
  6. 'new': 'source/create'
  7. ,edit: 'source/update'
  8. ,cancel: 'source'
  9. }
  10. ,buttons: [{
  11. process: 'source/update'
  12. ,text: _('save')
  13. ,id: 'modx-abtn-save'
  14. ,cls: 'primary-button'
  15. ,method: 'remote'
  16. // ,checkDirty: false
  17. ,keys: [{
  18. key: MODx.config.keymap_save || 's'
  19. ,ctrl: true
  20. }]
  21. },{
  22. process: 'cancel'
  23. ,text: _('cancel')
  24. ,id: 'modx-abtn-cancel'
  25. ,params: {a:'source'}
  26. },{
  27. text: _('help_ex')
  28. ,id: 'modx-abtn-help'
  29. ,handler: MODx.loadHelpPane
  30. }]
  31. ,components: [{
  32. xtype: 'modx-panel-source'
  33. ,record: config.record
  34. ,defaultProperties: config.defaultProperties || []
  35. }]
  36. });
  37. MODx.page.UpdateSource.superclass.constructor.call(this,config);
  38. };
  39. Ext.extend(MODx.page.UpdateSource,MODx.Component);
  40. Ext.reg('modx-page-source-update',MODx.page.UpdateSource);