MainTabPanel.js 930 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. Ext.define('uas.main.MainTabPanel', {
  2. extend: 'Ext.tab.Panel',
  3. xtype: 'maintabpanel',
  4. reference: 'mainTabPanel',
  5. ui: 'main',
  6. requires: [
  7. 'Ext.ux.TabCloseMenu',
  8. 'Ext.ux.TabScrollerMenu'
  9. ],
  10. plugins: {
  11. tabclosemenu: true,
  12. tabscrollermenu: true
  13. },
  14. defaults: {
  15. scrollable: true,
  16. layout: 'fit',
  17. closable: true
  18. },
  19. frame: false,
  20. constructor: function(config) {
  21. var me = this;
  22. config = config || {};
  23. if (config.headerBar) {
  24. config.headerBar.forEach(function(btn){
  25. btn.xtype = 'button';
  26. btn.frame = false;
  27. });
  28. config.header = config.header || {};
  29. config.header.frame = false;
  30. config.header.items = config.headerBar;
  31. config.tabBarHeaderPosition = 0;
  32. }
  33. me.callParent([config]);
  34. }
  35. });