a695a9cd5e0c8a6fec1668671ea9a797abe61751.svn-base 1007 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. var win;
  8. var button = Ext.get('show-btn');
  9. button.on('click', function() {
  10. // create the window on the first click and reuse on
  11. // subsequent clicks
  12. if (!win) {
  13. win = new Ext.Window({
  14. el : 'hello-win',
  15. layout : 'fit',
  16. width : 500,
  17. height : 300,
  18. closeAction : 'hide',
  19. plain : true,
  20. items : new Ext.TabPanel({
  21. el : 'hello-tabs',
  22. autoTabs : true,
  23. activeTab : 0,
  24. deferredRender : false,
  25. border : false
  26. }),
  27. buttons : [{
  28. text : 'Submit',
  29. disabled : true
  30. }, {
  31. text : 'Close',
  32. handler : function() {
  33. win.hide();
  34. }
  35. }]
  36. });
  37. }
  38. win.show(this);
  39. });
  40. });