Viewport.js 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. Ext.define('Pandora.view.Viewport', {
  2. extend: 'Ext.container.Viewport',
  3. layout: 'fit',
  4. requires: [
  5. 'Pandora.view.NewStation',
  6. 'Pandora.view.SongControls',
  7. 'Pandora.view.StationsList',
  8. 'Pandora.view.RecentlyPlayedScroller',
  9. 'Pandora.view.SongInfo'
  10. ],
  11. initComponent: function() {
  12. this.items = {
  13. dockedItems: [{
  14. dock: 'top',
  15. xtype: 'toolbar',
  16. height: 80,
  17. items: [{
  18. xtype: 'newstation',
  19. width: 150
  20. }, {
  21. xtype: 'songcontrols',
  22. flex: 1
  23. }, {
  24. xtype: 'component',
  25. html: 'Pandora<br>Internet Radio'
  26. }]
  27. }],
  28. layout: {
  29. type: 'hbox',
  30. align: 'stretch'
  31. },
  32. items: [{
  33. width: 250,
  34. xtype: 'panel',
  35. layout: {
  36. type: 'vbox',
  37. align: 'stretch'
  38. },
  39. items: [{
  40. xtype: 'stationslist',
  41. flex: 1
  42. }, {
  43. html: 'Ad',
  44. height: 250,
  45. xtype: 'panel'
  46. }]
  47. }, {
  48. xtype: 'container',
  49. flex: 1,
  50. border: false,
  51. layout: {
  52. type: 'vbox',
  53. align: 'stretch'
  54. },
  55. items: [{
  56. xtype: 'recentlyplayedscroller',
  57. height: 250
  58. }, {
  59. xtype: 'songinfo',
  60. flex: 1
  61. }]
  62. }]
  63. };
  64. this.callParent();
  65. }
  66. });