update.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. MODx.page.UpdateDashboard = function(config) {
  2. config = config || {};
  3. Ext.applyIf(config,{
  4. formpanel: 'modx-panel-dashboard'
  5. ,actions: {
  6. 'new': 'system/dashboard/create'
  7. ,edit: 'system/dashboard/update'
  8. ,cancel: 'system/dashboards'
  9. }
  10. ,buttons: [{
  11. process: 'system/dashboard/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. text: _('cancel')
  23. ,id: 'modx-abtn-cancel'
  24. ,handler: function() {
  25. MODx.loadPage('system/dashboards');
  26. }
  27. },{
  28. text: _('help_ex')
  29. ,id: 'modx-abtn-help'
  30. ,handler: MODx.loadHelpPane
  31. }]
  32. ,components: [{
  33. xtype: 'modx-panel-dashboard'
  34. ,record: config.record
  35. }]
  36. });
  37. MODx.page.UpdateDashboard.superclass.constructor.call(this,config);
  38. };
  39. Ext.extend(MODx.page.UpdateDashboard,MODx.Component);
  40. Ext.reg('modx-page-dashboard-update',MODx.page.UpdateDashboard);