Main.js 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /**
  2. * This class is the main view for the application. It is specified in app.js as the
  3. * "mainView" property. That setting automatically applies the "viewport"
  4. * plugin causing this view to become the body element (i.e., the viewport).
  5. *
  6. * TODO - Replace this content of this view to suite the needs of your application.
  7. */
  8. Ext.define('saas.view.main.Main', {
  9. extend: 'Ext.container.Container',
  10. xtype: 'main',
  11. requires: [
  12. 'Ext.list.Tree'
  13. ],
  14. controller: 'main',
  15. viewModel: 'main',
  16. cls: 'main-ct',
  17. itemId: 'mainView',
  18. layout: {
  19. type: 'vbox',
  20. align: 'stretch'
  21. },
  22. items: [
  23. {
  24. xtype: 'toolbar',
  25. cls: 'main-headerbar shadow',
  26. height: 64,
  27. itemId: 'headerBar',
  28. items: [
  29. {
  30. xtype: 'component',
  31. reference: 'mainLogo',
  32. cls: 'main-logo-wrap',
  33. html: '<div class="main-logo"><img src="resources/images/default/logo-default.png">优企云服</div>',
  34. width: 250
  35. },
  36. {
  37. margin: '0 0 0 8',
  38. ui: 'header',
  39. iconCls:'x-fa fa-navicon',
  40. id: 'main-navigation-btn',
  41. handler: 'onToggleNavigationSize'
  42. },
  43. '->',
  44. {
  45. iconCls:'x-fa fa-search',
  46. ui: 'header',
  47. tooltip: 'See latest search'
  48. },
  49. {
  50. iconCls:'x-fa fa-bell',
  51. ui: 'header',
  52. tooltip: 'Check your messages'
  53. },
  54. {
  55. iconCls:'x-fa fa-question',
  56. ui: 'header',
  57. tooltip: 'Help / FAQ\'s'
  58. },
  59. {
  60. iconCls:'x-fa fa-th-large',
  61. ui: 'header',
  62. tooltip: 'See your profile'
  63. },
  64. {
  65. xtype: 'tbtext',
  66. text: 'administrator',
  67. cls: 'top-user-name'
  68. },
  69. {
  70. xtype: 'image',
  71. cls: 'header-right-profile-image',
  72. height: 35,
  73. width: 35,
  74. alt:'current user image',
  75. src: 'resources/images/default/user-profile-default.png'
  76. }
  77. ]
  78. },
  79. {
  80. xtype: 'maincontainerwrap'
  81. }
  82. ]
  83. });