welcome.js 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. /**
  2. * Loads the welcome page
  3. *
  4. * @class MODx.page.Welcome
  5. * @extends MODx.Component
  6. * @param {Object} config An object of configuration options
  7. * @xtype page-welcome
  8. */
  9. MODx.page.Welcome = function(config) {
  10. config = config || {};
  11. Ext.applyIf(config,{
  12. components: [{
  13. xtype: 'modx-panel-welcome'
  14. ,renderTo: 'modx-panel-welcome-div'
  15. ,dashboard: config.dashboard || {}
  16. }]
  17. });
  18. MODx.page.Welcome.superclass.constructor.call(this,config);
  19. };
  20. Ext.extend(MODx.page.Welcome,MODx.Component);
  21. Ext.reg('modx-page-welcome',MODx.page.Welcome);
  22. MODx.loadWelcomePanel = function(url) {
  23. if (!url) return;
  24. MODx.helpWindow = new Ext.Window({
  25. title: _('welcome_title')
  26. ,width: 850
  27. ,height: 500
  28. ,modal: true
  29. ,layout: 'fit'
  30. ,html: '<iframe onload="parent.MODx.helpWindow.getEl().unmask();" src="' + url + '" width="100%" height="100%" frameborder="0"></iframe>'
  31. });
  32. MODx.helpWindow.show(Ext.getBody());
  33. };