b0263f25d33e19501aabc93d73bd8b0be55e05cc.svn-base 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /*
  2. * Ext JS Library 2.0 Copyright(c) 2006-2007, Ext JS, LLC. licensing@extjs.com
  3. *
  4. * http://extjs.com/license
  5. */
  6. Ext.onReady(function() {
  7. Ext.state.Manager.setProvider(new Ext.state.SessionProvider({
  8. state : Ext.appState
  9. }));
  10. var button = Ext.get('show-btn');
  11. button.on('click', function() {
  12. // tabs for the center
  13. var tabs = new Ext.TabPanel({
  14. region : 'center',
  15. margins : '3 3 3 0',
  16. activeTab : 0,
  17. defaults : {
  18. autoScroll : true
  19. },
  20. items : [{
  21. title : 'Bogus Tab',
  22. html : Ext.example.bogusMarkup
  23. }, {
  24. title : 'Another Tab',
  25. html : Ext.example.bogusMarkup
  26. }, {
  27. title : 'Closable Tab',
  28. html : Ext.example.bogusMarkup,
  29. closable : true
  30. }]
  31. });
  32. // Panel for the west
  33. var nav = new Ext.Panel({
  34. title : 'Navigation',
  35. region : 'west',
  36. split : true,
  37. width : 200,
  38. collapsible : true,
  39. margins : '3 0 3 3',
  40. cmargins : '3 3 3 3'
  41. });
  42. var win = new Ext.Window({
  43. title : 'Layout Window',
  44. closable : true,
  45. width : 600,
  46. height : 350,
  47. // border:false,
  48. plain : true,
  49. layout : 'border',
  50. items : [nav, tabs]
  51. });
  52. win.show(this);
  53. });
  54. });